{"id":16807554,"url":"https://github.com/tired-fox/tcfg","last_synced_at":"2026-05-07T13:32:15.949Z","repository":{"id":65949625,"uuid":"603248162","full_name":"Tired-Fox/tcfg","owner":"Tired-Fox","description":"Class based type checking configuration library","archived":false,"fork":false,"pushed_at":"2023-06-30T17:06:50.000Z","size":866,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T10:01:20.408Z","etag":null,"topics":["config","configuration","dynamic","json","python","toml","type-check","types","yaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tired-Fox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-17T23:55:15.000Z","updated_at":"2023-06-20T19:40:03.000Z","dependencies_parsed_at":"2023-09-25T02:09:43.139Z","dependency_job_id":null,"html_url":"https://github.com/Tired-Fox/tcfg","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":0.4,"last_synced_commit":"e835df6c30b102c60bb3edf94f4954105b06faf7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tired-Fox/tcfg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tired-Fox%2Ftcfg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tired-Fox%2Ftcfg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tired-Fox%2Ftcfg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tired-Fox%2Ftcfg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tired-Fox","download_url":"https://codeload.github.com/Tired-Fox/tcfg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tired-Fox%2Ftcfg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269828192,"owners_count":24481669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","configuration","dynamic","json","python","toml","type-check","types","yaml"],"created_at":"2024-10-13T09:54:05.869Z","updated_at":"2026-05-07T13:32:15.894Z","avatar_url":"https://github.com/Tired-Fox.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tcfg\n\n```python\nfrom tcfg import cfg, Option\n\n@cfg.json('cfg.json')\nclass Config:\n  # year must be a string. It has a default value of '2023'\n  year = '2023' \n  \n  # load must be a boolean. It has a default value of true\n  load = true \n  \n@cfg.toml('cfg.toml')\nclass Config2:\n  # year must be a string. Default to ''\n  year = str\n  \n  # load must be a boolean. Default to false\n  load = bool \n \n# Any config class will save to the specified file path unless overridden.\n# This includes config classes that are in other config classes.\n# This means you can have one master config object in your code that uses many config files.\n@cfg.yaml('nested.tml')\nclass Nested:\n  # Must be a bool. Defaults to false\n  enabled = false\n  \n  # Must be an int. Defaults to 8081\n  port = 8081 \n  \n  # Can specify multiple specific options.\n  scope = Option('public', 'private', default='private') \n  \n  # Must be a list\n  # Literals are defaults and types are used for valid element types. Literal types are also used in element types.\n  extensions = ['reload', dict]\n  \n  options = {\n    # wildcard type used for validation of extra values not specified as a key in this dict\n    '*': dict, \n    'open': false,\n    # can have recursive nesting\n    'deep_nesting': {\n      'random': int \n    }\n  }\n \n@cfg.yaml('cfg.yml')\nclass Config3:\n  nested = Nested # nested is a sub/nested config section\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftired-fox%2Ftcfg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftired-fox%2Ftcfg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftired-fox%2Ftcfg/lists"}