{ "info": { "author": "James Fotherby", "author_email": "fotherby1@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "## Pyterprise\n\nThis is a very simple Python Client Library for Terraform Enterprise with helper functions to abstract usage of the HTTP \nAPI and handle errors in a normalized fashion. \nThe methods included in this library generally map 1 to 1 in terms of function naming conventions to \n[terraform enterprise documentation](https://www.terraform.io/docs/cloud/api/), so please review the available methods if you are uncertain on this library's usage.\n\n### Installation:\nThis module can be installed via pip3, this library is compatible and can used be with python2 but is not available through PyPa for 2.7 versions.\n\n`pip3 install --user pyterprise`\n\n### Usage:\n\nFirst import the module and authenticate using the init method, you can retrieve a token from the terraform enterprise UI.\n```python\nimport pyterprise\n\n\ntfe_token = 'TOKENHERE'\nclient = pyterprise.Client()\n\n# Supply your token as a parameter and the url for the terraform enterprise server.\nclient.init(token=tfe_token, url='https://example-host.com')\n```\n\n\nOnce initialized, you should be able to run various methods for accessing the API, most of the methods are basic python implementations \nof http requests that will simply return the json response content as a string.\n\nExamples:\n```python\n\n# Get all most recent workspace statefiles to stdout.\nworkspaces = client.list_workspace_ids('awesome-organization')\nfor workspace in workspaces:\n print(client.get_workspace_current_statefile(workspace_id=workspace))\n\n# Create a workspace.\nclient.create_workspace(organization='test-org', workspace_name='test-workspace')\n\n# Update Workspace: Include any params to update, exclude any to not change.\nupdate_params = {\n \"name\": \"test-workspace\",\n \"terraform_version\": \"0.12.1\",\n \"working-directory\": \"test/awesome-directory\",\n \"vcs-repo\": {\n \"identifier\": \"github/Terraform-Testing\",\n \"branch\": \"test\",\n \"ingress-submodules\": False,\n \"oauth-token-id\": \"ot-XXXXXXXXX\"\n }\n }\nclient.update_workspace(organization='test-org', update_params=update_params)\n\n\n# Set a workspace environmental variable in a given workspace id.\nclient.create_workspace_variable('test-workspace', key='TF_LOG', value='DEBUG')\n\n# Remove the created and modified workspace.\nclient.delete_workspace(organization='test-org', workspace_name='test-workspace')\n```\n\nPlease consult module contents or [terraform enterprise api documentation](https://www.terraform.io/docs/cloud/api/) for\navailable methods most should be covered within this module and should have near identical function names compared to \nthe REST documentation.\n\n\n### API Coverage/Helper Methods\n\n##### [Workspaces](https://www.terraform.io/docs/enterprise/api/workspaces.html)\n- [x] list workspaces\n- [x] create workspace\n- [x] delete workspace\n- [x] list workspace ids\n- [x] get workspace non confirmed runs\n- [x] get workspace current statefile\n- [x] show workspace\n- [x] update workspace\n\n##### [Runs](https://www.terraform.io/docs/enterprise/api/run.html)\n- [x] apply terraform run \n- [x] force execute run\n- [x] run terraform workspace (destroy option included)\n- [x] get workspace runs\n- [x] discard run\n- [x] cancel runs\n\n##### [Teams](https://www.terraform.io/docs/enterprise/api/teams.html)\n- [x] show user\n- [x] get teams\n- [x] create team\n- [x] show team information\n- [x] delete team\n\n##### [Variables](https://www.terraform.io/docs/enterprise/api/variables.html)\n- [x] create workspace variable\n- [x] list variables\n- [x] delete workspace variable\n\n##### Other\n- [x] get terraform plan\n- [x] list organizations\n- [x] show organization\n- [x] update organization\n- [x] destroy organization\n- [x] create organization\n\n### Contributions\nContributions are extremely appreciated! Please feel free to do so to improve this client library. I created this library\nas at the time there was not a simple python library for performing basic administrative tasks in Terraform Enterprise.\n\n*Disclaimer*: *This Client Library is considered in an 'alpha' state at this time as unit-testing is yet to be implemented. Please use at your own risk*\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Fotherbyy/PyTerprise", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyterprise", "package_url": "https://pypi.org/project/pyterprise/", "platform": "", "project_url": "https://pypi.org/project/pyterprise/", "project_urls": { "Homepage": "https://github.com/Fotherbyy/PyTerprise" }, "release_url": "https://pypi.org/project/pyterprise/0.0.10/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "A small client library for the Terraform Enterprise REST API.", "version": "0.0.10" }, "last_serial": 5858621, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5c0bfbcc09fa19d22a4b24d60b98194c", "sha256": "e06dd85c92731f73f59bbd22345a2351801c8e67468d9a776ab6847c6c4c934e" }, "downloads": -1, "filename": "pyterprise-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5c0bfbcc09fa19d22a4b24d60b98194c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4540, "upload_time": "2019-07-31T18:06:20", "url": "https://files.pythonhosted.org/packages/ed/b3/02d621fc389e4fd884e48655ed7165273e90c0d11aed173841fb373120fe/pyterprise-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06756694e6b1663927174da9e0cb12ba", "sha256": "8100818253aaaa0e84facb07a68aa004817336d1c79d471bceacca6ab5d98daa" }, "downloads": -1, "filename": "pyterprise-0.0.1.tar.gz", "has_sig": false, "md5_digest": "06756694e6b1663927174da9e0cb12ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3088, "upload_time": "2019-07-31T18:06:22", "url": "https://files.pythonhosted.org/packages/57/05/56116624e1ab1f26bf92631ca9622df81e492d1d648acd5281c18174e6b9/pyterprise-0.0.1.tar.gz" } ], "0.0.10": [ { "comment_text": "", "digests": { "md5": "f049212b7c1068b8efb7b3e33c5de4cd", "sha256": "87772d3d8b3c5365bf593138b3db714a5ccbfd231268ec74495b300659b73c73" }, "downloads": -1, "filename": "pyterprise-0.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "f049212b7c1068b8efb7b3e33c5de4cd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9513, "upload_time": "2019-09-19T20:39:03", "url": "https://files.pythonhosted.org/packages/8b/85/caf82a56f4606559c8fc94bbdd91e8ef828dab798497549bd8ea55e4ece2/pyterprise-0.0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39cd74b2fde34cd93e4db4fbb396bbd4", "sha256": "00e59846e0e4382ea2381f52d6f88caedc59cd2e140776211a5b84faed9665a9" }, "downloads": -1, "filename": "pyterprise-0.0.10.tar.gz", "has_sig": false, "md5_digest": "39cd74b2fde34cd93e4db4fbb396bbd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7069, "upload_time": "2019-09-19T20:39:04", "url": "https://files.pythonhosted.org/packages/d0/a7/9dbfb83a972079afe533387df3f3526569338f5923595e1479e6a2e7aba7/pyterprise-0.0.10.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "1ef2d421b9b216a2b7e85a6c212bfa04", "sha256": "9c3d62b95495d221ec92e92df2917c59aba00afa96aa623d419c350bc48af3ca" }, "downloads": -1, "filename": "pyterprise-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1ef2d421b9b216a2b7e85a6c212bfa04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3391, "upload_time": "2019-07-31T23:08:12", "url": "https://files.pythonhosted.org/packages/ef/5f/5a2c429d6f93378310f788186ccd901cb5b29c9e2b391e6bebeba32dbed6/pyterprise-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "fc5a86c897f8528c78b3b0f59d7bc20c", "sha256": "b4b62490179ee026e5030661af7962d43da7125dfcddfe7c1683763eb107a9d8" }, "downloads": -1, "filename": "pyterprise-0.0.3.tar.gz", "has_sig": false, "md5_digest": "fc5a86c897f8528c78b3b0f59d7bc20c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3397, "upload_time": "2019-08-01T18:50:10", "url": "https://files.pythonhosted.org/packages/47/70/d01c62ebdb9d2763eed1af9bb1186fbeb18e8c680cd99c251444979cabdb/pyterprise-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8dab86b3a5137c34bbeaf8b131de0ddd", "sha256": "fd0c3a699d10c40f01881cfabd42c0fafe41a41ce0fc47312c74228004db4685" }, "downloads": -1, "filename": "pyterprise-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8dab86b3a5137c34bbeaf8b131de0ddd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3397, "upload_time": "2019-08-01T19:30:46", "url": "https://files.pythonhosted.org/packages/16/af/c4949262840c0871cc81d9814ca07950066c24cab8be1991cf2cb897d97f/pyterprise-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "f75a1dedd998af9a8715829d1bf64b53", "sha256": "fb70c6bb9d5dd3fe791ed9b0fe867d2be7d8a429f3e0344e4b632902534c5be4" }, "downloads": -1, "filename": "pyterprise-0.0.5.tar.gz", "has_sig": false, "md5_digest": "f75a1dedd998af9a8715829d1bf64b53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3452, "upload_time": "2019-08-01T22:59:37", "url": "https://files.pythonhosted.org/packages/7a/9a/82ffd5cc476760992900c62ea7ecbd9f8707e3363df487996f4b75102924/pyterprise-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "a781f5020f328c2594b2b0be947e5924", "sha256": "ddc733d2a9bedca6298f851ca30fe3539698778c832af67d0180d998d77a8b91" }, "downloads": -1, "filename": "pyterprise-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a781f5020f328c2594b2b0be947e5924", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4513, "upload_time": "2019-08-08T00:06:23", "url": "https://files.pythonhosted.org/packages/b4/97/bcc8d03e57d1e37485065470c593ecb55ab18ff2b4dbdb27e37cf36d10bc/pyterprise-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "5d752cd4d8a734ee8d046222b9f7dfd9", "sha256": "03ae49674c954f9772676ba55f0cc3f54951500e5382e806297c831473c665e3" }, "downloads": -1, "filename": "pyterprise-0.0.7.tar.gz", "has_sig": false, "md5_digest": "5d752cd4d8a734ee8d046222b9f7dfd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4528, "upload_time": "2019-08-08T00:17:26", "url": "https://files.pythonhosted.org/packages/92/d6/54d1f8a8524fc1902ba6ae157f881757987bec0ab3f16991c4b509e67e12/pyterprise-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "c5daab4853d3597abf074ac6dbee190d", "sha256": "3d5d27449af979682d5d3d899c84e49599d3afdbcf2b5aa955e71585de3b7d79" }, "downloads": -1, "filename": "pyterprise-0.0.8.tar.gz", "has_sig": false, "md5_digest": "c5daab4853d3597abf074ac6dbee190d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4791, "upload_time": "2019-08-08T00:27:33", "url": "https://files.pythonhosted.org/packages/04/f9/f5b82ce906acdec7eb60624f519015f08b92d9bdb58c063c76d2c418d79c/pyterprise-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "f2766fa960dfec956be769fc5815a77a", "sha256": "730e193d7d6ac011844de945b87d4e9c2a4fd23bdb9868be3dbd68b3c033da93" }, "downloads": -1, "filename": "pyterprise-0.0.9.tar.gz", "has_sig": false, "md5_digest": "f2766fa960dfec956be769fc5815a77a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7021, "upload_time": "2019-08-20T00:30:00", "url": "https://files.pythonhosted.org/packages/d6/6b/32e3cb8164ececc9d3c37ae5e4dd258e4c67a07057a9448fd4ddde4367da/pyterprise-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f049212b7c1068b8efb7b3e33c5de4cd", "sha256": "87772d3d8b3c5365bf593138b3db714a5ccbfd231268ec74495b300659b73c73" }, "downloads": -1, "filename": "pyterprise-0.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "f049212b7c1068b8efb7b3e33c5de4cd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9513, "upload_time": "2019-09-19T20:39:03", "url": "https://files.pythonhosted.org/packages/8b/85/caf82a56f4606559c8fc94bbdd91e8ef828dab798497549bd8ea55e4ece2/pyterprise-0.0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39cd74b2fde34cd93e4db4fbb396bbd4", "sha256": "00e59846e0e4382ea2381f52d6f88caedc59cd2e140776211a5b84faed9665a9" }, "downloads": -1, "filename": "pyterprise-0.0.10.tar.gz", "has_sig": false, "md5_digest": "39cd74b2fde34cd93e4db4fbb396bbd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7069, "upload_time": "2019-09-19T20:39:04", "url": "https://files.pythonhosted.org/packages/d0/a7/9dbfb83a972079afe533387df3f3526569338f5923595e1479e6a2e7aba7/pyterprise-0.0.10.tar.gz" } ] }