Skip to main content

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


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.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

xiaoapi_mongodb-0.0.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file xiaoapi-mongodb-0.0.3.tar.gz.

File metadata

  • Download URL: xiaoapi-mongodb-0.0.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for xiaoapi-mongodb-0.0.3.tar.gz
Algorithm Hash digest
SHA256 196b63764b0c67b34d279c692a24084ed8abbf72dd09d14f729685d187a32a1d
MD5 c04ecfedfdac50c1e9e07edc7f8c4c7b
BLAKE2b-256 09a97eb940f9094de3b35a6487084f682fbac5e8b5f136097fd9736fea28773c

See more details on using hashes here.

File details

Details for the file xiaoapi_mongodb-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for xiaoapi_mongodb-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f91d3c17c9523ea6cc24076066f7d65bcd4d1981801541bbb09978f9815a9eed
MD5 36b83556971ab2c6c6b3255cf980d64d
BLAKE2b-256 2956d4843c37cde52f641b826a53a0d0acfd939def3ece3625e34705ef8029c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page