Python API wrapper for pilw.io
Project description
Pilw.io API wrapper.
Python wrapper for Pilw.io API
Installation
pip install pilwio-api
Usage
import pilwio
""" Initialize version wrapper with apikey """
api = pilwio.V1('apikey')
""" Set new apikey if necessary """
api.set_apikey('new_api_key')
""" User info """
api.whoami()
Virtual machines
api.vm.index()
api.vm.show(uuid)
api.vm.create(vm)
api.vm.delete(uuid)
api.vm.update(uuid, **kwargs)
api.vm.start(uuid)
api.vm.stop(uuid)
api.vm.ips(uuid)
api.vm.reserve_ip(uuid)
api.vm.release_ip(uuid)
api.vm.clone(uuid, name)
api.vm.toggle_backup(uuid)
api.vm.rebuild(uuid, replica_uuid)
Replicas
api.replica.index(uuid)
api.replica.create(uuid)
api.replica.delete(uuid)
Tokens
api.token.index()
api.token.delete(token_id)
api.token.update(token_id, **kwargs)
api.token.create(token)
Resource Billing
api.billing.index(id)
api.billing.info(uuid)
api.billing.update(uuid, id)
Credit cards
api.card.index(account_id)
api.card.delete(card_id)
api.card.show(card_id)
api.card.set_primary(card_id)
Invoices
api.invoice.index(id)
api.invoice.show(invoice_id)
api.invoice.pay_all(account_id)
api.invoice.pay_amount(account_id, amount)
api.invoice.pay_invoice(invoice_id)
Billing Accounts
api.billing_account.index()
api.billing_account.show(account_id)
api.billing_account.update(account_id, account_data)
api.billing_account.set_default(account_id)
api.billing_account.get_unpaid(account_id)
Storage
api.storage.url()
api.storage.show(name)
api.storage.index(billing_account_id) #param optional
api.storage.user()
api.storage.keys()
api.storage.delete_key(key)
api.storage.create_key()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pilwio-api-1.0.1.tar.gz
(6.3 kB
view hashes)
Built Distribution
pilwio_api-1.0.1-py3-none-any.whl
(10.2 kB
view hashes)
Close
Hashes for pilwio_api-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db8b81fb72a8796e6d0320c192fd2c256f3bc7c9a2135cf175871a9bd1bb6e39 |
|
MD5 | 1f4a0774814b87dee23f0f13c2798380 |
|
BLAKE2b-256 | c36261ff663dd07c199278dee1bd4ab02c97e9d5d931c4d481a692190b41d901 |