{"id":15957609,"url":"https://github.com/goldyfruit/ibmcloud-python-sdk","last_synced_at":"2026-03-17T18:07:19.890Z","repository":{"id":38297031,"uuid":"263083022","full_name":"goldyfruit/ibmcloud-python-sdk","owner":"goldyfruit","description":"Python SDK to interact with IBM Cloud VPC and Classic Infrastructure API","archived":false,"fork":false,"pushed_at":"2024-09-12T13:58:20.000Z","size":6694,"stargazers_count":1,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T05:34:37.492Z","etag":null,"topics":["aix","api","baremetal","cis","cloud","dns","ibm","ibm-cloud","ibmcloud","is","object","power","python","sdk","vpc"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goldyfruit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-11T15:30:45.000Z","updated_at":"2024-09-12T13:58:17.000Z","dependencies_parsed_at":"2024-10-07T14:00:45.949Z","dependency_job_id":"32524bb8-7198-4598-a66d-4dc7aa411a69","html_url":"https://github.com/goldyfruit/ibmcloud-python-sdk","commit_stats":{"total_commits":626,"total_committers":11,"mean_commits":56.90909090909091,"dds":"0.48083067092651754","last_synced_commit":"ff043ccb92acac0c9dc28bff19205ebc9939eaa3"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldyfruit%2Fibmcloud-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldyfruit%2Fibmcloud-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldyfruit%2Fibmcloud-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldyfruit%2Fibmcloud-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goldyfruit","download_url":"https://codeload.github.com/goldyfruit/ibmcloud-python-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864822,"owners_count":20360360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aix","api","baremetal","cis","cloud","dns","ibm","ibm-cloud","ibmcloud","is","object","power","python","sdk","vpc"],"created_at":"2024-10-07T14:00:33.312Z","updated_at":"2026-03-17T18:07:14.868Z","avatar_url":"https://github.com/goldyfruit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPi](https://img.shields.io/pypi/v/ibmcloud-python-sdk.svg)](https://pypi.org/project/ibmcloud-python-sdk)\n[![Downloads](https://static.pepy.tech/personalized-badge/ibmcloud-python-sdk?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=orange\u0026left_text=Downloads)](https://pepy.tech/project/ibmcloud-python-sdk)\n[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n[![codecov](https://codecov.io/gh/goldyfruit/ibmcloud-python-sdk/branch/main/graph/badge.svg?token=UW2HGIIV11)](https://codecov.io/gh/goldyfruit/ibmcloud-python-sdk)\n\n- [IBM Cloud Python SDK](#ibm-cloud-python-sdk)\n  - [Environment variables](#environment-variables)\n  - [Documentation](#documentation)\n  - [Supported features](#supported-features)\n  - [Installation](#installation)\n  - [Caching](#caching)\n    - [Podman](#podman)\n    - [Docker](#docker)\n  - [Examples](#examples)\n    - [List VPCs](#list-vpcs)\n    - [Create a VPC instance](#create-a-vpc-instance)\n  - [FAQ](#faq)\n\n# IBM Cloud Python SDK\n\n`ibmcloud-python-sdk` aims to talk to IBM Cloud. To do this, it requires a configuration file. `ibmcloud-python-sdk` favours `clouds.yaml` file, but can also use environment variables *(see [below](#environment-variables))*. An example:\n\n```yaml\n---\nclouds:\n  default: demo-acc\n  demo-acc:\n    profile: demo\n    description: Credentials from my IBM Cloud demo account\n    key: XxX1234567890XxX\n    region: us-south\n    version: 2021-06-15\n    generation: 2\n    cis_username: 000000_sponge.bob@sink.com\n    cis_apikey: abc123def456ghi789klm0n\n  prod-acc:\n    profile: prod\n    description: Credentials from my IBM Cloud production account\n    key: zZz1234567890zZz\n    region: us-south\n    version: 2021-06-15\n    generation: 2\n    cis_username: 999999_sponge.bob@sink.com\n    cis_apikey: @@abc123def456ghi789klm0n@@\n```\n\nThe `clouds.yaml` file will be searched at first into `~/.ibmcloud` directory but this behavior could be overrided by an environment variable.\n\n## Environment variables\n\n| Variable           | Description | Example | Mandatory |\n| ------------------ | ----------- | ------- | --------- |\n| `IC_CONFIG_FILE`     | Absolute path to the `clouds.yaml` file | `~/vault/ibm.yaml` | [ ] |\n| `IC_CONFIG_NAME`     | Name of the default cloud configuration | `demo` | [ ] |\n| `IC_REGION`          | Region were to connect | `us-south` | [x] |\n| `IC_VERSION`         | Requests the version of the API | `2021-06-15` | [x] |\n| `IC_GENERATION`      | The infrastructure generation for the request | `2` | [x] |\n| `IC_SDK_CONFIG_FILE` | Absolute path to the `sdk.yaml` file | `~/.config/ibmcloud/sdk.yaml` | [ ] |\n| `IC_API_KEY`         | API key created via the IBM Cloud IAM system | `XxX1234567890XxX` | [x] |\n| `SL_USERNAME`        | SoftLayer user | `goldyfruit` | [ ] |\n| `SL_API_KEY`         | SoftLayer API key | `abc123def456ghi789klm0n` | [ ] |\n\n## Documentation\n\nDocumentation for the IBM Cloud Python SDK is available [here](https://goldyfruit.github.io/ibmcloud-python-sdk).\n\nIBM Cloud Python SDK leverages existing Python SDKs such as:\n\n- [SoftLayer](https://github.com/softlayer/softlayer-python)\n- [IBM Cloud Object Storage](https://github.com/IBM/ibm-cos-sdk-python)\n\n## Supported features\n\nOnly VPC Gen 2 is supported by this SDK.\n\n| Service  | Feature |\n| -------- | ------- |\n| CIS      | *Baremetal, Object Storage* |\n| DNS      | *Public Zone, Private Zone* |\n| EM       | *Get Account, Get Enterprise* |\n| IAM      | *Policies, Roles* |\n| POWER    | *Power System* |\n| RESOURCE | *Binding, Group, Instance, Key* |\n| VPC      | *ACL, FIP, Gateway, Geo, Image, Instance, Key, Load Balancer, Security, Subnet, Volume, VPC, VPN* |\n\n## Installation\n\nInstall from PyPi via `pip`:\n\n```shell\npython -m venv ~/virtualenvs/ibmcloud-python-sdk\nsource ~/virtualenvs/ibmcloud-python-sdk/bin/activate\npip install ibmcloud-python-sdk\n```\n\nOr you can install from source:\n\n```shell\ncd ~/Git\ngit clone https://github.com/goldyfruit/ibmcloud-python-sdk.git\npython -m venv ~/virtualenvs/ibmcloud-python-sdk\nsource ~/virtualenvs/ibmcloud-python-sdk/bin/activate\ncd ~/Git/ibmcloud-python-sdk\npip install .\n```\n\nWe recommend to use Python virtual environment to install the SDK.\n\n## Caching\n\nThe SDK has caching capability *(`memcached` only for now)* to improve the HTTP requests speed. To enable this mechanisim please configure the SDK properly using `~/.ibmcloud/sdk.yaml` file.\n\n```yaml\n---\nsdk:\n  cache_ttl: 60\n  memcached:\n    - 127.0.0.1:11211\n```\n\nMuttiple cache servers could be configured as well.\n\n```yaml\n---\nsdk:\n  cache_ttl: 60\n  memcached:\n    - 127.0.0.1:11211\n    - 127.0.0.1:11212\n    - 127.0.0.1:11213\n```\n\nAn easy way to deploy `memcached` server is to use container.\n\n### Podman\n\n```shell\npodman run -dt -p 11211:11211 --name memcached -d memcached\n```\n\n### Docker\n\n```shell\nsudo docker run -dt -p 11211:11211 --name memcached -d memcached\n```\n\n## Examples\n\nA list of examples on how to use this SDK can be found at [here](https://github.com/goldyfruit/ibmcloud-python-sdk/tree/main/examples).\n\n### List VPCs\n\n```python\nfrom ibmcloud_python_sdk.vpc import vpc as ic\n\n\nvpc = ic.Vpc()\nvpc.get_vpc(\"ibmcloud-vpc-baby\")\n```\n\n### Create a VPC instance\n\n```python\nfrom ibmcloud_python_sdk.vpc import vpc as icv\nfrom ibmcloud_python_sdk.resource import resource_group as icr\nimport sys\n\n\n# Variables\nvpc_name = 'ibmcloud-vpc-baby'\nresource_group_name = 'ibmcloud-resource-group-baby'\n\n# Intentiate classes\nvpc = icv.Vpc()\nrg = icr.ResourceGroup()\n\n# Retrieve resource group ID and check for error\nresource_group_info = rg.get_resource_group(resource_group_name)\nif 'errors' in resource_group_info:\n    print(resource_group_info['errors'])\n    sys.exit()\n\n# Create the VPC based on variable and resource group ID\nresponse = vpc.create_vpc(\n            name=vpc_name,\n            resource_group=resource_group_info['id'],\n            address_prefix_management='auto',\n            classic_access=True\n        )\n\n# Check for error during the VPC creation process\nif 'errors' in response:\n    print(response['errors'])\nelse:\n    print(response)\n\n```\n\n## FAQ\n\n- `CRN` or `HREF` could not be used as ID to retrieve resources\n- `PATCH` method *(update)* is not yet supported which means a resource cannot be updated\n\n## Copyright\n\nSee the bundled [LICENSE](https://github.com/goldyfruit/ibmcloud-python-sdk/blob/main/LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldyfruit%2Fibmcloud-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldyfruit%2Fibmcloud-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldyfruit%2Fibmcloud-python-sdk/lists"}