Metadata-Version: 2.1
Name: PyRMVtransport
Version: 0.2.9
Summary: Define module-level imports.
Home-page: http://github.com/cgtobi/PyRMVtransport
License: UNKNOWN
Author: cgtobi
Author-email: cgtobi@gmail.com
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: lxml
Requires-Dist: aiohttp
Requires-Dist: pytest >= 4.3.0; extra == "test"
Requires-Dist: pytest-cov >= 2.6.1; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Requires-Dist: aresponses; extra == "test"
Requires-Dist: pylint; extra == "test"
Requires-Dist: tox; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: pytest-aiohttp; extra == "test"
Requires-Dist: asynctest; extra == "test"
Requires-Dist: codecov; extra == "test"
Requires-Dist: coverage; extra == "test"
Requires-Dist: mock; extra == "test"
Requires-Dist: flake8; extra == "test"
Requires-Dist: mypy; extra == "test"
Requires-Dist: bandit; extra == "test"
Requires-Dist: pre-commit; extra == "test"
Requires-Dist: black; extra == "test"
Provides-Extra: test

# PyRMVtransport :bus:
Python library to make use of transport information from opendata.rmv.de.

[![CircleCI](https://circleci.com/gh/cgtobi/PyRMVtransport/tree/master.svg?style=svg)](https://circleci.com/gh/cgtobi/PyRMVtransport/tree/master)
[![PyPi](https://img.shields.io/pypi/v/PyRMVtransport.svg)](https://pypi.python.org/pypi/PyRMVtransport)
[![PyPi](https://img.shields.io/pypi/pyversions/PyRMVtransport.svg)](https://pypi.python.org/pypi/PyRMVtransport)
[![PyPi](https://img.shields.io/pypi/l/PyRMVtransport.svg)](https://github.com/cgtobi/PyRMVtransport/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/cgtobi/PyRMVtransport/branch/master/graph/badge.svg)](https://codecov.io/gh/cgtobi/PyRMVtransport)
[![Maintainability](https://api.codeclimate.com/v1/badges/9eeb0f9a9359b79205ad/maintainability)](https://codeclimate.com/github/cgtobi/PyRMVtransport/maintainability)
[![Downloads](https://pepy.tech/badge/pyrmvtransport)](https://pepy.tech/project/pyrmvtransport)

## Installation

```bash
$ pip install PyRMVtransport
```

## Usage

```python
import asyncio
import aiohttp
from RMVtransport import RMVtransport

async def main():
    """The main part of the example script."""
    async with aiohttp.ClientSession() as session:
        rmv = RMVtransport(session)

        # Get the data
        try:
            # Departures for station 3006907 (Wiesbaden Hauptbahnhof)
            # max. 5 results
            # only specified products (S-Bahn, U-Bahn, Tram)
            data = await rmv.get_departures(station_id='3006907',
                                            products=['S', 'U-Bahn', 'Tram'],
                                            max_journeys=5)

            # Use the JSON output
            print(data)

            # or pretty print
            await rmv.output()
        except TypeError:
            pass

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```

