Skip to main content

Configuration file management tool

Project description

๐Ÿ“„ ConfigBuddy

Manage your configuration files with elegance! ๐ŸŽจ

PyPI version License: MIT Python Versions Tests codecov

โœจ Features

  • ๐Ÿ“ Multiple format support (YAML, JSON, INI)
  • ๐Ÿ” Smart configuration comparison and visualization
  • ๐Ÿ”„ Intelligent configuration merging
  • โœ… JSON Schema validation
  • ๐ŸŒณ Tree-style visualization

๐Ÿš€ Getting Started

Installation

pip install configbuddy

CLI Usage

ConfigBuddy provides a powerful CLI interface for managing your configuration files:

Visualize Configuration

configbuddy visualize config.yaml

Visualize Command

Compare Configurations

configbuddy diff base.yaml --compare other.yaml

Diff Command

Merge Configurations

configbuddy merge base.yaml override.yaml -o merged.yaml

Merge Command

Validate Configuration

configbuddy validate config.yaml --schema schema.json

Generate Schema

configbuddy generate-schema config.yaml -o schema.json

Python API Usage

from configbuddy import Config

# Load configuration files
config1 = Config.from_file('config1.yaml')
config2 = Config.from_file('config2.json')

# Visualize configuration
config1.visualize()

# Compare configurations
diff = config1.diff_with(config2)
diff.visualize()

# Merge configurations
merged, conflicts = config1.merge_with(config2)
if conflicts:
    print("Merge conflicts detected:", conflicts)

๐Ÿ’ก Examples

Loading and Saving

# Load from YAML
config = Config.from_file('config.yaml')

# Save as JSON
config.save('config.json')

Configuration Comparison

# Compare two configs
diff = config1.diff_with(config2)

# Check differences
print("Added:", diff.added)
print("Removed:", diff.removed)
print("Modified:", diff.modified)

Configuration Merging

# Deep merge (default)
merged, conflicts = config1.merge_with(config2)

# Shallow merge
merged, conflicts = config1.merge_with(config2, strategy='shallow')

Visualization Example

config.yaml
โ”œโ”€โ”€ database
โ”‚   โ”œโ”€โ”€ host: "localhost"
โ”‚   โ”œโ”€โ”€ port: 5432
โ”‚   โ””โ”€โ”€ credentials
โ”‚       โ”œโ”€โ”€ username: "admin"
โ”‚       โ””โ”€โ”€ password: "******"
โ””โ”€โ”€ logging
    โ”œโ”€โ”€ level: "INFO"
    โ””โ”€โ”€ format: "%(asctime)s - %(message)s"

๐ŸŽฏ Use Cases

  • ๐Ÿ”„ Manage dev/staging/prod configurations
  • ๐Ÿค Share and merge team configurations
  • ๐Ÿ” Track configuration changes
  • ๐Ÿ“Š Version control experiment settings (ML/Data Science)

๐Ÿ›ฃ๏ธ Roadmap

  • CLI interface
  • PyPi Upload
  • Comment preservation
  • XML/TOML support
  • Web dashboard (visualization/comparison)

๐Ÿค Contributing

Bug reports, feature suggestions, and pull requests are welcome! See CONTRIBUTING.md for details.

๐Ÿ“ License

MIT License - see LICENSE for details.

๐ŸŒŸ Star History

Star History Chart


Made with โค๏ธ by Harim Kang

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

configbuddy-0.1.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

configbuddy-0.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file configbuddy-0.1.0.tar.gz.

File metadata

  • Download URL: configbuddy-0.1.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for configbuddy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6ed7d6b4128297217c7c795ff3a28c1dd6bffa055104e30c17c9633688718a26
MD5 aa31414d1447966ac082111fab0cd3fa
BLAKE2b-256 76aebcf0bd9ac7e936b2437e3240aef7191686ea10a742bac0ccb240896d91b5

See more details on using hashes here.

File details

Details for the file configbuddy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: configbuddy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for configbuddy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4edf0fbe3fbd8698d1f1d3fa0a729a8b547976c24b39bfbcda45703fdf7c8f4
MD5 61b1998cbae320a18aa86c081a5b5601
BLAKE2b-256 2588fd6b9263d5307235307df1644a1971b20e33cf45fbe7dbf3741ea2f7eae5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page