Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rtconfig

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtconfig

A simple python real-time remote configuration framework.

  • 0.1.8
  • PyPI
  • Socket score

Maintainers
1

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 nametypedefaultdescription
DEBUGboolfalsedebug mode
MAX_CONNECTIONint1024max client connections
STORE_TYPEstringjson_filedata store type
BROKER_URLstringdata store broker url
LOGIN_DISABLEDboolfalseserver disable login
OPEN_CLIENT_AUTH_TOKENboolfalsedata 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

  • rtconfig not support multiprocess deploy now.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc