Metadata-Version: 2.1
Name: clientdoapi
Version: 0.0.5
Summary: A module to manage Digital Ocean API
Home-page: https://github.com/Jaxmetalmax/clientdoapi
Author: Max J. Rodriguez Beltran
Author-email: maxjrb@openitsinaloa.com
License: UNKNOWN
Project-URL: Bug Reports, https://github.com/Jaxmetalmax/clientdoapi/issues
Project-URL: Say Thanks!, https://www.openitsinaloa.com
Project-URL: Source, https://github.com/Jaxmetalmax/clientdoapi
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests

# 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](https://developers.digitalocean.com/documentation/v2/)

## 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)
```


