Skip to main content

Apollo Python Protobuf

This project provides Python bindings for the Apollo modules' protobufs, enabling seamless integration and usage of Apollo’s protobuf definitions in Python.

Installation

Option 1: Install via pip

pip install apollo_modules==[version]  # Supported versions: see release https://pypi.org/project/apollo-modules/

From apollo 8.0, the structure has been changed!

Option 2: Build from Source

git clone -b [version] https://github.com/MingfeiCheng/ApolloPyProto.git
cd ApolloPyProto
pip install -e .

Usage

1. Verify Installation

To verify the installation, open a Python shell and run the following:

python
>>> import apollo_modules
>>> from apollo_modules.modules.common_msgs.planning_msgs.planning_pb2 import ADCTrajectory

If there are no errors, the installation was successful, and the package is ready to use.

2. Example Usage

Here’s an example of importing the planning_pb2 protobuf used in Apollo’s planning module:

from apollo_modules.modules.common_msgs.planning_msgs.planning_pb2 import ADCTrajectory

(Optional) Generate Python Protobuf Files from the Apollo Project

We provide a shell script to automatically generate the Python versions of the protobufs from Apollo’s modules. Use the following command:

bash proto_generate.sh /path/to/apollo_root /path/to/output

Metadata

Release files for apollo-modules 11.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apollo-modules 11.0.0
File Size Uploaded
apollo_modules-11.0.0.tar.gz 377.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apollo-modules 11.0.0
File Interpreter ABI Platform
apollo_modules-11.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / apollo_modules-11.0.0.tar.gz

Download URL apollo_modules-11.0.0.tar.gz
Size 377.1 kB
Tags Source
SHA-256 checksum
How to use checksums
74f748ee507bc4582e2722e8c508070cecabc6e3756c073cc92ed85535df6966
BLAKE2b-256 checksum
How to use checksums
c868b3903fd760d716cd23cf12421725a8c8101234b0eb13cf16a660e4cbf7fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / apollo_modules-11.0.0-py3-none-any.whl

Download URL apollo_modules-11.0.0-py3-none-any.whl
Size 812.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c0cb959501411189f85edcad1796a9c5884d8ba08326f0b27305e9212376785
BLAKE2b-256 checksum
How to use checksums
7794d9044053e13f9e361ada0723f3836e497a8218fb0b722e59c3257d7a5b81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

11.0.0 This release

2 release files

9.0.2

2 release files

8.0.2

2 release files

7.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page