{"repo":"Lancetnik/FastDepends","free":true,"listed":false,"github":"https://github.com/Lancetnik/FastDepends","clone":"git clone https://github.com/Lancetnik/FastDepends.git","description":"FastDepends - FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. Async and sync modes are both supported.","language":"Python","stars":517,"topics":["async","dependency","dependency-injection","fastapi","python","sync","faststream","propan"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"FastDepends --- Documentation: --- FastDepends - FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. This is a small library which provides you with the ability to use lovely FastAPI interfaces in your own projects or tools. Thanks to fastapi and pydantic projects for this great functionality. This package is just a small change of the original FastAPI sources to provide DI functionality in a pure-Python way. Async and sync modes are both supported. For why? This project should be extremely helpful to boost your not- FastAPI applications (even Flask , I know that u like some legacy). Also the project can be a core of your own framework for anything. Actually, it was build for my another project - :rocket: Propan :rocket: (and FastStream ), check it to see full-featured FastDepends usage example. Installation Usage There is no way to make Dependency Injection easier You can use this library without any frameworks in both sync and async code. Async code Sync code @inject decorator plays multiple roles at the same time: resolve Depends classes cast types according to Python annotation validate incoming parameters using pydantic --- Features Synchronous code is fully supported in this package: without any async to sync , run sync , syncify or any other tricks. Also, FastDepends casts functions' return values the same way, it can be very helpful in building your own tools. These are two main defferences from native FastAPI DI System. --- Depen","default_branch":null,"files":null,"tree":[],"storefront":"/r/Lancetnik","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Lancetnik/FastDepends/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}