Skip to main content

A json base config lib.

Project description

ConfigJ

A json base config lib.

Usage

from configj import ConfigJ, AbstractConfig

class ConfigData(AbstractConfig):
    config1: str = 'Default Value'
    config2: int = 166

cj = ConfigJ('config.json', ConfigData)
# Type hint
config: ConfigData

# when file not exists, create default config file and return it.
config = cj.load()
print(config.config1)  # Default Value

config.config2 = 1  # set value
cj.save(config)  # save config to 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

ConfigJ-1.0.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

ConfigJ-1.0.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file ConfigJ-1.0.0.tar.gz.

File metadata

  • Download URL: ConfigJ-1.0.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ConfigJ-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4c2263afa593e6b81833b3403ffcaf95c47a127e35a6d1454f067b652dfdc22d
MD5 fa326866a0dfb7948e3b17b9f3a847ff
BLAKE2b-256 537761ef14eb8a109f1392d37c661b9893530eb524d90a6ccf98032ef9b5080a

See more details on using hashes here.

File details

Details for the file ConfigJ-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ConfigJ-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ConfigJ-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b25492cae239d745f9a3751ac94f806cd9244489f3f86ef055147ceb8390636
MD5 53a7b73b5f622b13fab4e31478ff277c
BLAKE2b-256 b562216a2ef3eaee69cd3d4f342c4479afd603652878f910acb06c1e83fd6a6d

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