{"id":15652095,"url":"https://github.com/yukinarit/envclasses","last_synced_at":"2025-06-24T06:37:50.056Z","repository":{"id":33156501,"uuid":"153477817","full_name":"yukinarit/envclasses","owner":"yukinarit","description":"envclasses is a library to map fields on dataclass object to environment variables.","archived":false,"fork":false,"pushed_at":"2022-10-18T13:33:59.000Z","size":153,"stargazers_count":32,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-15T08:26:54.039Z","etag":null,"topics":["dataclasses","env","environment-variables","python"],"latest_commit_sha":null,"homepage":"https://yukinarit.github.io/envclasses/envclasses.html","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/yukinarit.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}},"created_at":"2018-10-17T15:11:40.000Z","updated_at":"2025-04-07T19:42:25.000Z","dependencies_parsed_at":"2022-08-03T04:30:34.016Z","dependency_job_id":null,"html_url":"https://github.com/yukinarit/envclasses","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/yukinarit/envclasses","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fenvclasses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fenvclasses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fenvclasses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fenvclasses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yukinarit","download_url":"https://codeload.github.com/yukinarit/envclasses/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fenvclasses/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261622816,"owners_count":23186024,"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","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":["dataclasses","env","environment-variables","python"],"created_at":"2024-10-03T12:41:20.198Z","updated_at":"2025-06-24T06:37:50.026Z","avatar_url":"https://github.com/yukinarit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `envclasses`\n\n[![image](https://img.shields.io/pypi/v/envclasses.svg)](https://pypi.org/project/envclasses/)\n[![image](https://img.shields.io/pypi/pyversions/envclasses.svg)](https://pypi.org/project/envclasses/)\n![Test](https://github.com/yukinarit/envclasses/workflows/Test/badge.svg)\n\n*`envclasses` is a library to map fields on dataclass object to environment variables.*\n\n## Installation\n\n```bash\npip install envclasses\n```\n\n## Usage\n\nDeclare a class with `dataclass` and `envclass` decorators.\n\n```python\nfrom envclasses import envclass, load_env\nfrom dataclasses import dataclass\n\n@envclass\n@dataclass\nclass Foo:\n    v: int\n\nfoo = Foo(v=10)\nload_env(foo, prefix='foo')\nprint(foo)\n```\n\nRun the script\n\n```\n$ python foo.py\nFoo(v=10)\n```\n\nRun with environment variable\n\n```\n$ FOO_V=100 python foo.py\nFoo(v=100)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukinarit%2Fenvclasses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukinarit%2Fenvclasses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukinarit%2Fenvclasses/lists"}