Skip to main content

Dependency injection system extracted from FastAPI

Project description

dependable

Latest Commit
Package version

Dependency injection system extracted from fastapi

import asyncio
from random import random

from dependable import dependant, Depends

@dependant
async def main(*, choice: int = Depends(random)) -> None:
    print(choice)

asyncio.run(main())

More on examples

Installation

poetry add dependable # pip install dependable

Python 3.6

poetry add async-exit-stack async_generator # pip install async-exit-stack async_generator

Development

docker build -t dependable .
docker run --rm -v $(pwd):/usr/src/app dependable scripts/dev

References

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dependable-0.1.0.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

dependable-0.1.0-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page