=====
Chube lets you interact with the Linode API using a nice and neat
domain space of objects. Here's an example of a session you could
have with Chube:
you@localhost:~$ chuber
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
>>> Linode.search()
[<Linode api_id=13971, label='foo-01'>, <Linode api_id=20401, label='bar-04'>, <Linode api_id=13972, label='foo-02'>]
>>>
>>> nodes = Linode.search(label_begins='foo-')
[<Linode api_id=13971, label='foo-01'>, <Linode api_id=13972, label='foo-02'>]
>>>
>>> for node in nodes:
... print node.ipaddresses[0].address
...
192.168.13.148
192.168.8.218
>>>
>>> plan = Plan.find(label="Linode 1024")
>>> plan
<Plan label='Linode 1024'>
>>> datacenter = Datacenter.find(location_begins="dallas")
>>> datacenter
<Datacenter location='Dallas, TX, USA'>
>>>
>>> new_node = Linode.create(plan=plan, datacenter=datacenter, payment_term=1)
>>> new_node
<Linode api_id=345768, label='linode345768'>
>>> new_node.label = "web-14"
>>> new_node.save()
>>> Linode.find(label="web-14")
<Linode api_id=345768, label='web-14'>
>>>
>>> distro = Distribution.find(label="Debian 7")
>>> disk = new_node.create_disk(distribution=distro, label="foo_disk", size=2000, root_pass="secret123")
>>> new_node.pending_jobs
[<Job api_id=12310126, label='Disk Create From Distribution - Debian 7'>, <Job api_id=12310127, label='Linode Initial Configuration'>]
>>> new_node.pending_jobs[0].wait()
>>>
>>> job = new_node.boot()
>>> job.wait()
>>>
>>> new_node.destroy()
Of course, chube's objects can also be imported into a script with
`from chube import *`.
Installing
-----
pip install chube
echo -e "---\napi_key: <YOUR API KEY GOES HERE>" > ~/.chube
Metadata
Release files for chube 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chube-0.1.8.tar.gz | 14.4 kB | Without provenance | Details for chube-0.1.8.tar.gz |
Release files / chube-0.1.8.tar.gz
| Download URL | chube-0.1.8.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c8bec8868a56df52fa06f06018e9654b2f68ffc192a6d2d255860dcf7ad5d9a
|
|
BLAKE2b-256 checksum How to use checksums |
cc238d4f42f53e7dba439634c21d9d18676eefd7bc9caa0f3968cf5e79cc7a2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for chube 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.