{"id":49233171,"url":"https://github.com/hashicorp/python-tfe","last_synced_at":"2026-04-24T13:03:30.894Z","repository":{"id":321194243,"uuid":"1042510788","full_name":"hashicorp/python-tfe","owner":"hashicorp","description":"HCP Terraform/Enterprise API Client/SDK in Python","archived":false,"fork":false,"pushed_at":"2026-04-24T09:28:58.000Z","size":1028,"stargazers_count":10,"open_issues_count":20,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-24T10:39:04.787Z","etag":null,"topics":["doormat-managed","python","sdk","terraform","terraform-cloud","terraform-enterprise"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pytfe/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashicorp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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-08-22T06:12:37.000Z","updated_at":"2026-04-24T09:39:19.000Z","dependencies_parsed_at":"2025-10-28T11:25:59.558Z","dependency_job_id":"d88d9bb2-6519-4494-a299-dc8a0541ba94","html_url":"https://github.com/hashicorp/python-tfe","commit_stats":null,"previous_names":["hashicorp/python-tfe"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hashicorp/python-tfe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fpython-tfe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fpython-tfe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fpython-tfe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fpython-tfe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashicorp","download_url":"https://codeload.github.com/hashicorp/python-tfe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fpython-tfe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32224413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T10:26:35.452Z","status":"ssl_error","status_checked_at":"2026-04-24T10:25:27.643Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["doormat-managed","python","sdk","terraform","terraform-cloud","terraform-enterprise"],"created_at":"2026-04-24T13:03:26.082Z","updated_at":"2026-04-24T13:03:30.889Z","avatar_url":"https://github.com/hashicorp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HCP Terraform and Terraform Enterprise **Python** Client (pyTFE)\n\n[![PyPI](https://img.shields.io/pypi/v/pytfe.svg)](https://pypi.org/project/pytfe/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/pytfe.svg)](https://pypi.org/project/pytfe/)\n[![Test](https://github.com/hashicorp/python-tfe/actions/workflows/test.yml/badge.svg)](https://github.com/hashicorp/python-tfe/actions/workflows/test.yml)\n[![License](https://img.shields.io/github/license/hashicorp/python-tfe.svg)](./LICENSE)\n[![Issues](https://img.shields.io/github/issues/hashicorp/python-tfe.svg)](https://github.com/hashicorp/python-tfe/issues)\n\nThe official **Python** API client for [HCP Terraform and Terraform Enterprise](https://www.hashicorp.com/products/terraform).\n\nThis client targets the [HCP Terraform V2 API](https://developer.hashicorp.com/terraform/cloud-docs/api-docs).\nAs Terraform Enterprise is the self-hosted distribution of HCP Terraform, this client supports both **HCP Terraform** and **Terraform Enterprise** use cases. In this repository and API, we refer to the platform generically as *Terraform Enterprise* unless a feature is explicitly called out as only supported in one or the other (rare).\n\n## Version Information\n\nWe follow Semantic Versioning. During the initial alpha period we use `0.y.z`:\n- **Minor** (`0.y.z → 0.(y+1).z`): new, backwards-compatible features and enhancements.\n- **Patch** (`0.y.z → 0.y.(z+1)`): bug fixes and performance improvements.\n- Occasionally, a function signature change that fixes incorrect behavior may appear in a minor version.\n\n## Example Usage\n\nConstruct a new **pyTFE** client, then use the resource services on the client to access different parts of the Terraform Enterprise API. The following example lists all organizations.\n\n### (Recommended) Using explicit config\n\n```python\nfrom pytfe import TFEClient, TFEConfig\n\nconfig = TFEConfig(\n    address=\"https://tfe.local\",\n    token=\"insert-your-token-here\",\n    timeout=30.0,\n    user_agent_suffix=\"example-app/0.1 pytfe/0.1\",\n)\n\nclient = TFEClient(config)\n\norgs = client.organizations.list()\nfor org in orgs.items:\n    print(org.name)\n```\n\n### Using the default config with environment variables\n\nThe default configuration reads the `TFE_ADDRESS` and `TFE_TOKEN` environment variables.\n\n1. `TFE_ADDRESS` — URL of an HCP Terraform or Terraform Enterprise instance. Example: `https://tfe.local`  \n2. `TFE_TOKEN` — An [API token](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/api-tokens) for the HCP Terraform or Terraform Enterprise instance.\n\n\nEnvironment variables are used as a fallback when `address` or `token` are not provided explicitly:\n\n#### Using the default configuration\n```python\nfrom pytfe import TFEClient, TFEConfig\n\n# Equivalent to providing no values; falls back to env vars if set.\nclient = TFEClient(TFEConfig())\norgs = client.organizations.list()\nfor org in orgs.items:\n    print(org.name)\n```\n\n#### When host or token is empty\n```python\nfrom pytfe import TFEClient, TFEConfig\n\nconfig = TFEConfig(address=\"\", token=\"\")\nclient = TFEClient(config)\n\norgs = client.organizations.list()\nfor org in orgs.items:\n    print(org.name)\n```\n\n## Documentation\n\n- API reference and guides (SDK): **coming soon**  \n- Terraform Enterprise API: https://developer.hashicorp.com/terraform/enterprise/api-docs\n\n## Examples\n\nSee the [`examples/`](./examples) directory for runnable snippets covering common workflows (workspaces, variables, configuration versions, runs/plans/applies, state, agents).\n\n## Running tests\n\nSee [`TESTS.md`](./docs/TESTS.md). Typical flow:\n\n```bash\npip install -e .[dev]\nmake test\n```\n\n## Issues and Contributing\n\nSee [`CONTRIBUTING.md`](./docs/CONTRIBUTING.md). We welcome issues and pull requests.\n\n## Releases\n\nSee [`RELEASES.md`](./docs/RELEASES.md).\n\n## License\n\nThis project is licensed under the **MPL-2.0**. See [`LICENSE`](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fpython-tfe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashicorp%2Fpython-tfe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fpython-tfe/lists"}