fastapi-utils icon indicating copy to clipboard operation
fastapi-utils copied to clipboard

Reusable utilities for FastAPI

Results 97 fastapi-utils issues
Sort by recently updated
recently updated
newest added

While using `fastapi-utils` scheduler, passing `Depends(get_db)` as a parameter to the function doesn't work. This is how it works within **FastAPI** endpoint: ``` @app.post("/sample_test") async def sample_test(db: Session = Depends(get_db)):...

bug

* add repeat_at decorator Closes #184

Hey there, when i use repeated task in production with a [docker gunicorn/uvicorn image](https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker) there are multiple instances of the application running, each one with the repeated task. So for...

question

**Describe the bug** When I use CBV with a router that has a prefix, the prefix is included twice. ```python from fastapi import APIRouter from fastapi_utils.cbv import cbv router =...

bug

**Describe the bug** The `@repeat_every()` decorator does not trigger the function it decorates unless the `@app.on_event('startup')` decorator is also present. **To Reproduce** I created this sample `main.py` to show the...

bug

**Describe the bug** Fails completely on Windows because `resource` is not available on Windows. ``` \lib\site-packages\fastapi_utils\timing.py", line 10, in import resource ModuleNotFoundError: No module named 'resource' ``` **To Reproduce** Steps...

bug

**Description** How might I go about writing a CBV that can be inherited from? I want to make a generic class that just needs the class variables set to populate...

question

**Description** How can I use class based subrouting? Please show me example for this, I have big app and don't found simple example on the site

question

**Describe the bug** I'm using `repeat_every` as in ``` @app.on_event("startup") @repeat_every(seconds=60) def scrumbot_alert(): """ Sends alert """ now_tz = datetime.datetime.utcnow().astimezone(pytz.timezone(timezone)) logging.error(now_tz) alert() ``` But when I put a log to...

bug

Fixes #172. Note that the comparison must be done using `type` since `None` is a special typehint case. Python documentation states: > Note that `None` as a type hint is...