-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,974 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
Metadata-Version: 1.1 | ||
Name: overpy | ||
Version: 0.4 | ||
Summary: Python Wrapper to access the OpenStreepMap Overpass API | ||
Home-page: https://github.com/DinoTools/python-overpy | ||
Author: PhiBo (DinoTools) | ||
Author-email: UNKNOWN | ||
License: MIT | ||
Description: Python Overpass Wrapper | ||
======================= | ||
|
||
A Python Wrapper to access the Overpass API. | ||
|
||
Have a look at the `documentation`_ to find additional information. | ||
|
||
.. image:: https://pypip.in/version/overpy/badge.svg | ||
:target: https://pypi.python.org/pypi/overpy/ | ||
:alt: Latest Version | ||
|
||
.. image:: https://pypip.in/license/overpy/badge.svg | ||
:target: https://pypi.python.org/pypi/overpy/ | ||
:alt: License | ||
|
||
.. image:: https://travis-ci.org/DinoTools/python-overpy.svg?branch=master | ||
:target: https://travis-ci.org/DinoTools/python-overpy | ||
|
||
.. image:: https://coveralls.io/repos/DinoTools/python-overpy/badge.png?branch=master | ||
:target: https://coveralls.io/r/DinoTools/python-overpy?branch=master | ||
|
||
Features | ||
-------- | ||
|
||
* Query Overpass API | ||
* Parse JSON and XML response data | ||
* Additional helper functions | ||
|
||
Install | ||
------- | ||
|
||
**Requirements:** | ||
|
||
Supported Python versions: | ||
|
||
* Python 2.7 | ||
* Python >= 3.2 | ||
* PyPy and PyPy3 | ||
|
||
**Install:** | ||
|
||
.. code-block:: console | ||
|
||
$ pip install overpy | ||
|
||
Examples | ||
-------- | ||
|
||
Additional examples can be found in the `documentation`_ and in the *examples* directory. | ||
|
||
.. code-block:: python | ||
|
||
import overpy | ||
|
||
api = overpy.Overpass() | ||
|
||
# fetch all ways and nodes | ||
result = api.query(""" | ||
way(50.746,7.154,50.748,7.157) ["highway"]; | ||
(._;>;); | ||
out body; | ||
""") | ||
|
||
for way in result.ways: | ||
print("Name: %s" % way.tags.get("name", "n/a")) | ||
print(" Highway: %s" % way.tags.get("highway", "n/a")) | ||
print(" Nodes:") | ||
for node in way.nodes: | ||
print(" Lat: %f, Lon: %f" % (node.lat, node.lon)) | ||
|
||
|
||
Helper | ||
~~~~~~ | ||
|
||
Helper methods are available to provide easy access to often used requests. | ||
|
||
.. code-block:: python | ||
|
||
import overpy.helper | ||
|
||
# 3600062594 is the OSM id of Chemnitz and is the bounding box for the request | ||
street = overpy.helper.get_street( | ||
"Straße der Nationen", | ||
"3600062594" | ||
) | ||
|
||
# this finds an intersection between Straße der Nationen and Carolastraße in Chemnitz | ||
intersection = overpy.helper.get_intersection( | ||
"Straße der Nationen", | ||
"Carolastraße", | ||
"3600062594" | ||
) | ||
|
||
|
||
License | ||
------- | ||
|
||
Published under the MIT (see LICENSE for more information) | ||
|
||
.. _`documentation`: http://python-overpy.readthedocs.org/ | ||
|
||
Keywords: OverPy Overpass OSM OpenStreetMap | ||
Platform: UNKNOWN | ||
Classifier: Development Status :: 4 - Beta | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Operating System :: OS Independent | ||
Classifier: Programming Language :: Python | ||
Classifier: Programming Language :: Python :: 2.7 | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: Programming Language :: Python :: 3.2 | ||
Classifier: Programming Language :: Python :: 3.3 | ||
Classifier: Programming Language :: Python :: 3.4 | ||
Classifier: Programming Language :: Python :: 3.5 | ||
Classifier: Programming Language :: Python :: Implementation :: CPython | ||
Classifier: Programming Language :: Python :: Implementation :: PyPy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
CHANGELOG.rst | ||
LICENSE | ||
MANIFEST.in | ||
README.rst | ||
setup.cfg | ||
setup.py | ||
docs/make.bat | ||
docs/source/api.rst | ||
docs/source/changelog.rst | ||
docs/source/conf.py | ||
docs/source/contributing.rst | ||
docs/source/example.rst | ||
docs/source/index.rst | ||
docs/source/introduction.rst | ||
examples/get_areas.py | ||
examples/get_nodes.py | ||
examples/get_ways.py | ||
overpy/__about__.py | ||
overpy/__init__.py | ||
overpy/exception.py | ||
overpy/helper.py | ||
overpy.egg-info/PKG-INFO | ||
overpy.egg-info/SOURCES.txt | ||
overpy.egg-info/dependency_links.txt | ||
overpy.egg-info/not-zip-safe | ||
overpy.egg-info/top_level.txt | ||
tests/__init__.py | ||
tests/base_class.py | ||
tests/test_exception.py | ||
tests/test_json.py | ||
tests/test_request.py | ||
tests/test_result.py | ||
tests/test_result_way.py | ||
tests/test_xml.py | ||
tests/json/area-01.json | ||
tests/json/node-01.json | ||
tests/json/relation-01.json | ||
tests/json/relation-02.json | ||
tests/json/relation-03.json | ||
tests/json/relation-04.json | ||
tests/json/result-expand-01.json | ||
tests/json/result-expand-02.json | ||
tests/json/result-way-01.json | ||
tests/json/result-way-02.json | ||
tests/json/result-way-03.json | ||
tests/json/way-01.json | ||
tests/json/way-02.json | ||
tests/json/way-03.json | ||
tests/json/way-04.json | ||
tests/response/bad-request-encoding.html | ||
tests/response/bad-request.html | ||
tests/xml/area-01.xml | ||
tests/xml/node-01.xml | ||
tests/xml/relation-01.xml | ||
tests/xml/relation-02.xml | ||
tests/xml/relation-03.xml | ||
tests/xml/relation-04.xml | ||
tests/xml/way-01.xml | ||
tests/xml/way-02.xml | ||
tests/xml/way-03.xml | ||
tests/xml/way-04.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
../overpy/__about__.py | ||
../overpy/__about__.pyc | ||
../overpy/__init__.py | ||
../overpy/__init__.pyc | ||
../overpy/exception.py | ||
../overpy/exception.pyc | ||
../overpy/helper.py | ||
../overpy/helper.pyc | ||
../tests/__init__.py | ||
../tests/__init__.pyc | ||
../tests/base_class.py | ||
../tests/base_class.pyc | ||
../tests/json/area-01.json | ||
../tests/json/node-01.json | ||
../tests/json/relation-01.json | ||
../tests/json/relation-02.json | ||
../tests/json/relation-03.json | ||
../tests/json/relation-04.json | ||
../tests/json/result-expand-01.json | ||
../tests/json/result-expand-02.json | ||
../tests/json/result-way-01.json | ||
../tests/json/result-way-02.json | ||
../tests/json/result-way-03.json | ||
../tests/json/way-01.json | ||
../tests/json/way-02.json | ||
../tests/json/way-03.json | ||
../tests/json/way-04.json | ||
../tests/response/bad-request-encoding.html | ||
../tests/response/bad-request.html | ||
../tests/test_exception.py | ||
../tests/test_exception.pyc | ||
../tests/test_json.py | ||
../tests/test_json.pyc | ||
../tests/test_request.py | ||
../tests/test_request.pyc | ||
../tests/test_result.py | ||
../tests/test_result.pyc | ||
../tests/test_result_way.py | ||
../tests/test_result_way.pyc | ||
../tests/test_xml.py | ||
../tests/test_xml.pyc | ||
../tests/xml/area-01.xml | ||
../tests/xml/node-01.xml | ||
../tests/xml/relation-01.xml | ||
../tests/xml/relation-02.xml | ||
../tests/xml/relation-03.xml | ||
../tests/xml/relation-04.xml | ||
../tests/xml/way-01.xml | ||
../tests/xml/way-02.xml | ||
../tests/xml/way-03.xml | ||
../tests/xml/way-04.xml | ||
PKG-INFO | ||
SOURCES.txt | ||
dependency_links.txt | ||
not-zip-safe | ||
top_level.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
overpy | ||
tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
__all__ = [ | ||
"__author__", | ||
"__copyright__", | ||
"__email__", | ||
"__license__", | ||
"__summary__", | ||
"__title__", | ||
"__uri__", | ||
"__version__", | ||
] | ||
|
||
__title__ = "overpy" | ||
__summary__ = "Python Wrapper to access the OpenStreepMap Overpass API" | ||
__uri__ = "https://github.com/DinoTools/python-overpy" | ||
|
||
__version__ = "0.4" | ||
|
||
__author__ = "PhiBo (DinoTools)" | ||
__email__ = "" | ||
|
||
__license__ = "MIT" | ||
__copyright__ = "Copyright 2014-2016 %s" % __author__ |
Oops, something went wrong.