rtconfig
A simple Python lib for manage remote server configuration.
- Configuration remote unified management center.
- When the configuration changes, pushed to client in real time.
Installing
pip install rtconfig
Server deploy
You can start server directly by single process.
python -m rtconfig.server
Command options:
- --host: str, server host
- --port: str, server port
- --auto-reload: bool, if auto reload
- --store-type: str, rtconfig server store type
- --broker-url: str, rtconfig server broker url
- --login-disable: bool, rtconfig server disable login
- --config: str, rtconfig server config file path
Client connect
Create a new python module conf.py, then write code like this:
from rtconfig import RtConfigClient
client = RtConfigClient('demo',ws_url='ws://127.0.0.1:8089',config_module=globals())
So, you can use real time configuration like this:
conf.config_name
Configuration
You can create service.py python config file, And add file path to params --config=services.py.
Configuration options:
| config name | type | default | description |
|---|---|---|---|
| DEBUG | bool | false | debug mode |
| MAX_CONNECTION | int | 1024 | max client connections |
| STORE_TYPE | string | json_file | data store type |
| BROKER_URL | string | data store broker url | |
| LOGIN_DISABLED | bool | false | server disable login |
| OPEN_CLIENT_AUTH_TOKEN | bool | false | data store broker url |
Config data store method broker url
json_file
BROKER_URL = "~/rtconfig" (默认可不填)
redis
BROKER_URL = "redis://127.0.0.1:6379/0"
mongodb
BROKER_URL = "mongodb://127.0.0.1:27017/demo?connect=false"
Notes
rtconfignot support multiprocess deploy now.
Metadata
Release files for rtconfig 0.1.8
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 | Actions |
|---|---|---|---|---|
| rtconfig-0.1.8.tar.gz | 809.6 kB | Without provenance | Details for rtconfig-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rtconfig-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for rtconfig-0.1.8-py3-none-any.whl |
Total release size: 1.7 MB
Release files / rtconfig-0.1.8.tar.gz
| Download URL | rtconfig-0.1.8.tar.gz |
|---|---|
| Size | 809.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d71b841d9e86f168275e93550acc07fc1f7cdc70853b207ae38ffa0d6ba4e3c
|
|
BLAKE2b-256 checksum How to use checksums |
59d2fe19823183eaec14081a2a7a57f651fdefa4cdc72f94953d9a7748b2d207
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Release files / rtconfig-0.1.8-py3-none-any.whl
| Download URL | rtconfig-0.1.8-py3-none-any.whl |
|---|---|
| Size | 874.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
212e7e9fa14d138d0e8baf29589ae215496a21965be9a8fc4c36d365a308dfac
|
|
BLAKE2b-256 checksum How to use checksums |
2d7cb6d4a764ddc18282e4f2128c86140eb41911169392a834a08343d202da13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Security for rtconfig 0.1.8
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.