Skip to main content

A Python SDK for Vehicle app

Project description

Vehicle App Python Sdk

CI workflow License: Apache

The Vehicle App SDK reduces the effort required to implement Vehicle Apps by using the Velocitas development model for the Python programming language. To create a Vehicle App, please use our Vehicle App Template which uses this sdk.

This includes the following packages:

Status

Note: The Vehicle App Python SDK is currently under active development in alpha phase.

Prerequisites

  • Python 3.10 or later is required to use this package.

Install the package

Install the Vehicle App Python SDK with pip:

pip install git+https://github.com/eclipse-velocitas/vehicle-app-python-sdk.git@<version>

Documentation

  • Velocitas Development Model: Learn more about the Velocitas programming model and the SDK
  • Velocitas Tutorials: Learn how to get started, including setting up the development environment, creating a Vehicle Model as well as developing and deploying a Vehicle App.

Python Vehicle App SDK Examples

These examples demonstrate how to use the Python Vehicle App SDK:

Example Description
Array Datatype Shows a Vehicle Data Broker query that returns an array data point.
Atomic Set Shows how to set the values of multiple datapoint actuators in one "atomic" step.
DataPoint Set Shows how to set the value of the datapoint actuator value API.
Dog Mode Dog-Mode App that demonstrates MQTT communication and invocation of a Vehicle Service over gRPC, the app also subscribes for vehicle data points and sets the cabin temperature.
Dynamic Rule Create a Vehicle Data Broker rule with the fluent query methods.
Static Rule Create a Vehicle Data Broker rule with the subscribe_to_data_point annotation.
VDB Queries Demonstrates various aspects of creating Vehicle Data Broker queries.
Seat Adjuster Seat-Adjuster App that demonstrates MQTT communication and seat control via actuator data points.
:point_right: This example can only be run from the Vehicle App Template. :point_left:

All examples (except the Seat Adjuster) can be run via

cd examples
./run-app.sh -a <example-folder-name>

By default the examples are started using the native middleware. Dapr middleware support was recently removed.

Contribution

Creating a new release

  1. Update examples

This repository contain some example requirement files that reference the velocitas-sdk package created when we release the repository. Update velocitas-sdk version number in the following files:

  • .project-creation/.skeleton/requirements-velocitas.txt
  • examples/seat-adjuster/requirements-velocitas.txt

Use the version number intended to be used for the release.

  1. Create a PR with the required changes

Note: The project creation workflow will fail, since the new tag is required by the workflow but not yet available. Since these checks are not mandatory to be able to merge the PR, you can still release your changes.

  1. Once the PR is merged: Tag the commit and upload to GitHub

Create a release in the GitHub UI and use the new tag of the form vX.Y.X. That will trigger the release workflow. If the action is successfully executed a new version of velocitas-sdk is published in PyPI.

  1. Re-run project creation tests

Now, when the updated PyPI package exists, the project creation workflow is expected to succeed if run manually for main. If not you need to troubleshoot why it doesn't.

Updating Dependencies

This repository specifies exact Python versions in setup.py and other files. If a version needs to be updated, for example if a vulnerability is detected, the following approach needs to be followed

  1. Update version in setup.py if needed
  2. Update generated requirement files.
pip-compile -U --extra=dev
  1. Update version in examples/seat-adjuster/requirements.in if needed
  2. Update generated file for Seat Adjuster
cd examples/seat-adjuster
pip-compile -U
  1. Update version in .project-creation/.skeleton/requirements.in if needed
  2. Update generated file for Skeleton
cd .project-creation/.skeleton/
pip-compile -U
  1. Update NOTICE-3RD-PARTY-CONTENT.md

The easiest way to do it is to create a Pull Request. Then the check license workflow will fail as versions used no longer match versions stated in the file. Copy output from the workflow to the NOTICE-3RD-PARTY-CONTENT.md file and update the Pull Request.

  1. Update examples and create a new release

As we explicitly use our "own" PyPI package we need to udpate references and create a new release, see release section above.

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

velocitas_sdk-0.15.7.tar.gz (66.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

velocitas_sdk-0.15.7-py3-none-any.whl (64.0 kB view details)

Uploaded Python 3

File details

Details for the file velocitas_sdk-0.15.7.tar.gz.

File metadata

  • Download URL: velocitas_sdk-0.15.7.tar.gz
  • Upload date:
  • Size: 66.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for velocitas_sdk-0.15.7.tar.gz
Algorithm Hash digest
SHA256 8902cdb78470c3d763df77ece5f5688b74e99bbdc7fab57134a01ace543f3fb5
MD5 c24822172b884876eb10c1f2b4803a03
BLAKE2b-256 4340630a2753cc87f22dd62dbc05932960db004e9d3a5e337df880a59c62c3bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for velocitas_sdk-0.15.7.tar.gz:

Publisher: release.yaml on eclipse-velocitas/vehicle-app-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file velocitas_sdk-0.15.7-py3-none-any.whl.

File metadata

  • Download URL: velocitas_sdk-0.15.7-py3-none-any.whl
  • Upload date:
  • Size: 64.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for velocitas_sdk-0.15.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1520ddb4841a470c6dbef599bddf3b05e1a93ec801b04830a6a261455901dfc4
MD5 543818ce35bf58e9585681c388d9bea3
BLAKE2b-256 4f2101d7088b8d426065da840d900514068543d69970fbaaaade89a2dfaf5266

See more details on using hashes here.

Provenance

The following attestation bundles were made for velocitas_sdk-0.15.7-py3-none-any.whl:

Publisher: release.yaml on eclipse-velocitas/vehicle-app-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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