Skip to main content

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

Project description

ezconfig

This is a library that makes creating a configuration file easy.

Steps to follw:

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

# 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.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

ezconfiguration-0.0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ezconfiguration-0.0.1.tar.gz
  • Upload date:
  • Size: 4.5 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.1.tar.gz
Algorithm Hash digest
SHA256 2759e87176491a4d8fbe63be08f7b129f722c566a3e9a3864d4ee838aa71e12f
MD5 6f66a3e3b04f141f6e26ce57c3148313
BLAKE2b-256 8a3e318fc982557d027e2cb601ace48c320666a59570b79ff43cca9e77087e1c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ezconfiguration-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a19b9b17efb48a0dcc11daf2f90afaebcf83aa7dc39c3c6d262e9d9ea7175998
MD5 315d889cb31369b4f6ec73005022c8a6
BLAKE2b-256 803c77424f8b84b9ae3fd86db637034c67607d7638c27f6dfa9808053c1934a9

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