Skip to content

eclipse-fog05/fog05-python

Repository files navigation

Gitter License License Documentation Status

Eclispe fog05 Python API

This repository contains the Eclipse fog05 Client API for Python

With this API you can interact with Eclipse fog05 nodes and deploy your application components


How to install it

⚠️WARNING⚠️ fog05-python is developped in Rust. On Pypi.org we provide binary wheels for the most common platforms (MacOS, Linux x86). But also a source distribution package for other platforms. However, for pip to be able to build this source distribution, there some prerequisites:

  • pip version 19.3.1 minimum (for full support of PEP 517). (if necessary upgrade it with command: 'sudo pip install --upgrade pip' )
  • Have a Rust toolchain installed (instructions at https://rustup.rs/)

Supported Python versions and platforms

fog05-python has been tested with Python 3.6, 3.7, 3.8 and 3.9.

It relies on the fog05 Rust API which require the full std library. See the list Rust supported platforms here: https://doc.rust-lang.org/nightly/rustc/platform-support.html .

Currently only the following platforms have been tested:

  • Linux
  • MacOS X

How to build it

Requirements:

  • Python >= 3.5
  • A virtual environement such as venv, miniconda or Conda
  • Rust and Cargo. Then install the nighlty toolchain running:
    rustup toolchain install nightly
  • maturin. Install it with:
    pip install maturin

Steps:

  • Make sure your shell is running in a Python virtual environment.
    python3 -m venv ../venv
    source ../venv/bin/activate
  • Build fog05-python using maturin
    cd fog05-python
    maturin develop --release

Maturin will automatically build the fog05 Rust API, as well as the fog05-python API and install it in your Python virtual environement.

Docs

Documentation is available here: readthedocs.io

Examples

Examples are available in the examples repository