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.0.tar.gz (47.4 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.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for easy_config_hub-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ea9be4357bcea5503d08903b913cf9f0c90c9b152fbef074ce19d9b0db52760c
MD5 f119d4660c4891cdb56f2eb94248921f
BLAKE2b-256 a7c4dae7c4bed18b3ee2efa6e5e637ea29987b9001bcdcd90efe6e20daa49fab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for easy_config_hub-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b39eccf84f58bda7107105380da0228de4562c7490e642786bc6c2fb82c85078
MD5 ac4e341e7047ac7eb3f7f9bfdd935035
BLAKE2b-256 9bc4de8591f011b6f48e4e78e4bfad832a42ab93a23f41e5755919a862a25b58

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