api-cloudvps-py
An unofficial synchronous Python client for the REG.Cloud CloudVPS API. It covers every operation currently published in the CloudVPS API v1 and API v2 OpenAPI contracts.
This project is maintained independently and is not an official REG.Cloud SDK.
Requirements
Python 3.11 through 3.14 are supported.
Installation
python -m pip install api-cloudvps-py
Authentication
Create an API token in the REG.Cloud control panel and keep it outside source code. For example:
export CLOUDVPS_TOKEN='replace-with-your-token'
import os
from cloudvps import Api
with Api(os.environ["CLOUDVPS_TOKEN"]) as api:
sizes = api.v1.common.sizes()
plans = api.v2.plans.list("openstack-sam1", items_per_page=10)
The default request timeout is 30 seconds. Set a scalar or a Requests-style connect/read tuple when necessary:
api = Api(os.environ["CLOUDVPS_TOKEN"], timeout=(5, 60))
Quick examples
The following operations only read account or catalog state:
servers = api.v1.servers.list()
images = api.v2.images.list(
"openstack-sam1",
page=1,
items_per_page=10,
type="distribution",
)
balance = api.v1.billing.balance()
The next example creates a billable server and deletes it. Review the selected plan, image, region, and resulting charges before executing it:
created = api.v1.servers.create(
"api-client-example",
"c1-m1-d10-hp",
"ubuntu-24-04-amd64",
region_slug="openstack-sam1",
backups=False,
)
server_id = created["reglet"]["id"]
api.v1.servers.delete(server_id)
The following calls also change infrastructure and may affect availability or cost. Inspect their responses and remove temporary resources promptly:
ip_result = api.v1.ips.create(server_id, ipv4_count=1)
snapshot_action = api.v1.servers.snapshot(server_id, "before-upgrade", offline=True)
network = api.v1.vpcs.create("private-network")
vpc_id = network["resource_id"]
attach_action = api.v1.vpcs.attach(vpc_id, server_id)
# After the provider actions finish:
api.v1.vpcs.detach(vpc_id, server_id)
# CloudVPS currently keeps private networks: vpcs.delete() returns HTTP 501.
Errors
Non-success HTTP responses raise CloudVpsAPIError. The exception exposes status_code, code, and message where supplied by the provider. Bearer tokens are redacted from exception text.
from cloudvps import CloudVpsAPIError
try:
api.v1.servers.get(123)
except CloudVpsAPIError as error:
print(error.status_code, error.code, error.message)
API versions and compatibility
Use api.v1 for operational resources and api.v2 for regional plans and images. The historical api.ssh, api.common, api.history, api.snapshots, api.images, api.actions, and api.vps accessors remain aliases for v1 in the 0.2 release line.
See API reference for all methods and migration guide before upgrading from 0.1.7.
Terraform or Python?
Use the official REG.Cloud Terraform provider for declarative lifecycle management of servers, GPU servers, SSH keys, and snapshots. Use this Python client for imperative automation and for the wider CloudVPS surface such as billing, IP addresses, private networks, actions, and account history. This package does not replace Terraform.
Development and releases
See contributing guide, security policy, and release runbook. Releases are published from GitHub Actions through PyPI Trusted Publishing; no long-lived PyPI upload token is stored in the repository.
License
MIT, copyright Anton Grudin.
Metadata
Release files for api-cloudvps-py 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| api_cloudvps_py-0.2.0.tar.gz | 40.6 kB | With provenance | Details for api_cloudvps_py-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| api_cloudvps_py-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for api_cloudvps_py-0.2.0-py3-none-any.whl |
Total release size: 52.4 kB
Release files / api_cloudvps_py-0.2.0.tar.gz
| Download URL | api_cloudvps_py-0.2.0.tar.gz |
|---|---|
| Size | 40.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ceb6a3239c3ecb133b29415a9c20df52b3e467640909eeb27db13850caf7ff9
|
|
BLAKE2b-256 checksum How to use checksums |
83cee938073f247abe620227cf1dcd9e812806add0ead428339c2429b6b4b92a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logRelease files / api_cloudvps_py-0.2.0-py3-none-any.whl
| Download URL | api_cloudvps_py-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e39014a11fe8ddb2a8264761a07a05b92bb0c3d6cd928bbf7ef60715fd5295cf
|
|
BLAKE2b-256 checksum How to use checksums |
b1e0e6c51541199e40d6ba2e7bf8620be05776dc67136d59fc62ef1a30e6734b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logSecurity for api-cloudvps-py 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for api_cloudvps_py-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.