python-opendata-transport 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_opendata_transport-0.1.4/PKG-INFO +60 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/opendata_transport/__init__.py +6 -2
- python_opendata_transport-0.1.4/python_opendata_transport.egg-info/PKG-INFO +60 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/setup.py +2 -1
- python_opendata_transport-0.1.2/PKG-INFO +0 -21
- python_opendata_transport-0.1.2/python_opendata_transport.egg-info/PKG-INFO +0 -21
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/LICENSE +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/MANIFEST.in +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/README.rst +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/opendata_transport/exceptions.py +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/SOURCES.txt +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/dependency_links.txt +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/requires.txt +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/top_level.txt +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/zip-safe +0 -0
- {python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/setup.cfg +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 1.1
|
|
2
|
+
Name: python_opendata_transport
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: Python API for interacting with transport.opendata.ch.
|
|
5
|
+
Home-page: https://github.com/fabaff/python-opendata-transport
|
|
6
|
+
Author: Fabian Affolter
|
|
7
|
+
Author-email: fabian@affolter-engineering.ch
|
|
8
|
+
License: MIT
|
|
9
|
+
Download-URL: https://github.com/fabaff/python-opendata-transport/releases
|
|
10
|
+
Description: python-opendata-transport
|
|
11
|
+
=========================
|
|
12
|
+
|
|
13
|
+
Python API for interacting with `transport.opendata.ch <http://transport.opendata.ch/>`_.
|
|
14
|
+
|
|
15
|
+
Th module which is the base for the integration into `Home Assistant <https://home-assistant.io>`_
|
|
16
|
+
is simply retrieving the details about a given connection between to stations.
|
|
17
|
+
|
|
18
|
+
This module is not official, developed, supported or endorsed by opendata.ch.
|
|
19
|
+
|
|
20
|
+
Installation
|
|
21
|
+
------------
|
|
22
|
+
|
|
23
|
+
The module is available from the `Python Package Index <https://pypi.python.org/pypi>`_.
|
|
24
|
+
|
|
25
|
+
.. code:: bash
|
|
26
|
+
|
|
27
|
+
$ pip3 install python_opendata_transport
|
|
28
|
+
|
|
29
|
+
Usage
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
The file ``example.py`` contains an example about how to use this module.
|
|
33
|
+
|
|
34
|
+
Development
|
|
35
|
+
-----------
|
|
36
|
+
|
|
37
|
+
For development is recommended to use a ``venv``.
|
|
38
|
+
|
|
39
|
+
.. code:: bash
|
|
40
|
+
|
|
41
|
+
$ python3.6 -m venv .
|
|
42
|
+
$ source bin/activate
|
|
43
|
+
$ python3 setup.py develop
|
|
44
|
+
|
|
45
|
+
License
|
|
46
|
+
-------
|
|
47
|
+
|
|
48
|
+
``python-opendata-transport`` is licensed under MIT, for more details check LICENSE.
|
|
49
|
+
|
|
50
|
+
Platform: UNKNOWN
|
|
51
|
+
Classifier: Development Status :: 3 - Alpha
|
|
52
|
+
Classifier: Environment :: Console
|
|
53
|
+
Classifier: Intended Audience :: Developers
|
|
54
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
55
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
56
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
57
|
+
Classifier: Operating System :: POSIX
|
|
58
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
59
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
60
|
+
Classifier: Topic :: Utilities
|
{python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/opendata_transport/__init__.py
RENAMED
|
@@ -33,15 +33,19 @@ class OpendataTransport(object):
|
|
|
33
33
|
|
|
34
34
|
try:
|
|
35
35
|
with async_timeout.timeout(5, loop=self._loop):
|
|
36
|
-
response = await self._session.get(url)
|
|
36
|
+
response = await self._session.get(url, raise_for_status=True)
|
|
37
37
|
|
|
38
38
|
_LOGGER.debug(
|
|
39
39
|
"Response from transport.opendata.ch: %s", response.status)
|
|
40
40
|
data = await response.json()
|
|
41
41
|
_LOGGER.debug(data)
|
|
42
|
-
except (asyncio.TimeoutError
|
|
42
|
+
except (asyncio.TimeoutError):
|
|
43
43
|
_LOGGER.error("Can not load data from transport.opendata.ch")
|
|
44
44
|
raise exceptions.OpendataTransportConnectionError()
|
|
45
|
+
except (aiohttp.ClientError) as aiohttpClientError:
|
|
46
|
+
_LOGGER.error("Response from transport.opendata.ch: %s",
|
|
47
|
+
aiohttpClientError)
|
|
48
|
+
raise exceptions.OpendataTransportConnectionError()
|
|
45
49
|
|
|
46
50
|
try:
|
|
47
51
|
self.from_id = data['from']['id']
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 1.1
|
|
2
|
+
Name: python-opendata-transport
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: Python API for interacting with transport.opendata.ch.
|
|
5
|
+
Home-page: https://github.com/fabaff/python-opendata-transport
|
|
6
|
+
Author: Fabian Affolter
|
|
7
|
+
Author-email: fabian@affolter-engineering.ch
|
|
8
|
+
License: MIT
|
|
9
|
+
Download-URL: https://github.com/fabaff/python-opendata-transport/releases
|
|
10
|
+
Description: python-opendata-transport
|
|
11
|
+
=========================
|
|
12
|
+
|
|
13
|
+
Python API for interacting with `transport.opendata.ch <http://transport.opendata.ch/>`_.
|
|
14
|
+
|
|
15
|
+
Th module which is the base for the integration into `Home Assistant <https://home-assistant.io>`_
|
|
16
|
+
is simply retrieving the details about a given connection between to stations.
|
|
17
|
+
|
|
18
|
+
This module is not official, developed, supported or endorsed by opendata.ch.
|
|
19
|
+
|
|
20
|
+
Installation
|
|
21
|
+
------------
|
|
22
|
+
|
|
23
|
+
The module is available from the `Python Package Index <https://pypi.python.org/pypi>`_.
|
|
24
|
+
|
|
25
|
+
.. code:: bash
|
|
26
|
+
|
|
27
|
+
$ pip3 install python_opendata_transport
|
|
28
|
+
|
|
29
|
+
Usage
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
The file ``example.py`` contains an example about how to use this module.
|
|
33
|
+
|
|
34
|
+
Development
|
|
35
|
+
-----------
|
|
36
|
+
|
|
37
|
+
For development is recommended to use a ``venv``.
|
|
38
|
+
|
|
39
|
+
.. code:: bash
|
|
40
|
+
|
|
41
|
+
$ python3.6 -m venv .
|
|
42
|
+
$ source bin/activate
|
|
43
|
+
$ python3 setup.py develop
|
|
44
|
+
|
|
45
|
+
License
|
|
46
|
+
-------
|
|
47
|
+
|
|
48
|
+
``python-opendata-transport`` is licensed under MIT, for more details check LICENSE.
|
|
49
|
+
|
|
50
|
+
Platform: UNKNOWN
|
|
51
|
+
Classifier: Development Status :: 3 - Alpha
|
|
52
|
+
Classifier: Environment :: Console
|
|
53
|
+
Classifier: Intended Audience :: Developers
|
|
54
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
55
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
56
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
57
|
+
Classifier: Operating System :: POSIX
|
|
58
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
59
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
60
|
+
Classifier: Topic :: Utilities
|
|
@@ -21,8 +21,9 @@ if sys.argv[-1] == 'publish':
|
|
|
21
21
|
|
|
22
22
|
setup(
|
|
23
23
|
name='python_opendata_transport',
|
|
24
|
-
version='0.1.
|
|
24
|
+
version='0.1.4',
|
|
25
25
|
description='Python API for interacting with transport.opendata.ch.',
|
|
26
|
+
long_description=long_description,
|
|
26
27
|
url='https://github.com/fabaff/python-opendata-transport',
|
|
27
28
|
download_url='https://github.com/fabaff/python-opendata-transport/releases',
|
|
28
29
|
author='Fabian Affolter',
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 1.1
|
|
2
|
-
Name: python_opendata_transport
|
|
3
|
-
Version: 0.1.2
|
|
4
|
-
Summary: Python API for interacting with transport.opendata.ch.
|
|
5
|
-
Home-page: https://github.com/fabaff/python-opendata-transport
|
|
6
|
-
Author: Fabian Affolter
|
|
7
|
-
Author-email: fabian@affolter-engineering.ch
|
|
8
|
-
License: MIT
|
|
9
|
-
Download-URL: https://github.com/fabaff/python-opendata-transport/releases
|
|
10
|
-
Description: UNKNOWN
|
|
11
|
-
Platform: UNKNOWN
|
|
12
|
-
Classifier: Development Status :: 3 - Alpha
|
|
13
|
-
Classifier: Environment :: Console
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
-
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
-
Classifier: Operating System :: POSIX
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.5
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
21
|
-
Classifier: Topic :: Utilities
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 1.1
|
|
2
|
-
Name: python-opendata-transport
|
|
3
|
-
Version: 0.1.2
|
|
4
|
-
Summary: Python API for interacting with transport.opendata.ch.
|
|
5
|
-
Home-page: https://github.com/fabaff/python-opendata-transport
|
|
6
|
-
Author: Fabian Affolter
|
|
7
|
-
Author-email: fabian@affolter-engineering.ch
|
|
8
|
-
License: MIT
|
|
9
|
-
Download-URL: https://github.com/fabaff/python-opendata-transport/releases
|
|
10
|
-
Description: UNKNOWN
|
|
11
|
-
Platform: UNKNOWN
|
|
12
|
-
Classifier: Development Status :: 3 - Alpha
|
|
13
|
-
Classifier: Environment :: Console
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
-
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
-
Classifier: Operating System :: POSIX
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.5
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
21
|
-
Classifier: Topic :: Utilities
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_opendata_transport-0.1.2 → python_opendata_transport-0.1.4}/opendata_transport/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|