Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T23:10:30.000Z (2 months ago)
- Last Synced: 2024-09-27T01:52:22.351Z (about 2 months ago)
- Topics: asgi, fastapi, modal, postgresql
- Language: Python
- Homepage:
- Size: 58.6 KB
- Stars: 2
- 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.