Generate short url by bot for bypassing censorship
Project description
nonebot-plugin-shorturl
✨ 为 NoneBot 插件提供短链接服务支持 ✨
安装
pip install nonebot-plugin-shorturl
poetry add nonebot-plugin-shorturl
pdm add nonebot-plugin-shorturl
# 特定后端
pip install nonebot-plugin-shorturl[redis]
pip install nonebot-plugin-shorturl[diskcache]
# 所有后端
pip install nonebot-plugin-shorturl[all]
使用方式
在 .env
文件中添加必填的配置项
配置项
通用配置项
SHORTURL_HOST
(必填):用于为外部插件构造完整的包含域名的短链接。示例值:http://localhost:8080
SHORTURL_ENDPOINT
:指定短链接服务的入口点模板。默认值:/shorturl/{token}
,可以自定义为/s/{token}
等SHORTURL_CACHE_TYPE
:指定短链接服务的后端缓存类型,可选值:memory
|diskcache
|redis
差分配置项
Redis
SHORTURL_REDIS_HOST
:Redis 后端的地址SHORTURL_REDIS_PORT
:Redis 后端的端口SHORTURL_REDIS_DB
:Redis DB 配置项SHORTURL_REDIS_USERNAME
:Redis 用户名SHORTURL_REDIS_PASSWORD
:Redis 密码
Diskcache
SHORTURL_DISKCACHE_FOLDER
:Diskcache 文件持久化目录
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
Close
Hashes for nonebot_plugin_shorturl-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 240b27c63bbb1dc1c5bf4bef8742155f8348321b8b155e5c3c906a5c84f51229 |
|
MD5 | 1683c6912a66944ab1fa4124c43e8fa0 |
|
BLAKE2b-256 | 2003a27af9e2ef3b87ae672639c8c92d6801d9bf645307875e67f264225786d3 |
Close
Hashes for nonebot_plugin_shorturl-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85cd5f9414ca6cca9bc90dd42806a0d06b0bbec359dfdfebdbfd1f825a6af05d |
|
MD5 | 046f4f4de419d3377f4511c3508a3034 |
|
BLAKE2b-256 | 05f858077a069c10d8811dc19212f635260f9806a302c8cd78937ac62919ebb1 |