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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file dependable-0.1.0.tar.gz.

File metadata

  • Download URL: dependable-0.1.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/4.19.121-linuxkit

File hashes

Hashes for dependable-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d6c22fb38156d97b1e0f105af24d78322cae4ba02e1395d72b3bbd090190f2b0
MD5 ad59fdeb7e7945e6447c0180d41ca7d6
BLAKE2b-256 faedc10f171f908f7c672676da37015f940160f6b9955fc6d3cc335d76ccaaeb

See more details on using hashes here.

File details

Details for the file dependable-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dependable-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/4.19.121-linuxkit

File hashes

Hashes for dependable-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 354659894ff8dad88719517579f14b2177ddf6d784972509a72807b6101c3546
MD5 14149c654240b595931e99342abfe009
BLAKE2b-256 0c338da8202eda98b3915217424cc264ef4de788d83342576caed184c2c741a9

See more details on using hashes here.

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