Git Product home page Git Product logo

config-setup-python's Introduction

Configuration Creator for Python

A Python library for managing configurations. Supports saving and loading configurations in various formats, such as JSON, YAML, XML, INI, and CFG.

Installation

To install the library, you can use pip:

pip install ConfigSetup

Usage

To use the ConfigSetup library in your Python code, you can import it and create an instance of the ConfigSetup class:

from config_setup import ConfigSetup

config = ConfigSetup()

Setting and Getting Values

To set a value in the configuration, you can use the set method:

config.set('name', 'John')

To get a value from the configuration, you can use the get method:

name = config.get('name')

Saving and Loading Configurations

To save the configuration to a file, you can use the save method and specify the file format:

config.save('config', 'json')

To load a configuration from a file, you can use the load method and specify the file path:

config.load('config.json')

Validating Configurations

To validate a configuration data string against a specific format, you can use the validate method and specify the format:

data = '{"name": "John", "age": 30}'
valid = config.validate(data, 'json')

Clearing the Configuration

To clear the configuration, you can use the clear method:

config.clear()

License

This library is released under the MIT License.

Contributing

Contributions are always welcome! If you'd like to contribute to this library, please follow these steps:

  1. Fork the project on GitHub.
  2. Clone your forked repository to your local machine.
  3. Create a new branch for your changes.
  4. Make your changes and commit them, making sure to write clear commit messages.
  5. Push your branch to your forked repository.
  6. Submit a pull request to the main project repository, explaining your changes and why they should be merged.

Before submitting a pull request, please make sure to run the tests by executing the following command from the project's root directory:

python -m unittest discover

If any tests fail, please investigate and fix the issue before submitting your pull request.

Thank you for your interest in contributing to this project!

config-setup-python's People

Contributors

lyubomirt avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.