Skip to main content

Python client for micro_traffic_sim gRPC Server

Python 3.10+ Typing: Typed

Python client library for the microscopic traffic simulation gRPC server with full type hints support.

Installation

pip install micro-traffic-sim

Usage

import grpc
from micro_traffic_sim import (
    ServiceStub,
    SessionReq,
    Cell,
    Point,
    ZoneType,
)

# Connect to server
channel = grpc.insecure_channel("127.0.0.1:50051")
client = ServiceStub(channel)

# Create a new session
response = client.NewSession(SessionReq(srid=0))
session_id = response.id.value

# Push grid cells, trips, traffic lights, and run simulation...

Documentation

  • Full example: See examples/ for a complete simulation workflow

Running the example

  1. Start the gRPC server:
cargo run --features server --bin micro_traffic_sim
  1. Run the example (from repository root):
source clients/python/.venv/bin/activate
python clients/python/examples/main.py
  1. Generate visualization:
python clients/python/examples/main.py > clients/python/examples/output.txt
gnuplot clients/python/examples/plot_anim.gnuplot

Metadata

Release files for micro-traffic-sim 0.2.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 micro-traffic-sim 0.2.0
File Size Uploaded Provenance Actions
micro_traffic_sim-0.2.0.tar.gz 17.7 kB Without provenance Details for micro_traffic_sim-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for micro-traffic-sim 0.2.0
File Interpreter ABI Platform Actions
micro_traffic_sim-0.2.0-py3-none-any.whl Python 3 none any Details for micro_traffic_sim-0.2.0-py3-none-any.whl

Total release size: 50.5 kB

Release files / micro_traffic_sim-0.2.0.tar.gz

Download URL micro_traffic_sim-0.2.0.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
35f30d14cfee1665fda8688c474ec86fb543acc4cc83c7ad350a19db5c4d3641
BLAKE2b-256 checksum
How to use checksums
f9194836dff079634f880f17931716e2c890aa9712a4165854d112ab3ab15ce4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / micro_traffic_sim-0.2.0-py3-none-any.whl

Download URL micro_traffic_sim-0.2.0-py3-none-any.whl
Size 32.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d8fb3d4d31e7251444001c23039a2b0352d15a7fb20d5c0de89d234d868fab3
BLAKE2b-256 checksum
How to use checksums
a0c8df4b9c7087fc6cc0f1b7635ec207a18a52f1ff28c50b2719d82947458789
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for micro-traffic-sim 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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