From cf642fc00ffda485828ce237f11a7f1f6eb7a1c2 Mon Sep 17 00:00:00 2001 From: profitroll Date: Tue, 27 Sep 2022 15:12:15 +0200 Subject: [PATCH] product const added --- pyrmv/__init__.py | 1 + pyrmv/const/__init__.py | 0 pyrmv/const/product.py | 20 ++++++++++++++++++++ setup.py | 1 + 4 files changed, 22 insertions(+) create mode 100644 pyrmv/const/__init__.py create mode 100644 pyrmv/const/product.py diff --git a/pyrmv/__init__.py b/pyrmv/__init__.py index b669181..0639791 100644 --- a/pyrmv/__init__.py +++ b/pyrmv/__init__.py @@ -29,4 +29,5 @@ from . import raw from . import errors from . import utility from . import classes +from . import const from .methods import * \ No newline at end of file diff --git a/pyrmv/const/__init__.py b/pyrmv/const/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pyrmv/const/product.py b/pyrmv/const/product.py new file mode 100644 index 0000000..e635ae1 --- /dev/null +++ b/pyrmv/const/product.py @@ -0,0 +1,20 @@ +from typing import Dict + +# Constant is taken from source of PyRMVtransport: +# https://github.com/cgtobi/PyRMVtransport/blob/development/RMVtransport/const.py +PRODUCTS: Dict[str, int] = { + "ICE": 1, + "IC": 2, + "EC": 2, + "R": 4, + "RB": 4, + "RE": 4, + "S": 8, + "U-Bahn": 16, + "Tram": 32, + "Bus": 64, + "Bus2": 128, + "Fähre": 256, + "Taxi": 512, + "Bahn": 1024, +} \ No newline at end of file diff --git a/setup.py b/setup.py index b0efd36..03de73b 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ setup( packages=[ "pyrmv", "pyrmv.raw", + "pyrmv.const", "pyrmv.errors", "pyrmv.methods", "pyrmv.utility",