semvec/pypi-packages huggingface dataset:
path-imports 1.1.2
Import modules from anywhere on the file system.
Requires Python: >=3.8

## Introduction

Import modules from anywhere on the file system.

## Usage

```python
import path_imports


# Import a certain file
foo_module = path_imports.import_from_path('somewhere/on your/file system/foo.py')

# Import a module from a certain directory
submodule = path_imports.import_from_directory('some/directory', 'root_module.submodule')

# Find the file path of a module
path = path_imports.find_module_location('my_module', directory='my project folder')
print(path)  # Output: "my project folder/my_module.py"
```

## Installation

```
pip install path-imports
```

## Documentation

There is no online documentation; however, the module has docstrings and type annotations. Your IDE
should display all the relevant information to you.
apollo-modules 7.0.2
This is a package including baidu apollo' proto modules
Requires Python: >=3.6

## 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
```bash
pip install apollo_modules==[version]  # Supported versions: '7.0.1', '8.0.1', '9.0.1'
```
Note that, to accommodate changes across different versions of Apollo, we provide multiple versions of our package.

#### Option 2: Build from Source
```bash
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
python
>>> import apollo_modules
>>> from apollo_modules.modules.planning.proto.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:
```python
from apollo_modules.modules.planning.proto.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
bash proto_generate.sh /path/to/apollo_root /path/to/output
```