{ "info": { "author": "Thomas Wiebe", "author_email": "thomas@gridscale.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "This the official Python wrapper for gridscale's [API](https://gridscale.io/en//api-documentation/index.html). Allowing you to manage your own infrastructure from your own applications.\n\n# Prerequisites\n\nFirst, the Python programming language needs to be installed. This can be done by using the [official downloads](https://www.python.org/downloads/) page.\n\nOnce done, download and install via [pypi](https://pypi.org)\n\n`pip3 install gs_api_client`\n\n# Introduction\nFirst, you will need your [API credentials](https://my.gridscale.io/Easy/APIs/).\n\nIn the [examples.py](examples/examples.py) replace the `AUTH_TOKEN` & `USER_UUID` with your credentials.\n\n# Authentication\n\nThese imports and configs need to be setup before other commands can be run. If you do not need synchronous or asynchronous requests, you can leave out `SyncGridscaleApiClient` & `GridscaleApiClient` respectively.\n\n```python\nfrom gs_api_client import Configuration\nfrom gs_api_client import SyncGridscaleApiClient, GridscaleApiClient\n\n# Initiate the configuration\napi_config = Configuration()\napi_config.api_key['X-Auth-Token'] = \"AUTH_TOKEN\"\napi_config.api_key['X-Auth-UserId'] = \"USER_UUID\"\n\n# Setup the client\nsync_api = SyncGridscaleApiClient(configuration=api_config)\nasync_api = GridscaleApiClient(configuration=api_config)\n```\n\n# Async vs Sync Clients\n\nWe provide two clients `SyncGridscaleApiClient` & `GridscaleApiClient`. gridscale's API performs long running operations asynchronously in the background while returning a 202 response code, with the request identifier in the `x-request-id` response header.\n\nThe main differences are:\n- `GridscaleApiClient` exposes bare gridscale API functionality, while `SyncGridscaleApiClient` adds a convenience layer on top.\n- `SyncGridscaleApiClient` determines whether the request is sync or async.\n- Makes asynchronous operations behave as if they were synchronous:\n - The client will block until the request has finished, successful or not.\n - Throws an `AsynchronousApiError` exception, in the case of failure.\n- With most `PATCH` and `POST` requests, the synchronous client will return the resulting object instead of an empty body or just the reference.\n\n# Debugging\n\nAdding this line below, will output further information for debugging\n\n```Python\napi_config.debug = True\n```\n\n# Access response header\n\nAdding `http_info=True` when instantiating the client, return value will be a tuple of response, response code and response headers (dict).\n\n```Python\nsync_api = SyncGridscaleApiClient(http_info=True)\nasync_api = GridscaleApiClient(http_info=True)\n```\n\n# Basic request examples\n from pprint import pprint\n\n # Get all Servers\n pprint(async_api.get_servers())\n\n # Create a Server\n pprint(async_api.create_server({'name':'test', 'cores': 1, 'memory': 2}))\n\n # Update a Server\n pprint(async_api.update_server('', {\n 'name':'windows production Server',\n 'cores': 2,\n 'memory': 4\n }))\n\n # Delete a Server\n pprint(client.delete_storage(''))\n\n# Exhaustive list of all functions\n\nInside the [examples.py](examples/examples.py) file, you can see some example requests to get your started. All endpoints are fully documented in our [API](https://gridscale.io/en//api-documentation/index.html)\n\n## Requests\n\n- get_request\n\n## Locations\n\n- get_locations\n- get_location\n- get_location_ips\n- get_location_isoimages\n- get_location_networks\n- get_location_servers\n- get_location_snapshots\n- get_location_storages\n- get_location_templates\n\n## Servers\n\n- get_servers\n- get_server\n- create_server\n- update_server\n- delete_server\n- get_deleted_servers\n- get_server_events\n- get_server_metrics\n- get_server_power\n- update_server_power\n- server_power_shutdown\n\n### Server Relations\n\n- get_server_linked_ip\n- get_server_linked_ips\n- get_server_linked_isoimage\n- get_server_linked_isoimages\n- get_server_linked_network\n- get_server_linked_networks\n- get_server_linked_storage\n- get_server_linked_storages\n- link_ip_to_server\n- link_isoimage_to_server\n- link_network_to_server\n- link_storage_to_server\n- update_server_linked_isoimage\n- update_server_linked_network\n- update_server_linked_storage\n- unlink_ip_from_server\n- unlink_isoimage_from_server\n- unlink_network_from_server\n- unlink_storage_from_server\n\n## Storages\n\n- get_storages\n- get_storage\n- create_storage\n- delete_storage\n- get_deleted_storages\n- storage_rollback\n- update_storage\n- get_storage_events\n\n### Snapshots\n\n- get_snapshots\n- get_snapshot\n- create_snapshot\n- delete_snapshot\n- get_snapshot_schedule\n- get_snapshot_schedules\n- update_snapshot\n- create_snapshot_schedule\n- update_snapshot_schedule\n- delete_snapshot_schedule\n- snapshot_export_to_s3\n- get_deleted_snapshots\n\n### Templates\n\n- get_templates\n- get_template\n- create_template\n- update_template\n- delete_template\n- get_template_events\n- get_deleted_templates\n\n### Marketplace Templates\n\n- get_marketplace_templates\n- get_marketplace_template\n- create_marketplace_template\n- update_marketplace_template\n- delete_marketplace_template\n- get_marketplace_template_events\n\n## Networks\n\n- get_network\n- get_networks\n- create_network\n- update_network\n- delete_network\n- get_network_events\n- get_deleted_networks\n\n## IPs\n\n- get_ips\n- get_ip\n- create_ip\n- update_ip\n- delete_ip\n- get_ip_events\n- get_deleted_ips\n\n## Load Balancers\n\n- get_loadbalancers\n- get_loadbalancer\n- create_loadbalancer\n- update_loadbalancer\n- delete_loadbalancer\n- get_loadbalancer_events\n\n## PaaS\n\n- get_paas_services\n- get_paas_service\n- create_paas_service\n- update_paas_service\n- delete_paas_service\n- get_paas_service_metrics\n- get_paas_security_zones\n- get_paas_security_zone\n- create_paas_security_zone\n- update_paas_security_zone\n- delete_paas_security_zone\n- get_paas_service_templates\n- get_deleted_paas_services\n\n## Firewalls\n\n- get_firewalls\n- get_firewall\n- create_firewall\n- update_firewall\n- delete_firewall\n- get_firewall_events\n\n## Iso Images\n\n- get_isoimages\n- get_isoimage\n- create_isoimage\n- update_isoimage\n- delete_isoimage\n- get_isoimage_events\n- get_deleted_isoimages\n\n## Labels\n\n- get_labels\n- get_label\n- create_label\n- delete_label\n\n## SSH Keys\n\n- get_ssh_keys\n- get_ssh_key\n- create_ssh_key\n- update_ssh_key\n- delete_ssh_key\n- get_ssh_key_events\n\n## Events\n\n- event_get_all\n\n## Object Storage\n\n- get_buckets\n- get_access_keys\n- get_access_key\n- create_access_key\n- delete_access_key\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/gridscale/gridscale_api_client_python", "keywords": "API Client", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gs-api-client", "package_url": "https://pypi.org/project/gs-api-client/", "platform": "", "project_url": "https://pypi.org/project/gs-api-client/", "project_urls": { "Homepage": "https://github.com/gridscale/gridscale_api_client_python" }, "release_url": "https://pypi.org/project/gs-api-client/1.0.2/", "requires_dist": [ "urllib3 (>=1.15)", "six (>=1.10)", "certifi", "python-dateutil" ], "requires_python": "", "summary": "Official Python idiomatic client for gridscale services", "version": "1.0.2" }, "last_serial": 5850717, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "f7f3ae92e29460158e050b3ee821684b", "sha256": "bef6acad4b078763bf50c8bfa5eb7d7189214de735fbcf684c08b118e1e79c95" }, "downloads": -1, "filename": "gs_api_client-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f7f3ae92e29460158e050b3ee821684b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2007320, "upload_time": "2019-07-12T13:09:35", "url": "https://files.pythonhosted.org/packages/fd/72/c1528e792c11a244b217fce23f0316187c79e8a6b609642863079676fc64/gs_api_client-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad39b5d155590af234fe71911c6cd76f", "sha256": "6b83fe27579737d914af84f972daf0fc77e0898a6ff32d50fd998e872695aace" }, "downloads": -1, "filename": "gs_api_client-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ad39b5d155590af234fe71911c6cd76f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 319453, "upload_time": "2019-07-12T13:09:38", "url": "https://files.pythonhosted.org/packages/61/3f/a996fb6a0f9e74408a1954c0d8507f4d31ff82f81682a1d70dc35e39d3bf/gs_api_client-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "37e130a551e9e86359162a0eac1b6fb5", "sha256": "69b208afa70534fd4c9a43f0524cb3a82211264f44ee822d2ff4b91247597072" }, "downloads": -1, "filename": "gs_api_client-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "37e130a551e9e86359162a0eac1b6fb5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2071699, "upload_time": "2019-09-18T14:47:23", "url": "https://files.pythonhosted.org/packages/03/88/b3a8f4def35683d38747fa8f64169d30ee00f7cbc40930457b6cf9883a90/gs_api_client-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f3f234e3428c9efa8dd389aefdce48b", "sha256": "cad1c58b1cfd0f3598ca0110380071dc9ec299cbb9cd7b4f55c58dc2945abd5d" }, "downloads": -1, "filename": "gs_api_client-1.0.2.tar.gz", "has_sig": false, "md5_digest": "5f3f234e3428c9efa8dd389aefdce48b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 334489, "upload_time": "2019-09-18T14:47:26", "url": "https://files.pythonhosted.org/packages/5d/cf/3f7c5fc2357df2e0aafdbeb1284d54d4d682365b82080fdc9617d0c67c84/gs_api_client-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "37e130a551e9e86359162a0eac1b6fb5", "sha256": "69b208afa70534fd4c9a43f0524cb3a82211264f44ee822d2ff4b91247597072" }, "downloads": -1, "filename": "gs_api_client-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "37e130a551e9e86359162a0eac1b6fb5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2071699, "upload_time": "2019-09-18T14:47:23", "url": "https://files.pythonhosted.org/packages/03/88/b3a8f4def35683d38747fa8f64169d30ee00f7cbc40930457b6cf9883a90/gs_api_client-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f3f234e3428c9efa8dd389aefdce48b", "sha256": "cad1c58b1cfd0f3598ca0110380071dc9ec299cbb9cd7b4f55c58dc2945abd5d" }, "downloads": -1, "filename": "gs_api_client-1.0.2.tar.gz", "has_sig": false, "md5_digest": "5f3f234e3428c9efa8dd389aefdce48b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 334489, "upload_time": "2019-09-18T14:47:26", "url": "https://files.pythonhosted.org/packages/5d/cf/3f7c5fc2357df2e0aafdbeb1284d54d4d682365b82080fdc9617d0c67c84/gs_api_client-1.0.2.tar.gz" } ] }