xiaoapi mongodb
Project description
xiaoapi-mongodb
xiaoapi的mongodb扩展包
安装
pip install xiaoapi-mongodb
配置
需要在 application/settings 中 添加以下配置:
# MongoDB 数据库配置
# 格式:mongodb://用户名:密码@地址:端口/?authSource=数据库名称
MONGO_DB_ENABLE = False
MONGO_DB_NAME = "fastapi"
MONGO_DB_URL = f"mongodb://admin:123456@177.8.0.6:27017/?authSource={MONGO_DB_NAME}"
然后在 application/settings 中的 EVENTS 里引入 xiaoapi_mongodb
EVENTS = [
"xiaoapi_mongodb.connect_mongo",
]
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
xiaoapi-mongodb-0.0.2.tar.gz
(6.9 kB
view hashes)
Built Distribution
Close
Hashes for xiaoapi_mongodb-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 396e37e3a0aea98bb9cff7f7910498c27da2de8882c1d99083dd0ee99df3d8f1 |
|
MD5 | 68b3155db61a871c6739e6e49d837e05 |
|
BLAKE2b-256 | ee3fadaaeb633ee43b23bedf067b830bd5a9bc0318393366c81cd82f7e659984 |