πŸ”§ 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: