A collection of utilities for building APIs with FastAPI
Project description
Bingqilin
A collection of utilities that serve as syntactic ice cream for your FastAPI app
Documentation: TBD
Source Code: https://github.com/a-huy/bingqilin
Features
This package contains some utilities for common actions and resources for your FastAPI app:
-
Extended Settings Loading - Bingqilin provides a config loading system that is an extension on top of pydantic's
BaseSettings
:- Add settings sources to enable loading from
.yaml
files or.ini
files - Allow the option to add the settings model to the OpenAPI docs (
/docs
) - Provide a handle to the loaded config instance via
bingqilin.conf:config
- Add settings sources to enable loading from
-
Database Client Initialization - Allow initializing connection clients and pools from database config. This will provide a way to grab a client handle via
bingqilin.db:get_db_client()
. -
Validation Error Logging - Add an exception handler for
RequestValidationError
that emits a log. Useful for troubleshooting routes that support a lot of different types of requests, such as third-party callback handlers.
Requirements
This package is intended for use with any recent version of FastAPI that supports pydantic>=2.0
and Python 3.10+.
Installation
pip install bingqilin
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bingqilin-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ad4f20e4bbfc493b58bb58f088045e86d95ac53760d13779783dd3d1162f30e |
|
MD5 | 66f5dacf3a8aa352b2cf7debb2f61297 |
|
BLAKE2b-256 | 6461684b3b0699f36a30a88a4e05d0731187f47fd6f3a8950c0a95ee422cb101 |