ezconfiguration


Nameezconfiguration JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/datanooblol/ezconfiguration
SummaryThis is an easy way to a configuration file in json format.
upload_time2023-02-11 21:17:54
maintainer
docs_urlNone
authordatanooblol
requires_python>=3.0
licenseMIT
keywords ['python3' 'ez' 'config']
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ezconfiguration  
[![PyPI Latest Release](https://img.shields.io/pypi/v/ezconfiguration)](https://pypi.org/project/ezconfiguration/) 
[![Downloads](https://img.shields.io/pypi/dm/ezconfiguration)](https://pypi.org/project/ezconfiguration/)
[![Repo Size](https://img.shields.io/github/repo-size/datanooblol/ezconfiguration)](https://pypi.org/project/ezconfiguration/)
[![License](https://img.shields.io/pypi/l/ezconfiguration)](https://pypi.org/project/ezconfiguration/)
[![Release Date](https://img.shields.io/github/release-date/datanooblol/ezconfiguration)](https://pypi.org/project/ezconfiguration/)

## What is ezconfiguration?

**ezconfiguration** is a Python package for building a configuration file in an easy way.  

## Where to get ezconfiguration  
The source code is currently hosted at GitHub:  
https://github.com/datanooblol/ezconfiguration  

The latest version is available at  
[Python Package Index (PyPI)](https://pypi.org/project/ezconfiguration/)  

```sh  
# pip  
pip install ezconfiguration  
```  

## How to use ezconfiguration  

Steps to follow:
```python

# Import EzPackage
from ezconfiguration.config_manager import EzConfig

# Initialize EzConfig object
ezcfg = EzConfig(directory='your-desired-directory', filename='filename.json')

# Write a configuration file. If file already exists, replace=True
ezcfg.write_config_file(config_dict={"a":1})

# Read a configuration file. It's a good practice to use this method after writing, inserting, updating, deleting method.
ezcfg.read_config_file()

# Insert a new configuration. If a config already exists, replace=True
ezcfg.insert_config(config_dict={'b':[2,3,4]})

ezcfg.read_config_file()

# Update the existing configuration. Always replace=True
# Note: in the case when you want to update the nested configuration, use insert method with the whole nested config instead
ezcfg.update_config(key='a', value=5, replace=True)

ezcfg.read_config_file()

# Delete a configuration. Input delete config
ezcfg.delete_config(key='b')

ezcfg.read_config_file()

# Delete the configuration file. Input permanently delete
ezcfg.delete_config_file()

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/datanooblol/ezconfiguration",
    "name": "ezconfiguration",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": "",
    "keywords": "['python3','ez','config']",
    "author": "datanooblol",
    "author_email": "data.noob.lol@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/25/5f/05726e0b4f8062a8c02cf149a9fcca14621ef5ced0c4d39cc5c87a677677/ezconfiguration-0.0.2.tar.gz",
    "platform": null,
    "description": "# ezconfiguration  \n[![PyPI Latest Release](https://img.shields.io/pypi/v/ezconfiguration)](https://pypi.org/project/ezconfiguration/) \n[![Downloads](https://img.shields.io/pypi/dm/ezconfiguration)](https://pypi.org/project/ezconfiguration/)\n[![Repo Size](https://img.shields.io/github/repo-size/datanooblol/ezconfiguration)](https://pypi.org/project/ezconfiguration/)\n[![License](https://img.shields.io/pypi/l/ezconfiguration)](https://pypi.org/project/ezconfiguration/)\n[![Release Date](https://img.shields.io/github/release-date/datanooblol/ezconfiguration)](https://pypi.org/project/ezconfiguration/)\n\n## What is ezconfiguration?\n\n**ezconfiguration** is a Python package for building a configuration file in an easy way.  \n\n## Where to get ezconfiguration  \nThe source code is currently hosted at GitHub:  \nhttps://github.com/datanooblol/ezconfiguration  \n\nThe latest version is available at  \n[Python Package Index (PyPI)](https://pypi.org/project/ezconfiguration/)  \n\n```sh  \n# pip  \npip install ezconfiguration  \n```  \n\n## How to use ezconfiguration  \n\nSteps to follow:\n```python\n\n# Import EzPackage\nfrom ezconfiguration.config_manager import EzConfig\n\n# Initialize EzConfig object\nezcfg = EzConfig(directory='your-desired-directory', filename='filename.json')\n\n# Write a configuration file. If file already exists, replace=True\nezcfg.write_config_file(config_dict={\"a\":1})\n\n# Read a configuration file. It's a good practice to use this method after writing, inserting, updating, deleting method.\nezcfg.read_config_file()\n\n# Insert a new configuration. If a config already exists, replace=True\nezcfg.insert_config(config_dict={'b':[2,3,4]})\n\nezcfg.read_config_file()\n\n# Update the existing configuration. Always replace=True\n# Note: in the case when you want to update the nested configuration, use insert method with the whole nested config instead\nezcfg.update_config(key='a', value=5, replace=True)\n\nezcfg.read_config_file()\n\n# Delete a configuration. Input delete config\nezcfg.delete_config(key='b')\n\nezcfg.read_config_file()\n\n# Delete the configuration file. Input permanently delete\nezcfg.delete_config_file()\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This is an easy way to a configuration file in json format.",
    "version": "0.0.2",
    "split_keywords": [
        "['python3'",
        "'ez'",
        "'config']"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7d651a691c6ea4204787b704eda81f7e91ef8faade0efee1d4c7a3784ca778e",
                "md5": "cd794aac1b765ff391862f562a154501",
                "sha256": "ae822f5cb73646cbf2e5c7ccdc2097df999c23003055bb9173d46b1dcf680524"
            },
            "downloads": -1,
            "filename": "ezconfiguration-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cd794aac1b765ff391862f562a154501",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 5153,
            "upload_time": "2023-02-11T21:17:52",
            "upload_time_iso_8601": "2023-02-11T21:17:52.674272Z",
            "url": "https://files.pythonhosted.org/packages/c7/d6/51a691c6ea4204787b704eda81f7e91ef8faade0efee1d4c7a3784ca778e/ezconfiguration-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "255f05726e0b4f8062a8c02cf149a9fcca14621ef5ced0c4d39cc5c87a677677",
                "md5": "e3e8b3123074257b021b141a036147fd",
                "sha256": "a8f179cdda561e83e346a3d4b6524beb86a709958c91f6d4c33417ea9da46c57"
            },
            "downloads": -1,
            "filename": "ezconfiguration-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e3e8b3123074257b021b141a036147fd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 4876,
            "upload_time": "2023-02-11T21:17:54",
            "upload_time_iso_8601": "2023-02-11T21:17:54.842666Z",
            "url": "https://files.pythonhosted.org/packages/25/5f/05726e0b4f8062a8c02cf149a9fcca14621ef5ced0c4d39cc5c87a677677/ezconfiguration-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-11 21:17:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "datanooblol",
    "github_project": "ezconfiguration",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ezconfiguration"
}
        
Elapsed time: 0.05032s