python-opendata-transport 0.0.3__tar.gz → 0.1.0__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.
Files changed (15) hide show
  1. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/PKG-INFO +3 -2
  2. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/opendata_transport/__init__.py +4 -5
  3. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/opendata_transport/exceptions.py +1 -1
  4. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/python_opendata_transport.egg-info/PKG-INFO +3 -2
  5. python_opendata_transport-0.1.0/python_opendata_transport.egg-info/requires.txt +2 -0
  6. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/setup.py +8 -3
  7. python_opendata_transport-0.0.3/python_opendata_transport.egg-info/requires.txt +0 -1
  8. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/LICENSE +0 -0
  9. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/MANIFEST.in +0 -0
  10. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/README.rst +0 -0
  11. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/python_opendata_transport.egg-info/SOURCES.txt +0 -0
  12. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/python_opendata_transport.egg-info/dependency_links.txt +0 -0
  13. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/python_opendata_transport.egg-info/top_level.txt +0 -0
  14. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/python_opendata_transport.egg-info/zip-safe +0 -0
  15. {python_opendata_transport-0.0.3 → python_opendata_transport-0.1.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: python_opendata_transport
3
- Version: 0.0.3
3
+ Version: 0.1.0
4
4
  Summary: Python API for interacting with transport.opendata.ch.
5
5
  Home-page: https://github.com/fabaff/python-opendata-transport
6
6
  Author: Fabian Affolter
@@ -16,5 +16,6 @@ Classifier: License :: OSI Approved :: MIT License
16
16
  Classifier: Operating System :: MacOS :: MacOS X
17
17
  Classifier: Operating System :: Microsoft :: Windows
18
18
  Classifier: Operating System :: POSIX
19
- Classifier: Programming Language :: Python :: 3.4
19
+ Classifier: Programming Language :: Python :: 3.5
20
+ Classifier: Programming Language :: Python :: 3.6
20
21
  Classifier: Topic :: Utilities
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright (c) 2015-2017 Fabian Affolter <fabian@affolter-engineering.ch>
2
+ Copyright (c) 2015-2018 Fabian Affolter <fabian@affolter-engineering.ch>
3
3
 
4
4
  Licensed under MIT. All rights reserved.
5
5
  """
@@ -27,18 +27,17 @@ class OpendataTransport(object):
27
27
  self.from_name = self.from_id = self.to_name = self.to_id = None
28
28
  self.connections = dict()
29
29
 
30
- @asyncio.coroutine
31
- def async_get_data(self):
30
+ async def async_get_data(self):
32
31
  url = '{resource}connections?from={start}&to={dest}'.format(
33
32
  resource=_RESOURCE, start=self.start, dest=self.destination)
34
33
 
35
34
  try:
36
35
  with async_timeout.timeout(5, loop=self._loop):
37
- response = yield from self._session.get(url)
36
+ response = await self._session.get(url)
38
37
 
39
38
  _LOGGER.debug(
40
39
  "Response from transport.opendata.ch: %s", response.status)
41
- data = yield from response.json()
40
+ data = await response.json()
42
41
  _LOGGER.debug(data)
43
42
  except (asyncio.TimeoutError, aiohttp.ClientError):
44
43
  _LOGGER.error("Can not load data from transport.opendata.ch")
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright (c) 2015-2017 Fabian Affolter <fabian@affolter-engineering.ch>
2
+ Copyright (c) 2015-2018 Fabian Affolter <fabian@affolter-engineering.ch>
3
3
 
4
4
  Licensed under MIT. All rights reserved.
5
5
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: python-opendata-transport
3
- Version: 0.0.3
3
+ Version: 0.1.0
4
4
  Summary: Python API for interacting with transport.opendata.ch.
5
5
  Home-page: https://github.com/fabaff/python-opendata-transport
6
6
  Author: Fabian Affolter
@@ -16,5 +16,6 @@ Classifier: License :: OSI Approved :: MIT License
16
16
  Classifier: Operating System :: MacOS :: MacOS X
17
17
  Classifier: Operating System :: Microsoft :: Windows
18
18
  Classifier: Operating System :: POSIX
19
- Classifier: Programming Language :: Python :: 3.4
19
+ Classifier: Programming Language :: Python :: 3.5
20
+ Classifier: Programming Language :: Python :: 3.6
20
21
  Classifier: Topic :: Utilities
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env python3
2
+ """
3
+ Copyright (c) 2015-2018 Fabian Affolter <fabian@affolter-engineering.ch>
2
4
 
5
+ Licensed under MIT. All rights reserved.
6
+ """
3
7
  import os
4
8
  import sys
5
9
 
@@ -14,14 +18,14 @@ if sys.argv[-1] == 'publish':
14
18
 
15
19
  setup(
16
20
  name='python_opendata_transport',
17
- version='0.0.3',
21
+ version='0.1.0',
18
22
  description='Python API for interacting with transport.opendata.ch.',
19
23
  url='https://github.com/fabaff/python-opendata-transport',
20
24
  download_url='https://github.com/fabaff/python-opendata-transport/releases',
21
25
  author='Fabian Affolter',
22
26
  author_email='fabian@affolter-engineering.ch',
23
27
  license='MIT',
24
- install_requires=['aiohttp'],
28
+ install_requires=['aiohttp', 'async_timeout'],
25
29
  packages=['opendata_transport'],
26
30
  zip_safe=True,
27
31
  classifiers=[
@@ -32,7 +36,8 @@ setup(
32
36
  'Operating System :: MacOS :: MacOS X',
33
37
  'Operating System :: Microsoft :: Windows',
34
38
  'Operating System :: POSIX',
35
- 'Programming Language :: Python :: 3.4',
39
+ 'Programming Language :: Python :: 3.5',
40
+ 'Programming Language :: Python :: 3.6',
36
41
  'Topic :: Utilities',
37
42
  ],
38
43
  )