simqsvr
SIMQ服务器。基于redis的消息队列,通过web接口提供对外服务。
安装
pip install simqsvr
接口列表
| 接口地址 | 接口名称 |
|---|---|
| /simq/api/{channel}/rpush | 添加消息(高优先级) |
| /simq/api/{channel}/lpush | 添加消息(低优先级) |
| /simq/api/{channel}/pop | 获取消息执行 |
| /simq/api/{channel}/ack | 确认消息执行完成 |
| /simq/api/{channel}/ret | 退还消息 |
| /simq/api/{channel}/query | 查询消息详情 |
| /simq/api/{channel}/cancel | 取消消息(仅限待处理状态) |
配置项
- SIMQ_MQ_DEFAULT: 默认为default,即django-redis标准添加的CACHES实例名称。
- SIMQ_MQS: 允许按channel使用不同caches实例。
- SIMQ_ACK_EVENT_EXPIRE: 消息处理完成通知过期时间。默认为10分钟。
- SIMQ_DONE_ITEM_EXPIRE: 已处理消息和结果的保存时间。默认为7天。
- SIMQ_APIKEYS: apikey认证密钥。不设置密钥则表示无需认证。
- SIMQ_APIKEY_HEADER: apikey认证请求头名称。默认为apikey。
简易使用方法
# 创建数据库
manage-simqsvr migrate
# 创建超级用户
manage-simqsvr createsuperuser
# 启动服务
manage-simqsvr runserver 0.0.0.0:80 --noreload
- 创建数据库&创建超级用户,只是用来登录swagger接口管理界面。
- 如果不需要使用swagger接口管理功能,可以忽略上述两个步骤。
注意事项
- simqsvr目前仅支持基于redis的消息队列。
- 必须要按django-redis标准来配置CACHES配置项。如:
# decode_responses=True是必须的 CACHES = { "default": { "BACKEND": "django_redis.cache.RedisCache", "LOCATION": "redis://127.0.0.1:6379/0?decode_responses=True", } }
版本
0.1.0
- 版本首发。
0.1.3
- 完善容器打包支持。
- 修正swagger默认apikey认证header问题。
Metadata
Release files for simqsvr 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| simqsvr-0.1.3.tar.gz | 14.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simqsvr-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.2 kB
Release files / simqsvr-0.1.3.tar.gz
| Download URL | simqsvr-0.1.3.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7308cc5e7d6f99ceef7628b3a1171c3240c19942f7e526e3ed97a33cc67eb80f
|
|
BLAKE2b-256 checksum How to use checksums |
a7b0ad1ebb2c6068ec4c1268317918088b2371875a73bdc532dee2466f8a1a68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / simqsvr-0.1.3-py3-none-any.whl
| Download URL | simqsvr-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
690221ad3965cf004228bc39c5ea247b663c6f1f568bd44ceeb3e5593cda4675
|
|
BLAKE2b-256 checksum How to use checksums |
714ad848fdf2e19c966d4598506347199122aea7d2b5372381ad79093ffcdc33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for simqsvr 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.