A Python library for event-driven configuration management
Project description
🔧 ConfigFlow
ConfigFlow is a Python library for managing configuration files with real-time monitoring and event-driven updates.
Supports JSON, YAML, and more — with validation and a simple API.
✨ Features
- Unified Parsing: Load JSON, YAML, and other formats.
- Real-Time Monitoring: Detect config changes instantly using
watchdog. - Event-Driven: Register callbacks for config updates.
- Validation: Ensure configs match your schema with
pydantic.
📦 Installation
pip install configflow
⚡ Quickstart
from configflow import ConfigFlow
# Initialize with a config file
config = ConfigFlow("settings.yaml")
# Define a schema
schema = {"port": int, "debug": bool}
# Register a callback
@config.on_change
def handle_update(changed_config):
print(f"Config updated: {changed_config}")
# Load and watch
config.load(schema=schema)
config.watch()
# Keep running (Ctrl+C to stop)
try:
while True:
pass
except KeyboardInterrupt:
config.stop()
📝 Example Config (settings.yaml)
port: 8080
debug: true
📚 Documentation
Full documentation is available at ConfigFlow Docs.
(Replace # with your actual docs link once published.)
🤝 Contributing
We welcome contributions!
See CONTRIBUTING.md for guidelines on adding new features, bug fixes, or parser support.
📄 License
MIT License
Includes dependencies with compatible licenses:
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flow_config-0.1.0.tar.gz.
File metadata
- Download URL: flow_config-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
933339c25e02b6ec06e4f1b5ad21ecdc61f0d6929850723c6f614f144088a9fa
|
|
| MD5 |
0425905e1113b3c66db5a10035ee261d
|
|
| BLAKE2b-256 |
66ec7900125d0d29aee9c5c6a8c7dac17cc08ece8eb383032e721bb93a878934
|
File details
Details for the file flow_config-0.1.0-py3-none-any.whl.
File metadata
- Download URL: flow_config-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cd6259b80f62f1e85447a549a264c0d0b81cdb117a3a40a9300167a20d73907
|
|
| MD5 |
e0f94b81027d506e1799b4165fa1b237
|
|
| BLAKE2b-256 |
10f8806cff7a47a2b994d53f38aaa2c7ff0f54af7881256a031c54c36c3b506f
|