Wrapper for civo api
Project description
Civo
This project is the python API library for using in python projects.
Usage
>>> from civo import Civo >>> from os.path import expanduser >>> civo = Civo('token') >>> home = expanduser("~/.ssh/") >>> ssh_file = open('{}id_dsa.pub'.format(home)).read() >>> # you can filter the result >>> size_id = civo.size.search(filter_by='name:g2.xsmall')[0]['name'] >>> template = civo.templates.search(filter_by='code:debian-stretch')[0]['id'] >>> civo.ssh.create(name='default', public_key=ssh_file) >>> ssh_id = civo.ssh.search(filter_by='name:default')[0]['id'] >>> civo.instances.create(hostname='text.example.com', size=size_id, region='lon1', template_id=template, public_ip='true', ssh_key=ssh_id)
Installation
pip3 install civo
Requirements
requests
Compatibility
python 3.7
Licence
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
civo-1.0.8.tar.gz
(16.3 kB
view details)
Built Distribution
civo-1.0.8-py3-none-any.whl
(25.0 kB
view details)
File details
Details for the file civo-1.0.8.tar.gz
.
File metadata
- Download URL: civo-1.0.8.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f23bfae1342d0382a77c383c0a78fab9697b592aa96431eb59fd07eeb06f28b |
|
MD5 | 4e22d5714fc800f21e248342a96a01ad |
|
BLAKE2b-256 | b8ad6aea1b52ee390a20fe4e0aa8727bba0976875eca7901d5f39f0a9f45ce69 |
File details
Details for the file civo-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: civo-1.0.8-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b50948b48b9f4572ae8b6758a3c6b8630c3961f636d6518de498bb4e40226f05 |
|
MD5 | e3fa846ffaba9574d18ea96f4fc2af6d |
|
BLAKE2b-256 | f840b030f162117a1626755303d62c39637b962c3002445554e47ba41a49bf65 |