{"id":25617776,"url":"https://github.com/zachcheung/agenv","last_synced_at":"2026-07-09T12:31:26.846Z","repository":{"id":276044573,"uuid":"928038597","full_name":"zachcheung/agenv","owner":"zachcheung","description":"A simple Python package for securely loading environment variables from age encrypted file.","archived":false,"fork":false,"pushed_at":"2025-04-17T18:09:56.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-13T02:13:25.935Z","etag":null,"topics":["age","age-encryption","dotenv","env","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/agenv/","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/zachcheung.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-06T00:34:06.000Z","updated_at":"2025-04-17T18:08:34.000Z","dependencies_parsed_at":"2025-02-06T01:03:18.234Z","dependency_job_id":"735ad5a1-2cd1-4c7e-baa6-a695d040b65b","html_url":"https://github.com/zachcheung/agenv","commit_stats":null,"previous_names":["zachcheung/agenv"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/zachcheung/agenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachcheung%2Fagenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachcheung%2Fagenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachcheung%2Fagenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachcheung%2Fagenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zachcheung","download_url":"https://codeload.github.com/zachcheung/agenv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachcheung%2Fagenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35299762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"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":["age","age-encryption","dotenv","env","python"],"created_at":"2025-02-22T05:28:51.303Z","updated_at":"2026-07-09T12:31:26.826Z","avatar_url":"https://github.com/zachcheung.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# agenv\n\nA simple Python package for securely loading environment variables from age encrypted file.\n\n## Installation\n\n### Basic Installation (Decryption Only)\n\nIf you only need to decrypt files at runtime:\n\n```sh\npip install agenv\n```\n\n### With dotenv Support (Load Encrypted Environment Variables)\n\nIf you need to load encrypted environment variables automatically:\n\n```sh\npip install agenv[dotenv]\n```\n\n\u003e [!NOTE]\n\u003e [age](https://github.com/FiloSottile/age#installation) must be installed separately, as there is no native Python implementation of age.\n\n## Usage\n\n#### Loading Environment Variables\n\n```python\nfrom agenv import load_age_env\n\n# Decrypts and loads environment variables from a .env.age file\nload_age_env(\".env.age\")\n```\n\n#### Decrypting and Loading YAML Data\n\n```python\nimport yaml\nfrom agenv import decrypt\n\n# Decrypts the .age encrypted file and loads the content as a YAML object\nyaml_str = decrypt(\"database.yml.age\")\ndata = yaml.safe_load(yaml_str)\nprint(data)\n```\n\n### Identity Key Selection Order\n\nagenv determines the age identity key in the following order:\n\n1. The `identity` parameter provided to `load_age_env()`\n2. The `AGE_SECRET_KEY` environment variable\n3. The `AGE_SECRET_KEY_FILE` environment variable (path to key file)\n4. The default key file: `$HOME/.age/age.key`\n\nIf no valid identity is found, decryption will fail.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachcheung%2Fagenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzachcheung%2Fagenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachcheung%2Fagenv/lists"}