{"id":17095680,"url":"https://github.com/fako/dgconfig","last_synced_at":"2026-05-09T01:12:03.910Z","repository":{"id":70900001,"uuid":"161781866","full_name":"fako/dgconfig","owner":"fako","description":"A configuration class that allows configuration transfer and storage in JSON format","archived":false,"fork":false,"pushed_at":"2018-12-19T09:34:51.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-23T17:49:03.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/fako.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-14T12:29:15.000Z","updated_at":"2018-12-18T13:37:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"79f95f92-9a17-4a2b-a85d-fc11edebda00","html_url":"https://github.com/fako/dgconfig","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fako/dgconfig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako%2Fdgconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako%2Fdgconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako%2Fdgconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako%2Fdgconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fako","download_url":"https://codeload.github.com/fako/dgconfig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako%2Fdgconfig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32803650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-14T14:43:32.628Z","updated_at":"2026-05-09T01:12:03.875Z","avatar_url":"https://github.com/fako.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"dgconfig\n========\n\ndgconfig stands for *datagrowth configuration*. \nIt is a standalone package which was separated from the datagrowth code base. \nThe package contains utilities to work with configurations.\n\nConfigurations can be serialized to JSON dicts for storage and transfer (to for instance task servers).\nThey can also be passed on to other configuration instances in a parent/child like relationship.\nConfigurations have defaults which can be set when Django loads.\nThese defaults are namespaced to prevent name clashes across apps. \n\nUsually a request will set configurations during runtime to configure long running tasks.\nConfigurations can also be used as a *bag of properties*. \nThis is useful for Django models that have very wide configuration range.  \n\n\nInstallation\n------------  \n\n```\npip install git+https://github.com/fako/dgconfig\n```\n\n\nGetting started\n---------------\n\nIn your apps using the ready method of the AppConfig you can register default configurations\nusing the ```dgconfig.register_config_defaults``` function\n\n\n```python\nfrom django.apps import AppConfig\n\nfrom dgconfig import register_config_defaults\n\n\nclass YourAppConfig(AppConfig):\n    name = 'your_app'\n\n    def ready(self):\n        register_config_defaults(\"your_app\", {\n            \"your_configuration\": True,\n            \"very_special\": False\n        })\n```\n\nOnce defaults are specified you can create and use configurations with create_config.\n\n```python\nfrom dgconfig import create_config\n\nconfig = create_config(\"your_app\", {\n    \"very_special\": \"definitely!\"\n})\n\nprint(config.your_configuration)  \n# out: True \nprint(config.very_special)        \n# out: \"definitely!\"\n```\n\nAlternatively you can use a Django model field (dgconfig.ConfigurationField) to store and \nload configurations on your models. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffako%2Fdgconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffako%2Fdgconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffako%2Fdgconfig/lists"}