Title: Add support for environment variable configuration · Issue #634 · google/python-fire · GitHub
Open Graph Title: Add support for environment variable configuration · Issue #634 · google/python-fire
X Title: Add support for environment variable configuration · Issue #634 · google/python-fire
Description: Problem Currently, Python Fire CLI tools require all configuration to be passed via command-line arguments. For sensitive data or frequently used configurations, this can be cumbersome and insecure. Proposed Solution Add support for read...
Open Graph Description: Problem Currently, Python Fire CLI tools require all configuration to be passed via command-line arguments. For sensitive data or frequently used configurations, this can be cumbersome and insecure...
X Description: Problem Currently, Python Fire CLI tools require all configuration to be passed via command-line arguments. For sensitive data or frequently used configurations, this can be cumbersome and insecure...
Opengraph URL: https://github.com/google/python-fire/issues/634
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for environment variable configuration","articleBody":"### Problem\n\n\nCurrently, Python Fire CLI tools require all configuration to be passed via command-line arguments. For sensitive data or frequently used configurations, this can be cumbersome and insecure.\n\n### Proposed Solution\n\nAdd support for reading configuration values from environment variables with a naming convention like `FIRE_\u003cPARAM_NAME\u003e`.\n\n### Example Usage\n```markdown\npython import fire\n\ndef deploy(api_key, region='us-east-1'):\n \"\"\"Deploy application\"\"\"\n print(f\"Deploying to {region} with key {api_key}\")\n\nif __name__ == '__main__':\n fire.Fire(deploy)\n```\n\nCurrent usage (exposes secret):\n```markdown\npython deploy.py --api-key=secret123 --region=eu-west-1\n```\n\nProposed usage:\n```markdown\nexport FIRE_API_KEY=secret123\npython deploy.py --region=eu-west-1\n```\n\n### Benefits\n\n- Security: Sensitive data not exposed in process lists\n- Convenience: Reduce repetitive argument typing\n- DevOps: Better integration with container/cloud environments\n\n### Alternative Considered\nUsing config files, but environment variables are more standard in modern deployment workflows.\n\n\n","author":{"url":"https://github.com/markrahimi","@type":"Person","name":"markrahimi"},"datePublished":"2025-11-14T11:05:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/634/python-fire/issues/634"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7ead2a0e-b655-f69c-c56e-a1187856a52f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D49C:2BF14B:3BB55F:51F50F:6A4D9FDA |
| html-safe-nonce | cf196a3f74741fc1ea87ec3d9d57633c445b0e53b0e860da4f1751514d3af7d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDlDOjJCRjE0QjozQkI1NUY6NTFGNTBGOjZBNEQ5RkRBIiwidmlzaXRvcl9pZCI6IjIxMTc0OTA0MjQyNzY2ODg4NTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4d72c84ffef826e2bfc9db015b4466cfa17733cc9ed8117421a64e6a099c9e1c |
| hovercard-subject-tag | issue:3625126155 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/google/python-fire/634/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2eb5dc8a636f9e1fbb5004610e934dd0801c155daae738e967f1bf6ee1ee5784/google/python-fire/issues/634 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2eb5dc8a636f9e1fbb5004610e934dd0801c155daae738e967f1bf6ee1ee5784/google/python-fire/issues/634 |
| og:image:alt | Problem Currently, Python Fire CLI tools require all configuration to be passed via command-line arguments. For sensitive data or frequently used configurations, this can be cumbersome and insecure... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markrahimi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/google/python-fire git https://github.com/google/python-fire.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 82729529 |
| octolytics-dimension-repository_nwo | google/python-fire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82729529 |
| octolytics-dimension-repository_network_root_nwo | google/python-fire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f13faa65cccc9b729d674da83335d5dcfdfd193 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width