Skip to main content

Python library for awesome Digital Ocean API

Project description

Python Digital Ocean Library

PyPI version Supported Python Versions Tests Coverage

Description

DOLib is a fully featured python 3.6+ library for Digital Ocean, which provides sync and async APIs. This library supports all Digital Ocean API methods and simple in use. Enjoy!

Documentation

Comming soon.

Requirements

Python 3.6+

DOLib uses these awesome libraries:

Installation

pip install dolib

Example

Sync client

from dolib import Client

client = Client(token="60c13d47f17dbed9f7293cf8c82d18fece3439a54f88e6c52c2df07f87bd8dd9")

droplets = client.droplets.all()
volume = client.volumes.get("53cf7120-9d5b-11ea-aed1-0a58ac14d008")

client.volumes.attach(volume, droplet_id=droplets[0].id)

Async client

from dolib import AsyncClient
from dolib.models import Droplet

async with Client(token="60c13d47f17dbed9f7293cf8c82d18fece3439a54f88e6c52c2df07f87bd8dd9") as client:
    droplet = Droplet(name="dolib-droplet", region="fra1", size="s-1vcpu-1gb", image="ubuntu-18-04-x64")
    droplet = await client.droplets.create(droplet)

Contributing

To run the tests:

tox -p all

Versioning

This project follows Semantic Versioning 2.0.0.

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dolib-0.2.3.tar.gz (140.6 kB view details)

Uploaded Source

Built Distribution

dolib-0.2.3-py2.py3-none-any.whl (28.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dolib-0.2.3.tar.gz.

File metadata

  • Download URL: dolib-0.2.3.tar.gz
  • Upload date:
  • Size: 140.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for dolib-0.2.3.tar.gz
Algorithm Hash digest
SHA256 01dc70f3685da86db7f06e9e6a68d2d8c60645766cb23fbe3e35e96c0f084d71
MD5 a227f9d1482fa840a5f8b84842f77eaa
BLAKE2b-256 90fa858170de0c8fafdf1cd688a602a66d63735603e197d5e91c14ad16183344

See more details on using hashes here.

File details

Details for the file dolib-0.2.3-py2.py3-none-any.whl.

File metadata

  • Download URL: dolib-0.2.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for dolib-0.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b146318f5a0c3bdc3aae3564af21a93984259a542fa740ad4adc00099287b448
MD5 01b47a37621426897ef3d9971ea920e3
BLAKE2b-256 723d8caf8a3ad6fa6d0ff72a295929fc865b5db93bcdc9aff60b7578251f487a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page