Metadata-Version: 2.4
Name: tempo-sim
Version: 0.4.0
Summary: Python client API for the Tempo simulation server. Generated gRPC wrappers with sync and async surfaces.
License-Expression: Apache-2.0
Project-URL: Homepage, https://temposimulation.com
Project-URL: Repository, https://github.com/tempo-sim/Tempo
Keywords: grpc,tempo,simulation,client
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: protobuf<8,>=5.29.6
Requires-Dist: grpcio>=1.62
Requires-Dist: curio-compat>=1.6
Requires-Dist: prompt_toolkit>=3.0
Provides-Extra: examples
Requires-Dist: numpy; extra == "examples"
Requires-Dist: opencv-python-headless>=4.10; extra == "examples"
Requires-Dist: matplotlib>=3.9; extra == "examples"
Requires-Dist: pyvista>=0.46; extra == "examples"
Requires-Dist: pyvistaqt>=0.11; extra == "examples"
Requires-Dist: qasync>=0.27; extra == "examples"
Requires-Dist: PyQt5>=5.15; extra == "examples"
Requires-Dist: av>=17.0; extra == "examples"
Requires-Dist: pynput>=1.7; extra == "examples"
Requires-Dist: rerun-sdk>=0.23; extra == "examples"
Requires-Dist: gradio>=6.15.1; extra == "examples"
Requires-Dist: starlette>=1.3.1; extra == "examples"
Dynamic: license-file

# tempo-sim

Python client API for the [Tempo](https://temposimulation.com) simulation server.

This package provides generated gRPC wrappers (built on
[protobuf](https://pypi.org/project/protobuf/) and
[grpcio](https://pypi.org/project/grpcio/)) for interacting with Tempo simulation
servers, exposing both synchronous and asynchronous surfaces.

## Installation

```bash
pip install tempo-sim
```

Visualization helpers and the example clients need extra dependencies:

```bash
pip install tempo-sim[examples]
```

## Quick start

```python
import tempo_sim
import tempo_sim.TempoSensors  # generated protobuf modules nest under the package

# Point the client at a running Tempo server.
tempo_sim.set_server("localhost", 10001)

# Or, for a server on this machine listening on a Unix domain socket (Linux/macOS):
tempo_sim.set_socket("sim-a.sock")

# Use the generated API modules, e.g. tempo_sensors, tempo_world.
from tempo_sim import tempo_sensors
```

The API is organized into per-service modules:

- `tempo_core` / `tempo_core_editor`
- `tempo_agents` / `tempo_agents_editor`
- `tempo_geographic`
- `tempo_movement`
- `tempo_sensors`
- `tempo_world`

Each wrapper takes its request's fields as keyword arguments, and works from synchronous and
asynchronous code alike:

```python
from tempo_sim import tempo_world

rig = tempo_world.spawn_actor(actor_type="BP_SensorRig")
tempo_world.destroy_actor(actor=rig.name)
```

Common helpers (`set_server`, `set_socket`, `run_async`) are re-exported at the package root.
Prefer brevity? `import tempo_sim as tempo`.

## The reflected API

The package also carries the runtime of Tempo's
[reflected API](https://tempo-sim.readthedocs.io/en/latest/clients/reflected-api/), which reaches a
build's properties and functions through generated, type-checked classes:

- `tempo_sim.unreal`: Unreal's value types (`FVector`, `FRotator`, `FTransform`, ...), in
  centimeters, degrees and left-handed, and the handle every generated class is built on.
- `tempo_sim.world`: finding, spawning and moving actors through those handles.
- `tempo_sim.conversion`: `ue_to_si` and `si_to_ue`, between Unreal's values and the API's meters,
  radians and right-handed frame.

The classes themselves are generated per project, from its packaged build, and ship in that
project's own package (`Packaged/API/Python/<project>/`), which depends on this one.

## License

Licensed under the [Apache License, Version 2.0](LICENSE).
