Name | ibm-vpc JSON |
Version |
0.30.0
JSON |
| download |
home_page | None |
Summary | Python client library for IBM Cloud ibm-vpc Services |
upload_time | 2025-07-11 14:48:00 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
ibm
cloud
ibm cloud services
vpc
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[](https://github.com/IBM/vpc-python-sdk/actions/workflows/ci.yml)
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/semantic-release/semantic-release)
# IBM Cloud Virtual Private Cloud (VPC) Python SDK Version 0.30.0
Python client library to interact with various [IBM Cloud Virtual Private Cloud (VPC) Service APIs](https://cloud.ibm.com/apidocs/vpc).
This SDK uses [Semantic Versioning](https://semver.org), and as such there may be backward-incompatible changes for any new `0.y.z` version.
## Table of Contents
<!--
The TOC below is generated using the `markdown-toc` node package.
https://github.com/jonschlinkert/markdown-toc
You should regenerate the TOC after making changes to this file.
npx markdown-toc -i README.md
-->
<!-- toc -->
- [Overview](#overview)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Using the SDK](#using-the-sdk)
- [Setting up VPC service](#setting-up-vpc-service)
- [Questions](#questions)
- [Issues](#issues)
- [Open source @ IBM](#open-source--ibm)
- [Contributing](#contributing)
- [License](#license)
<!-- tocstop -->
## Overview
The IBM Cloud Virtual Private Cloud (VPC) Python SDK allows developers to programmatically interact with the following
IBM Cloud services:
Service Name | Imported Class Name
--- | ---
[VPC](https://cloud.ibm.com/apidocs/vpc) | VpcV1
## Prerequisites
[ibm-cloud-onboarding]: https://cloud.ibm.com/registration
* An [IBM Cloud][ibm-cloud-onboarding] account.
* An IAM API key to allow the SDK to access your account. Create an apikey [here](https://cloud.ibm.com/iam/apikeys).
* Python version 3.8 or above.
## Installation
To install, use `pip` or `easy_install`:
```bash
pip install --upgrade "ibm-vpc>=0.30.0"
```
or
```bash
easy_install --upgrade "ibm-vpc>=0.30.0"
```
## Using the SDK
For general SDK usage information, see the [IBM Cloud SDK Common README](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md).
## Setting up VPC service
```python
from ibm_vpc import VpcV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from ibm_cloud_sdk_core import ApiException
authenticator = IAMAuthenticator("YOUR_IBMCLOUD_API_KEY")
service = VpcV1(authenticator=authenticator)
# to change the service URL to the United Kingdom region
service.set_service_url(VpcV1.get_service_url_for_region("eu-gb"))
# Listing VPCs
print("List VPCs")
try:
vpcs = service.list_vpcs().get_result()['vpcs']
except ApiException as e:
print("List VPC failed with status code " + str(e.code) + ": " + e.message)
for vpc in vpcs:
print(vpc['id'], "\t", vpc['name'])
# Listing Subnets
print("List Subnets")
try:
subnets = service.list_subnets().get_result()['subnets']
except ApiException as e:
print("List subnets failed with status code " + str(e.code) + ": " + e.message)
for subnet in subnets:
print(subnet['id'], "\t", subnet['name'])
# Listing Instances
print("List Instances")
try:
instances = service.list_instances().get_result()['instances']
except ApiException as e:
print("List instances failed with status code " + str(e.code) + ": " + e.message)
for instance in instances:
print(instance['id'], "\t", instance['name'])
instanceId = instances[0]['id']
instanceName = instances[0]['name']
# Updating Instance
print("Updated Instance")
try:
newInstanceName = instanceName + "-1"
instance = service.update_instance(
id=instanceId,
name=newInstanceName,
).get_result()
except ApiException as e:
print("Update instance failed with status code " + str(e.code) + ": " + e.message)
print(instance['id'], "\t", instance['name'])
```
## Questions
If you have difficulties using this SDK or you have a question about the IBM Cloud services,
ask a question at [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-cloud).
## Issues
If you encounter an issue with the project, you are welcome to submit a
[bug report](https://github.com/IBM/vpc-python-sdk/issues).
Before you create a new issue, search for similar issues. It's possible that someone has already reported the problem.
## Open source @ IBM
Find more open source projects on the [IBM GitHub Page](http://ibm.github.io/).
## Contributing
See [CONTRIBUTING](https://github.com/IBM/vpc-python-sdk/blob/master/CONTRIBUTING.md).
## License
This SDK is released under the Apache 2.0 license.
The license's full text can be found in [LICENSE](https://github.com/IBM/vpc-python-sdk/blob/master/LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "ibm-vpc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ibm, cloud, ibm cloud services, vpc",
"author": null,
"author_email": "IBM <devxsdk@us.ibm.com>",
"download_url": "https://files.pythonhosted.org/packages/88/3b/8d9aaf5f56369b0cc1b5608ab9dcdd34b86be6d219bc7345b3d0d84c0a9f/ibm_vpc-0.30.0.tar.gz",
"platform": null,
"description": "[](https://github.com/IBM/vpc-python-sdk/actions/workflows/ci.yml)\n[](https://opensource.org/licenses/Apache-2.0)\n[](https://github.com/semantic-release/semantic-release)\n\n# IBM Cloud Virtual Private Cloud (VPC) Python SDK Version 0.30.0\n\nPython client library to interact with various [IBM Cloud Virtual Private Cloud (VPC) Service APIs](https://cloud.ibm.com/apidocs/vpc).\n\nThis SDK uses [Semantic Versioning](https://semver.org), and as such there may be backward-incompatible changes for any new `0.y.z` version.\n\n\n## Table of Contents\n\n<!--\n The TOC below is generated using the `markdown-toc` node package.\n\n https://github.com/jonschlinkert/markdown-toc\n\n You should regenerate the TOC after making changes to this file.\n\n npx markdown-toc -i README.md\n -->\n\n<!-- toc -->\n\n- [Overview](#overview)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Using the SDK](#using-the-sdk)\n- [Setting up VPC service](#setting-up-vpc-service)\n- [Questions](#questions)\n- [Issues](#issues)\n- [Open source @ IBM](#open-source--ibm)\n- [Contributing](#contributing)\n- [License](#license)\n\n<!-- tocstop -->\n\n## Overview\n\nThe IBM Cloud Virtual Private Cloud (VPC) Python SDK allows developers to programmatically interact with the following\nIBM Cloud services:\n\nService Name | Imported Class Name\n--- | ---\n[VPC](https://cloud.ibm.com/apidocs/vpc) | VpcV1\n\n## Prerequisites\n\n[ibm-cloud-onboarding]: https://cloud.ibm.com/registration\n\n* An [IBM Cloud][ibm-cloud-onboarding] account.\n* An IAM API key to allow the SDK to access your account. Create an apikey [here](https://cloud.ibm.com/iam/apikeys).\n* Python version 3.8 or above.\n\n## Installation\n\nTo install, use `pip` or `easy_install`:\n\n```bash\npip install --upgrade \"ibm-vpc>=0.30.0\"\n```\n\nor\n\n```bash\neasy_install --upgrade \"ibm-vpc>=0.30.0\"\n```\n\n## Using the SDK\nFor general SDK usage information, see the [IBM Cloud SDK Common README](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md).\n\n## Setting up VPC service\n```python\nfrom ibm_vpc import VpcV1\nfrom ibm_cloud_sdk_core.authenticators import IAMAuthenticator\nfrom ibm_cloud_sdk_core import ApiException\n\nauthenticator = IAMAuthenticator(\"YOUR_IBMCLOUD_API_KEY\")\nservice = VpcV1(authenticator=authenticator)\n\n# to change the service URL to the United Kingdom region\nservice.set_service_url(VpcV1.get_service_url_for_region(\"eu-gb\"))\n\n# Listing VPCs\nprint(\"List VPCs\")\ntry:\n vpcs = service.list_vpcs().get_result()['vpcs']\nexcept ApiException as e:\n print(\"List VPC failed with status code \" + str(e.code) + \": \" + e.message)\nfor vpc in vpcs:\n print(vpc['id'], \"\\t\", vpc['name'])\n\n# Listing Subnets\nprint(\"List Subnets\")\ntry:\n subnets = service.list_subnets().get_result()['subnets']\nexcept ApiException as e:\n print(\"List subnets failed with status code \" + str(e.code) + \": \" + e.message)\nfor subnet in subnets:\n print(subnet['id'], \"\\t\", subnet['name'])\n\n# Listing Instances\nprint(\"List Instances\")\ntry:\n instances = service.list_instances().get_result()['instances']\nexcept ApiException as e:\n print(\"List instances failed with status code \" + str(e.code) + \": \" + e.message)\nfor instance in instances:\n print(instance['id'], \"\\t\", instance['name'])\n\ninstanceId = instances[0]['id']\ninstanceName = instances[0]['name']\n\n# Updating Instance\nprint(\"Updated Instance\")\ntry:\n newInstanceName = instanceName + \"-1\"\n instance = service.update_instance(\n id=instanceId,\n name=newInstanceName,\n ).get_result()\nexcept ApiException as e:\n print(\"Update instance failed with status code \" + str(e.code) + \": \" + e.message)\nprint(instance['id'], \"\\t\", instance['name'])\n\n```\n\n\n## Questions\nIf you have difficulties using this SDK or you have a question about the IBM Cloud services,\nask a question at [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-cloud).\n\n## Issues\nIf you encounter an issue with the project, you are welcome to submit a\n[bug report](https://github.com/IBM/vpc-python-sdk/issues).\nBefore you create a new issue, search for similar issues. It's possible that someone has already reported the problem.\n\n## Open source @ IBM\nFind more open source projects on the [IBM GitHub Page](http://ibm.github.io/).\n\n## Contributing\nSee [CONTRIBUTING](https://github.com/IBM/vpc-python-sdk/blob/master/CONTRIBUTING.md).\n\n## License\n\nThis SDK is released under the Apache 2.0 license.\nThe license's full text can be found in [LICENSE](https://github.com/IBM/vpc-python-sdk/blob/master/LICENSE).\n",
"bugtrack_url": null,
"license": null,
"summary": "Python client library for IBM Cloud ibm-vpc Services",
"version": "0.30.0",
"project_urls": {
"Contributing": "https://github.com/IBM/vpc-python-sdk/blob/master/CONTRIBUTING.md",
"Documentation": "https://github.com/IBM/vpc-python-sdk/blob/master/README.md",
"Issues": "https://github.com/IBM/vpc-python-sdk/issues",
"License": "https://github.com/IBM/vpc-python-sdk/blob/master/LICENSE",
"Repository": "https://github.com/IBM/vpc-python-sdk"
},
"split_keywords": [
"ibm",
" cloud",
" ibm cloud services",
" vpc"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7a042a72fb7fc4c4b501c7256d88c4334f11b9a7b3d7547446d3fbbae0dea3ab",
"md5": "847f62ce6aab5df4b779651f36452df5",
"sha256": "62a44fd4c605f90e57368db512554617743fd529cdb279f9d123eac53438795c"
},
"downloads": -1,
"filename": "ibm_vpc-0.30.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "847f62ce6aab5df4b779651f36452df5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 545848,
"upload_time": "2025-07-11T14:47:59",
"upload_time_iso_8601": "2025-07-11T14:47:59.256884Z",
"url": "https://files.pythonhosted.org/packages/7a/04/2a72fb7fc4c4b501c7256d88c4334f11b9a7b3d7547446d3fbbae0dea3ab/ibm_vpc-0.30.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "883b8d9aaf5f56369b0cc1b5608ab9dcdd34b86be6d219bc7345b3d0d84c0a9f",
"md5": "53baea48538297a2a01dfc4b1303bf78",
"sha256": "0b50682166ec69d8ba3508e3abf56626088ce2df7405d76010177d0854b98f79"
},
"downloads": -1,
"filename": "ibm_vpc-0.30.0.tar.gz",
"has_sig": false,
"md5_digest": "53baea48538297a2a01dfc4b1303bf78",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 531051,
"upload_time": "2025-07-11T14:48:00",
"upload_time_iso_8601": "2025-07-11T14:48:00.949547Z",
"url": "https://files.pythonhosted.org/packages/88/3b/8d9aaf5f56369b0cc1b5608ab9dcdd34b86be6d219bc7345b3d0d84c0a9f/ibm_vpc-0.30.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 14:48:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "IBM",
"github_project": "vpc-python-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "ibm-vpc"
}