
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
The official balena SDK for python.
The intention of this module is to provide developers a nice API to integrate their python applications with balena.
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
We also support NodeJS SDK.
>>> from balena import Balena
>>> balena = Balena()
>>> credentials = {'username':<your email>, 'password':<your password>}
>>> balena.auth.login(**credentials)
...
We generate markdown documentation in DOCUMENTATION.md.
To generate the documentation run:
python docs_generator.py > DOCUMENTATION.md
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.
This project uses poetry for dependency management. In order to install all the needed dependencies please run poetry install
.
This project uses black for code formatting and flake8 for linting.
To format this project please use poetry run black . -l 120
To verify linting you can run poetry run flake8 --max-line-length=120
To run the tests, first create a .env
file with your test user configuration, like below. Do not use credentials for a user with active fleets, as the tests may be destructive.
[Credentials]
email=my_test_user@balena.io
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 poetry run python -m unittest discover tests -v
. Use of poetry to run tests ensures use of its virtual environment.
If you're having any problem, please raise an issue on GitHub and the balena team will be happy to help.
The project is licensed under the MIT license.
FAQs
Unknown package
We found that balena-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.