Skip to main content

A versatile tool to convert configuration files between different formats.

Project description

ConfigConverter

Convert configuration files between different formats.

Features

  • Supports JSON, YAML, TOML, INI, and XML formats.
  • Command-line interface and Python API.
  • Easy to use and extend.

Installation

pip install configconverter

Command-Line Usage

configconverter [OPTIONS] INPUT_FILE [OUTPUT_FILE]

Examples

  • Convert config.json to config.yaml:

    configconverter config.json config.yaml
    
  • Specify formats explicitly:

    configconverter -i ini -o toml settings.conf settings.toml
    
  • Output to standard output:

    configconverter config.toml -o json --stdout
    

Python API Usage

from configconverter import convert

# Convert using file paths
convert('config.json', 'json', 'yaml', output_file='config.yaml')

# Convert using data strings
json_data = '{"name": "John", "age": 30}'
yaml_data = convert(json_data, 'json', 'yaml', from_file=False)
print(yaml_data)

Contributing

Contributions are welcome! Please submit a pull request or open an issue on GitHub.

License

This project is licensed under the MIT License.

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

configconverter-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

configconverter-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: configconverter-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-41-generic

File hashes

Hashes for configconverter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 73cc9800bb60b18539f918886ee970662a6c164cf47d0ee97cd5dece279b77e8
MD5 35e55ef89b46fa1a96ec44f9f17a2061
BLAKE2b-256 d8636338833af28f9c64f4df9f226298705467785ce778513cded373d209be6f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: configconverter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-41-generic

File hashes

Hashes for configconverter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4729511ac9e5738a8c0b037a88254adb77a0ab6f7f44a6fd59b02742e64cdcc9
MD5 bf17e27a9d0c9fbef1a5ef8cc8069854
BLAKE2b-256 7f0aa90d105ee79a833505c8bc1b95d587a962ce09fb312f0c8f6668f148d400

See more details on using hashes here.

Supported by

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