labthings / labthings/labthings-fastapi
Add hooks for server customisation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
In the OpenFlexure Microscope we need to customise the server (change some logging setup, mount some directories, etc). This means we can't use serve_from_cli, because we can't use serve_from_cli we need to reimplement the logic that brings up the fallback server.
It would be good to have a way to pass in a callable that modifies the sever between creation and being passed to Uvicorn.
Note that we also supply extra logging information to the fallback server, so we would need a hook for that too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the serve_from_cli path and trace how the fallback server is created and passed to Uvicorn. The work is complete when callers can customize the server and provide extra logging information without reimplementing the fallback-server setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100