Metadata-Version: 2.1
Name: public-transit-viewer
Version: 0.5.0
Summary: Viewer to interact with the public transit service.
Author: Lukas Connolly
Author-email: lukas@connolly.ch
Requires-Python: >=3.12,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: folium (>=0.17.0,<0.18.0)
Requires-Dist: matplotlib (>=3.9.2,<4.0.0)
Requires-Dist: pandas (>=2.2.2,<3.0.0)
Requires-Dist: public-transit-client (>=0.5.2,<0.6.0)
Requires-Dist: pydantic (>=2.8.2,<3.0.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: streamlit (>=1.37.1,<2.0.0)
Requires-Dist: streamlit-folium (>=0.22.0,<0.23.0)
Requires-Dist: streamlit-searchbox (>=0.1.14,<0.2.0)
Requires-Dist: watchdog (>=4.0.2,<5.0.0)
Description-Content-Type: text/markdown

# Public Transit Viewer

Viewer to interact with the [Public Transit Service](https://github.com/naviqore/public-transit-service).

The streamlit based Python app allows users to query connections between two stops or generate isolines from a specific
stop. The application supports the query parameters of the service to search specific connections or isoline.

## Installation

Get the current release from pypi and start the viewer:

```sh
pip install public-transit-viewer

export NAVIQORE_SERVICE_URL=<SERVER:PORT>
ptv-deploy
```

Or run the viewer inside a Docker container:

```sh
docker run -p 8501:8501 -e NAVIQORE_SERVICE_URL=<SERVER:PORT> ghcr.io/naviqore/public-transit-client:latest
```

Access the viewer on `http://localhost:8501`.

## Development

### Configuration

Create a `.env` file in the root directory. And add a line telling the application to which service host it should
connect. In Local Development this is typically a Java Spring service running on `http://localhost:8080`.

The required line in the `.env` file will then be: `NAVIQORE_SERVICE_URL=http://localhost:8080`

**Note**: you can also specify the `NAVIQORE_SERVICE_URL` in your operating system environment.

### Starting the App

To start the app in development mode run following command from the root directory:

```sh
poetry run streamlit run public_transit_viewer/connections.py
```

## License

This project is licensed under the MIT License - see
the [LICENSE](https://github.com/naviqore/public-transit-viewer/blob/main/LICENSE) file for details.

