Skip to main content

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)

Floating IP

api.network.create(**kwargs)
api.network.list()
api.network.get(ipv4)
api.network.update(ipv4, **kwargs)
api.network.delete(ipv4)
api.network.assign(ipv4,uuid)
api.network.unassign(ipv4)

Replicas

api.replica.index(uuid, *rtype)
api.replica.create(uuid, *rtype)
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()

Release files for pilwio-api 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pilwio-api 1.0.2
File Size Uploaded
pilwio-api-1.0.2.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pilwio-api 1.0.2
File Interpreter ABI Platform
pilwio_api-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.5 kB

Release files / pilwio-api-1.0.2.tar.gz

Download URL pilwio-api-1.0.2.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e3b9085942b294ad9ab65cdb02466f7a6499de1b7f70f70bc822f5c30d1f76e6
BLAKE2b-256 checksum
How to use checksums
44f96880e87ff30d11ad676642b61fe0565b3e1ff03cf5f2611b30ce4d17acf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.4

Release files / pilwio_api-1.0.2-py3-none-any.whl

Download URL pilwio_api-1.0.2-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21a8787023b826946b57e16b12f842d9b205ded4296706d9507b244ebe428290
BLAKE2b-256 checksum
How to use checksums
9ada16102f8e62e9959548e0b87fd2d169e008abd4b27fb3b39563d5d3a8cdc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page