overpy


Nameoverpy JSON
Version 0.7 PyPI version JSON
download
home_pagehttps://github.com/DinoTools/python-overpy
SummaryPython Wrapper to access the OpenStreepMap Overpass API
upload_time2023-12-04 12:20:17
maintainer
docs_urlNone
authorPhiBo (DinoTools)
requires_python>=3.6
licenseMIT
keywords overpy overpass osm openstreetmap
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            Python Overpass Wrapper
=======================

A Python Wrapper to access the Overpass API.

Have a look at the `documentation`_ to find additional information.

.. image:: https://img.shields.io/pypi/v/overpy.svg
    :target: https://pypi.python.org/pypi/overpy/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/l/overpy.svg
    :target: https://pypi.python.org/pypi/overpy/
    :alt: License

.. image:: https://github.com/DinoTools/python-overpy/actions/workflows/ci.yml/badge.svg?branch=master
    :target: https://github.com/DinoTools/python-overpy/actions/workflows/ci.yml?query=branch%3Amaster+

.. 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 >= 3.6.2
* 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/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DinoTools/python-overpy",
    "name": "overpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "OverPy Overpass OSM OpenStreetMap",
    "author": "PhiBo (DinoTools)",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/9a/21/4287be6d9de8092837d4d8cfe0bd1e9c48205f0d0760d221868bd0d74ce2/overpy-0.7.tar.gz",
    "platform": null,
    "description": "Python Overpass Wrapper\n=======================\n\nA Python Wrapper to access the Overpass API.\n\nHave a look at the `documentation`_ to find additional information.\n\n.. image:: https://img.shields.io/pypi/v/overpy.svg\n    :target: https://pypi.python.org/pypi/overpy/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/l/overpy.svg\n    :target: https://pypi.python.org/pypi/overpy/\n    :alt: License\n\n.. image:: https://github.com/DinoTools/python-overpy/actions/workflows/ci.yml/badge.svg?branch=master\n    :target: https://github.com/DinoTools/python-overpy/actions/workflows/ci.yml?query=branch%3Amaster+\n\n.. image:: https://coveralls.io/repos/DinoTools/python-overpy/badge.png?branch=master\n    :target: https://coveralls.io/r/DinoTools/python-overpy?branch=master\n\nFeatures\n--------\n\n* Query Overpass API\n* Parse JSON and XML response data\n* Additional helper functions\n\nInstall\n-------\n\n**Requirements:**\n\nSupported Python versions:\n\n* Python >= 3.6.2\n* PyPy3\n\n**Install:**\n\n.. code-block:: console\n\n    $ pip install overpy\n\nExamples\n--------\n\nAdditional examples can be found in the `documentation`_ and in the *examples* directory.\n\n.. code-block:: python\n\n    import overpy\n\n    api = overpy.Overpass()\n\n    # fetch all ways and nodes\n    result = api.query(\"\"\"\n        way(50.746,7.154,50.748,7.157) [\"highway\"];\n        (._;>;);\n        out body;\n        \"\"\")\n\n    for way in result.ways:\n        print(\"Name: %s\" % way.tags.get(\"name\", \"n/a\"))\n        print(\"  Highway: %s\" % way.tags.get(\"highway\", \"n/a\"))\n        print(\"  Nodes:\")\n        for node in way.nodes:\n            print(\"    Lat: %f, Lon: %f\" % (node.lat, node.lon))\n\n\nHelper\n~~~~~~\n\nHelper methods are available to provide easy access to often used requests.\n\n.. code-block:: python\n\n    import overpy.helper\n\n    # 3600062594 is the OSM id of Chemnitz and is the bounding box for the request\n    street = overpy.helper.get_street(\n        \"Stra\u00dfe der Nationen\",\n        \"3600062594\"\n    )\n\n    # this finds an intersection between Stra\u00dfe der Nationen and Carolastra\u00dfe in Chemnitz\n    intersection = overpy.helper.get_intersection(\n        \"Stra\u00dfe der Nationen\",\n        \"Carolastra\u00dfe\",\n        \"3600062594\"\n    )\n\n\nLicense\n-------\n\nPublished under the MIT (see LICENSE for more information)\n\n.. _`documentation`: http://python-overpy.readthedocs.org/\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python Wrapper to access the OpenStreepMap Overpass API",
    "version": "0.7",
    "project_urls": {
        "Documentation": "https://python-overpy.readthedocs.io/",
        "Homepage": "https://github.com/DinoTools/python-overpy",
        "Issue Tracker": "https://github.com/DinoTools/python-overpy/issues",
        "Source": "https://github.com/DinoTools/python-overpy"
    },
    "split_keywords": [
        "overpy",
        "overpass",
        "osm",
        "openstreetmap"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec12315d56e8386a4060d9a978a34ad48a9af072b67f40504eaa2f44197a15e5",
                "md5": "f50a047de8c8f37c6539c77b483bbfb3",
                "sha256": "cc888c9dcdf9076e667b435909f57e028845c4a1133b6a6f3528284a304516c3"
            },
            "downloads": -1,
            "filename": "overpy-0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f50a047de8c8f37c6539c77b483bbfb3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 14779,
            "upload_time": "2023-12-04T12:20:15",
            "upload_time_iso_8601": "2023-12-04T12:20:15.966210Z",
            "url": "https://files.pythonhosted.org/packages/ec/12/315d56e8386a4060d9a978a34ad48a9af072b67f40504eaa2f44197a15e5/overpy-0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9a214287be6d9de8092837d4d8cfe0bd1e9c48205f0d0760d221868bd0d74ce2",
                "md5": "7d70a8fe438a5bb39753ccda27b0dc46",
                "sha256": "f6df5073de0cc1f63aed6d2632140f98c3d91fa3a2e3bef1bcfaa6225500f364"
            },
            "downloads": -1,
            "filename": "overpy-0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "7d70a8fe438a5bb39753ccda27b0dc46",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 48555,
            "upload_time": "2023-12-04T12:20:17",
            "upload_time_iso_8601": "2023-12-04T12:20:17.593262Z",
            "url": "https://files.pythonhosted.org/packages/9a/21/4287be6d9de8092837d4d8cfe0bd1e9c48205f0d0760d221868bd0d74ce2/overpy-0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 12:20:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DinoTools",
    "github_project": "python-overpy",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "overpy"
}
        
Elapsed time: 0.14895s