{"repo":"yezz123/fastapi-class","free":true,"listed":false,"github":"https://github.com/yezz123/fastapi-class","clone":"git clone https://github.com/yezz123/fastapi-class.git","description":"provides a class-based View decorator to help reduce the amount of boilerplate necessary when developing related routes. ✨🚀","language":"Python","stars":119,"topics":["fastapi","class","pydantic","decorators","python","dependency-injection","fastapi-template","python3"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Classes and Decorators to use FastAPI with Class based routing --- Source Code : Install the project : pip install fastapi-class --- As you create more complex FastAPI applications, you may find yourself frequently repeating the same dependencies in multiple related endpoints. A common question people have as they become more comfortable with FastAPI is how they can reduce the number of times they have to copy/paste the same dependency into related routes. fastapi class provides a class-based view decorator @View to help reduce the amount of boilerplate necessary when developing related routes. Highly inspired by Fastapi-utils, Thanks to @dmontagu for the great work. - Example: Response model 📦 Exception in list need to be either function that return fastapi.HTTPException itself. In case of a function it is required to have all of it's arguments to be optional . Customized Endpoints Note: The edit() endpoint is decorated with the @endpoint((\"PUT\",), path=\"edit\") decorator, which specifies that this endpoint should handle PUT requests to the /edit path, using @endpoint(\"PUT\", path=\"edit\") has the same effect Development 🚧 Setup environment 📦 Note: You should have uv installed, if not you can install it with: Then you can install the dependencies with: Run tests 🌝 You can run all the tests with: Format the code 🍂 Execute the following command to apply pre-commit formatting: Execute the following command to apply mypy type checking: License This project is licensed under th","default_branch":null,"files":null,"tree":[],"storefront":"/r/yezz123","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yezz123/fastapi-class/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."}