Skip to main content

Python interface to the Mythic Beasts Hosted Pi API

Project description

Latest Version

Python interface to the Mythic Beasts Hosted Pi API, developed by the piwheels team (Ben Nuttall and Dave Jones).

This module provides a Pythonic interface to the API, as well as a command line interface.

The authors of this library are not affiliated with Mythic Beasts, but we use their Pi cloud to power the piwheels project.

Documentation of the API itself can be found at https://www.mythic-beasts.com/support/api/raspberry-pi

Usage

View the information about a Pi from the command line:

$ hostedpi show mypi
Name: mypi
Provision status: live
Model: Raspberry Pi 3B
Disk size: 10GB
Power: on
IPv6 address: 2a00:1098:8:5b::1
IPv6 network: 2a00:1098:8:5b00::/56
Initialised keys: yes
SSH keys: 4
IPv4 SSH port: 5091
Location: MER
URLs:
  http://www.mypi.hostedpi.com
  https://www.mypi.hostedpi.com
SSH commands:
  ssh -p 5091 root@ssh.mypi.hostedpi.com  #IPv4
  ssh root@[2a00:1098:8:5b::1]  #IPv6

Provision a new Pi and view its SSH command (using Python):

>>> from hostedpi import PiCloud
>>> api_id = '8t29hvcux5g9vud8'
>>> secret = 'QNwsvxZY8SxT3OiLt:Vmz-D1mWQuoZ'
>>> cloud = PiCloud(api_id, secret, ssh_key_path='/home/ben/.ssh/id_rsa.pub')
>>> pi = cloud.create_pi('mypi')
>>> print(pi.ssh_command)
ssh -p 5123 root@ssh.mypi.hostedpi.com

See the getting started page for information on how to authenticate, and see the command line interface page for information on using the command line interface.

Documentation

Documentation for this module can be found at https://hostedpi.readthedocs.io/

Documentation of the API itself can be found at https://www.mythic-beasts.com/support/api/raspberry-pi

Contributing

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

hostedpi-0.2.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

hostedpi-0.2.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file hostedpi-0.2.0.tar.gz.

File metadata

  • Download URL: hostedpi-0.2.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10

File hashes

Hashes for hostedpi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 175746a8a1349dabbb5147fb5ddd1cb413632cdebd9cc43c4104d49aef03120a
MD5 dc1eb4a02f698dd973e1cbc68639d32a
BLAKE2b-256 b16d1bf9d00f04613a73a3ff213c56d0cd5c769cca573be5d2862e2428af0ea4

See more details on using hashes here.

File details

Details for the file hostedpi-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: hostedpi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10

File hashes

Hashes for hostedpi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c19132f594d92577f6c629dab887a88b4cc4345c9c8a14157d7fe97263e77c06
MD5 9abe04790a9035c07b88bf253ce7dcd5
BLAKE2b-256 e69328ad555e231f3ed3c7bdb0623364f4458112986f00736184c1ed9a1dfdb8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page