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.3.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

hostedpi-0.3.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hostedpi-0.3.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for hostedpi-0.3.0.tar.gz
Algorithm Hash digest
SHA256 65f7a552e175342bfb7164c349cd9b0e5237cd515a958f0d894e8b88e96d8787
MD5 da9ea49ef15a6398f7b379337aba1404
BLAKE2b-256 fdaabbf359203d65a1612582f054641016acccf8fb4b16f1be293e62e2388f22

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: hostedpi-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for hostedpi-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e5672c06e4642f982efadd24526753b1131f04c0e2d8cd1d76ed53ef8d23842
MD5 ecdab149fe269efe099964104dccc253
BLAKE2b-256 1aec2ecbf5343641dc8a18f71f9e49a9a03cf2c65745de8e118ea7b382dcbfd4

See more details on using hashes here.

Provenance

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