Skip to main content

A batabase manager plugin for nonebot2,provide capability of connection to all kinds of databases

Project description

nonebot_plugin_navicat

pypi implementation wheel python license

功能

  • 对外暴露出数据库连接 支持mysql mongodb redis

开始使用

必须使用 pip

  • 通过 pip 从 PyPI 安装
pip install nonebot-plugin-navicat
  • 我全都要
pip install nonebot-plugin-navicat[all]
  • 要使用mysql
pip install nonebot-plugin-navicat[mysql]
  • 要使用mongodb
pip install nonebot-plugin-navicat[mongodb]
  • 要使用redis
pip install nonebot-plugin-navicat[redis]
  • 在 nonebot2 项目中设置 load_plugin()
nonebot.load_plugin('nonebot_plugi_navicat')
  • 参照下文在 nonebot2 项目的环境文件 .env.* 中添加配置项
  • 使用时at搜图即可

配置项

配置数据库连接

# mysql 如果有MYSQL_HOST则表示要进行mysql连接
MYSQL_HOST
MYSQL_PORT
MYSQL_USER
MYSQL_PASSWORD

# mongodb 如果有MONGODB_HOST则表示要进行mongodb连接
MONGODB_HOST
MONGODB_PORT
MONGODB_USER
MONGODB_PASSWORD

# redis 如果有REDIS_HOST则表示要进行redis连接
REDIS_HOST
REDIS_PORT
REDIS_PASSWORD
REDIS_DB

# 以后会加入更多数据库支持

特别感谢

优化建议

  • 来个postgresql支持?

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

nonebot-plugin-navicat-0.1.0.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_navicat-0.1.0-py3-none-any.whl (17.7 kB view hashes)

Uploaded Python 3

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