Skip to main content

This is an easy way to a configuration file in json format.

Project description

ezconfiguration

PyPI Latest Release Downloads Repo Size License Release Date

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)

# pip  
pip install ezconfiguration  

How to use ezconfiguration

Steps to follow:

# 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()

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

ezconfiguration-0.0.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

ezconfiguration-0.0.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file ezconfiguration-0.0.2.tar.gz.

File metadata

  • Download URL: ezconfiguration-0.0.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for ezconfiguration-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a8f179cdda561e83e346a3d4b6524beb86a709958c91f6d4c33417ea9da46c57
MD5 e3e8b3123074257b021b141a036147fd
BLAKE2b-256 255f05726e0b4f8062a8c02cf149a9fcca14621ef5ced0c4d39cc5c87a677677

See more details on using hashes here.

File details

Details for the file ezconfiguration-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ezconfiguration-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ae822f5cb73646cbf2e5c7ccdc2097df999c23003055bb9173d46b1dcf680524
MD5 cd794aac1b765ff391862f562a154501
BLAKE2b-256 c7d651a691c6ea4204787b704eda81f7e91ef8faade0efee1d4c7a3784ca778e

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