Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/build_config/pyproject/README_sumolib.md
185785 views

sumolib

sumolib is a set of python modules for working with SUMO networks, simulation output and other simulation artifacts.

Installation

Install sumolib by simply executing: pip install sumolib

A daily version is also available in TestPyPI: pip install -i https://test.pypi.org/simple/ sumolib

Getting Started

To use sumolib in your Python code, import the sumolib module. The following code snippet shows a basic example of how to load a network file and retrieve the coordinate of a node:

import sumolib # Parse the network net = sumolib.net.readNet("myNet.net.xml") # Retrieve the coordinate of a node based on its ID print(net.getNode("myNodeID").getCoord())

Documentation

The sumolib documentation is available online at https://sumo.dlr.de/docs/Tools/Sumolib.html. For a list of available functions take a look at the pydoc generated documentation or simply browse the source code here.

Contributing

If you find a bug in sumolib or have a suggestion for a new feature, please report it on the SUMO issue tracker at https://github.com/eclipse-sumo/sumo/issues. If you would like to contribute code to sumolib, please submit a pull request to the SUMO repository at https://github.com/eclipse-sumo/sumo.

License

sumolib is released under the Eclipse Public License 2.0 (EPL-2.0).