Skip to main content

Add your description here

Project description

An easy config library.

Types are enforced and can be parsed.

Create a default config:

class Config_(ConfigBase):
    version = VersionSetting(0, 1, 0, 'alpha', name='Version', level=Level.USER | Level.READ_ONLY)
    dev_mode = Setting[bool](True, 'Dev Mode', level=Level.USER)
    debug_mode = Setting[bool](True, 'Debug Mode', level=Level.USER_DEV)
    
    class ImageDownloading(ConfigBase):
        convert_image = Setting[bool](True, 'Convert Image')
        preferable_format = Setting[str]('JXL', 'Converted Images Format')
        max_threads = RangeSetting[int](1, multiprocessing.cpu_count(), 1, multiprocessing.cpu_count(), 'Max Download Threads')
        
    class Dirs(StdDirConfigBase):
        STD_DIR = StdDirConfigBase.STD_DIR
        
        IMG = 'images'
        LOL = 'lol/kek/s.json'
        
        class CACHE(DirConfigBase):
            JSON = 'cache.json'
            
    class Enums(EnumsConfig):
        class Foo(En):
            BAR = a()
            BAR2 = a()

Config = Config_()

Save and load Config.

Access any Setting's value with Config.ImageDownload.convert_image()

Specify Setting's units, name, description, level and type. Set value boundaries. Add dependency Settings. Set activity and visibility of Setting based on their dependencies.

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

easy_config_hub-0.4.2.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_config_hub-0.4.2-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file easy_config_hub-0.4.2.tar.gz.

File metadata

  • Download URL: easy_config_hub-0.4.2.tar.gz
  • Upload date:
  • Size: 47.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for easy_config_hub-0.4.2.tar.gz
Algorithm Hash digest
SHA256 4cbf2a3dd3a51f95bedeb0823fac9e16f1916c3654e5dba7d6965c2e9a64062f
MD5 9730845ccdbbd46b3e028dc4aadabf8f
BLAKE2b-256 6818721f81122cfc60aaf43937cd4d3cc12f7bcdb3fa8900dca5cce6ef3bcf9c

See more details on using hashes here.

File details

Details for the file easy_config_hub-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_config_hub-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e1dcd3dd9ca493ad9be491370beb9a42c28cac2eafd342e8fc3a048ad4cdbb73
MD5 47fb5159c4e787aa4ac2b6ab924ecfd5
BLAKE2b-256 d877fd7d1ea248c9eb65361bf9e353d804b4e012287c7b46f8de695a99139696

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page