ClientDOAPI
This is a module to manage Digital Ocean API v2
You can manage:
- Account info
- Domains (Create, get, delete)
- Domain records (Create, Get record ID, Delete)
- TODO: other endpoints available from DO
API Reference from Digital Ocean
Example:
Get info from account
import clientdoapi as cdo
import json
client = cdoapi.ClientDOApi("tokenfromDigitalOcean")
try:
info = client.get_account_info()
print(info.droplet_limit)
print(info.email)
print(info.uuid)
#or get the object as a dictionary:
info_dict = info.to_json()
#so you can dump it to json
json_obj = json.dumps(info_dict)
except Exception as identifier:
print(identifier)
Create Domain
try:
#Returns a DomainDO object with ne info created
new_domain = client.create_domain("testmydomain.com", "123.45.6.7")
print(f"name: {new_domain.name}")
print(f"name: {new_domain.ttl}")
except Exception as e:
print(e)
Metadata
Release files for clientdoapi 0.0.5
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 |
|---|---|---|---|---|
| clientdoapi-0.0.5.tar.gz | 4.8 kB | Without provenance | Details for clientdoapi-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clientdoapi-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for clientdoapi-0.0.5-py3-none-any.whl |
Total release size: 22.3 kB
Release files / clientdoapi-0.0.5.tar.gz
| Download URL | clientdoapi-0.0.5.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fadae08a329a14aa2cea6106f71dc161a1aa136b4a6f89626d012f7d03f61b42
|
|
BLAKE2b-256 checksum How to use checksums |
a8bb5f7cbea808f2af2986ad38f2fad1c3cc93a8fa324122cd6399a00bf78f71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Release files / clientdoapi-0.0.5-py3-none-any.whl
| Download URL | clientdoapi-0.0.5-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16161e669dd546d3ae1728f6cf8cc0e021074410d4fc5797de30aee54cc07bed
|
|
BLAKE2b-256 checksum How to use checksums |
90a953146788223368886fa1bcf2f555904b9b5578f683ed9cef5fe381876744
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Security for clientdoapi 0.0.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.