https://github.com/anthonycorletti/modal-asgi-lifecycle-example
Leverage FastAPI and ASGI Lifecycle on Modal
https://github.com/anthonycorletti/modal-asgi-lifecycle-example
asgi fastapi modal postgresql
Last synced: 8 months ago
JSON representation
Leverage FastAPI and ASGI Lifecycle on Modal
- Host: GitHub
- URL: https://github.com/anthonycorletti/modal-asgi-lifecycle-example
- Owner: anthonycorletti
- Created: 2024-09-12T23:06:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T23:10:30.000Z (almost 2 years ago)
- Last Synced: 2025-02-04T17:53:27.339Z (over 1 year ago)
- Topics: asgi, fastapi, modal, postgresql
- Language: Python
- Homepage:
- Size: 58.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# modal-asgi-lifecycle-example
Finally! ASGI Lifecycle support on [Modal](https://modal.com).
This rather beefy example shows how you can quickly and easily create a FastAPI application on Modal that leverages the asgi lifecycle for things like request state and database sessions that connect to postgres with asyncpg.
Additionally, this code is packaged so that you can build and deploy your API in a docker container, independent of modal, incase you're selling your API to a customer that doesn't use modal... yet.