Skip to main content

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",
]

Metadata

Release files for xiaoapi-mongodb 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xiaoapi-mongodb 0.0.3
File Size Uploaded
xiaoapi-mongodb-0.0.3.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xiaoapi-mongodb 0.0.3
File Interpreter ABI Platform
xiaoapi_mongodb-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.1 kB

Release files / xiaoapi-mongodb-0.0.3.tar.gz

Download URL xiaoapi-mongodb-0.0.3.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
196b63764b0c67b34d279c692a24084ed8abbf72dd09d14f729685d187a32a1d
BLAKE2b-256 checksum
How to use checksums
09a97eb940f9094de3b35a6487084f682fbac5e8b5f136097fd9736fea28773c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.10

Release files / xiaoapi_mongodb-0.0.3-py3-none-any.whl

Download URL xiaoapi_mongodb-0.0.3-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f91d3c17c9523ea6cc24076066f7d65bcd4d1981801541bbb09978f9815a9eed
BLAKE2b-256 checksum
How to use checksums
2956d4843c37cde52f641b826a53a0d0acfd939def3ece3625e34705ef8029c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.10

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page