GithubHelp home page GithubHelp logo

global-localhost / balena-sdk-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from balena-io/balena-sdk-python

0.0 0.0 0.0 817 KB

Balena SDK for Python

License: Apache License 2.0

Python 99.33% JavaScript 0.67%

balena-sdk-python's Introduction

Balena SDK

The official balena SDK for python.

Role

The intention of this module is to provide developers a nice API to integrate their python applications with balena.

Installation

Install the balena SDK:

From Source:

https://github.com/balena-io/balena-sdk-python

From git:

pip install git+https://github.com/balena-io/balena-sdk-python.git

Example of installing on a Debian container:

FROM balenalib/amd64-debian:stretch

# Install python 3 and balena SDK dependencies.
RUN install_packages build-essential python3 python3-pip python3-setuptools \
    python3-dev libffi-dev libssl-dev

# Install balena python SDK in python 3.
RUN pip3 install balena-sdk

Example of installing on a Alpine Linux container:

FROM balenalib/amd64-alpine:3.9

# Install python 3 and balena SDK dependencies.
RUN install_packages build-base python3 py3-setuptools python3-dev libffi-dev openssl-dev

# Install balena python SDK in python 3.
RUN pip3 install balena-sdk

Platforms

We also support NodeJS SDK.

Basic Usage

>>> from balena import Balena
>>> balena = Balena()
>>> credentials = {'username':<your email>, 'password':<your password>}
>>> balena.auth.login(**credentials)
...

Documentation

We generate markdown documentation in DOCUMENTATION.md.

To generate the documentation:

python docs_generator.py > DOCUMENTATION.md

Deprecation policy

The balena SDK for Python uses semver versioning, with the concepts of major, minor and patch version releases.

The latest release of the previous major version of the balena SDK will remain compatible with the balenaCloud backend services for one year from the date when the next major version is released. For example, balena SDK v8.1.1, as the latest v8 release, would remain compatible with the balenaCloud backend for one year from the date when v9.0.0 is released.

At the end of this period, the older major version is considered deprecated and some of the functionality that depends on balenaCloud services may stop working at any time. Users are encouraged to regularly update the balena SDK to the latest version.

Tests

To run the tests, first create a .env file with your test user configuration, e.g.:

[Credentials]
[email protected]
user_id=my_test_user
password=123456my_password

You can optionally change the target API endpoint too, e.g. api_endpoint=https://api.balena-cloud.com.

Then run python -m unittest discover tests -v.

Support

If you're having any problem, please raise an issue on GitHub and the balena team will be happy to help.

Contribute

License

The project is licensed under the MIT license.

balena-sdk-python's People

Contributors

amirfuhrmann avatar balena-ci avatar chibby0ne avatar imrehg avatar james2710 avatar lucianbuzzo avatar nghiant2710 avatar page- avatar petrosagg avatar pimterry avatar thgreasi avatar vipulgupta2048 avatar xginn8 avatar zvin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.