Skip to main content

Python client for macro_traffic_sim gRPC Server

Python 3.10+ Typing: Typed

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

Installation

pip install macro-traffic-sim

Usage

import grpc
from macro_traffic_sim import (
    MacroServiceStub,
    NewSessionRequest,
    Node,
    Link,
    Zone,
    NetworkChunk,
    ZoneChunk,
    ModelConfigRequest,
    BprConfig,
    RunPipelineRequest,
    LinkVolumesRequest,
    UUIDv4,
)

# Connect to server
channel = grpc.insecure_channel("127.0.0.1:50052")
client = MacroServiceStub(channel)

# Create a new session
response = client.NewSession(NewSessionRequest())
session_id = response.session_id.value
print(f"Session: {session_id}")

# Push network, zones, configure, run pipeline, get results...

Documentation

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

Running the example

  1. Start the gRPC server:
cargo run --features server --bin macro_traffic_sim
  1. Run the example (from repository root):
source clients/python/.venv/bin/activate
python clients/python/examples/main.py

Metadata

Release files for macro-traffic-sim 0.2.1

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

Source distribution (sdist)

Source distribution for macro-traffic-sim 0.2.1
File Size Uploaded Provenance Actions
macro_traffic_sim-0.2.1.tar.gz 15.5 kB Without provenance Details for macro_traffic_sim-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 41.7 kB

Release files / macro_traffic_sim-0.2.1.tar.gz

Download URL macro_traffic_sim-0.2.1.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5cd3655318788e433c98e812ec204f0adfd0f6f0f714fb940c151e23d7b80343
BLAKE2b-256 checksum
How to use checksums
86ecb73c245adff809efffc6fc41c98be48a4a359e86aac411784bb014e716c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / macro_traffic_sim-0.2.1-py3-none-any.whl

Download URL macro_traffic_sim-0.2.1-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
073de68b96bd02e27813e1b6b5012822fd1e2bfc417d6d20d0033634f3a20cef
BLAKE2b-256 checksum
How to use checksums
f6bfcc839bae47031f862479e2a98c44cc88d6f3db1c44362ccd8b9c5887b1f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for macro-traffic-sim 0.2.1

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