[Python-modules-commits] [python-overpy] 01/07: Import python-overpy_0.4.orig.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Mon Dec 12 03:35:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository python-overpy.

commit 65919d47375e8d7e3a5f56aa5eb4ea4ccc8ae83e
Author: Sandro Tosi <morph at debian.org>
Date:   Sun Dec 11 19:30:06 2016 -0500

    Import python-overpy_0.4.orig.tar.gz
---
 CHANGELOG.rst                            |   52 ++
 LICENSE                                  |   22 +
 MANIFEST.in                              |   11 +
 PKG-INFO                                 |    4 +-
 docs/make.bat                            |  242 ++++++
 docs/source/api.rst                      |   66 ++
 docs/source/changelog.rst                |    1 +
 docs/source/conf.py                      |  335 ++++++++
 docs/source/contributing.rst             |    1 +
 docs/source/example.rst                  |  260 ++++++
 docs/source/index.rst                    |   21 +
 docs/source/introduction.rst             |   74 ++
 examples/get_areas.py                    |   21 +
 examples/get_nodes.py                    |   22 +
 examples/get_ways.py                     |   18 +
 overpy.egg-info/PKG-INFO                 |    4 +-
 overpy.egg-info/SOURCES.txt              |   44 +-
 overpy/__about__.py                      |    4 +-
 overpy/__init__.py                       |  716 ++++++++++++++--
 overpy/exception.py                      |    4 +-
 setup.cfg                                |    9 +
 setup.py                                 |   14 +-
 tests/__init__.py                        |   15 +-
 tests/base_class.py                      |  198 ++++-
 tests/json/area-01.json                  |   92 ++
 tests/json/node-01.json                  |   37 +
 tests/json/relation-01.json              |   54 ++
 tests/json/relation-02.json              |   76 ++
 tests/json/relation-03.json              |  699 +++++++++++++++
 tests/json/relation-04.json              | 1378 ++++++++++++++++++++++++++++++
 tests/json/result-expand-01.json         |   33 +
 tests/json/result-expand-02.json         |   76 ++
 tests/json/result-way-01.json            |   21 +
 tests/json/result-way-02.json            |   27 +
 tests/json/result-way-03.json            |   33 +
 tests/json/way-01.json                   |   46 +
 tests/json/way-02.json                   |   64 ++
 tests/json/way-03.json                   |   80 ++
 tests/json/way-04.json                   |   28 +
 tests/response/bad-request-encoding.html |   16 +
 tests/response/bad-request.html          |   15 +
 tests/test_json.py                       |   29 +-
 tests/test_request.py                    |    9 -
 tests/test_result.py                     |   38 +-
 tests/test_result_way.py                 |    3 -
 tests/test_xml.py                        |   80 +-
 tests/xml/area-01.xml                    |   66 ++
 tests/xml/node-01.xml                    |   11 +
 tests/xml/relation-01.xml                |   18 +
 tests/xml/relation-02.xml                |   25 +
 tests/xml/relation-03.xml                |  153 ++++
 tests/xml/relation-04.xml                |  697 +++++++++++++++
 tests/xml/way-01.xml                     |   25 +
 tests/xml/way-02.xml                     |   22 +
 tests/xml/way-03.xml                     |   21 +
 tests/xml/way-04.xml                     |   17 +
 56 files changed, 6044 insertions(+), 103 deletions(-)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 0000000..401c409
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,52 @@
+Changelog
+=========
+
+0.x (`master`_)
+~~~~~~~~~~~~~~~
+
+.. note:: This version is not yet released and is under development.
+
+0.4 (2016-12-08)
+~~~~~~~~~~~~~~~~
+
+* Add SAX parser
+* Add option to choose DOM or SAX parser
+* Fix issues with CI builds with Python 3.2
+* Add Python 3.5 to CI builds
+* Fix issues (Thanks to all contributors)
+* Add property for default API URL
+* Add examples
+* Build Fixes
+* GitHub templates
+* Parse center information
+* Parse geometry information
+* Support Areas
+
+0.3.1 (2015-04-30)
+~~~~~~~~~~~~~~~~~~
+
+* Improve example
+
+0.3.0 (2015-04-30)
+~~~~~~~~~~~~~~~~~~
+
+* Improve internal data handling (Dominik)
+* Add helper functions (Morris Jobke)
+
+0.2.0 (2014-12-27)
+~~~~~~~~~~~~~~~~~~
+
+* Added support for xml response data
+* Added support for exceptions
+* Added tests with 100% code coverage
+* Removed Python 2.6 support
+* Added more examples to the documentation
+
+0.1.0 (2014-12-14)
+~~~~~~~~~~~~~~~~~~
+
+Proof of concept
+
+* Initial release.
+
+.. _`master`: https://github.com/DinoTools/python-overpy
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8a66c64
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 PhiBo (DinoTools)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..63ad0a2
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,11 @@
+include README.rst CHANGELOG.rst
+include LICENSE
+include MANIFEST.in
+include docs/make.bat docs.Makefile
+include docs/source/conf.py
+include docs/source/*.rst
+include examples/*.py
+include tests/*.py
+include tests/json/*.json
+include tests/response/*.html
+include tests/xml/*.xml
diff --git a/PKG-INFO b/PKG-INFO
index ec27113..96d494a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: overpy
-Version: 0.3.1
+Version: 0.4
 Summary: Python Wrapper to access the OpenStreepMap Overpass API
 Home-page: https://github.com/DinoTools/python-overpy
 Author: PhiBo (DinoTools)
@@ -107,6 +107,7 @@ Description: Python Overpass Wrapper
         
         .. _`documentation`: http://python-overpy.readthedocs.org/
         
+Keywords: OverPy Overpass OSM OpenStreetMap
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
 Classifier: License :: OSI Approved :: MIT License
@@ -117,5 +118,6 @@ 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
diff --git a/docs/make.bat b/docs/make.bat
new file mode 100644
index 0000000..22df141
--- /dev/null
+++ b/docs/make.bat
@@ -0,0 +1,242 @@
+ at ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
+set I18NSPHINXOPTS=%SPHINXOPTS% source
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	:help
+	echo.Please use `make ^<target^>` where ^<target^> is one of
+	echo.  html       to make standalone HTML files
+	echo.  dirhtml    to make HTML files named index.html in directories
+	echo.  singlehtml to make a single large HTML file
+	echo.  pickle     to make pickle files
+	echo.  json       to make JSON files
+	echo.  htmlhelp   to make HTML files and a HTML help project
+	echo.  qthelp     to make HTML files and a qthelp project
+	echo.  devhelp    to make HTML files and a Devhelp project
+	echo.  epub       to make an epub
+	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+	echo.  text       to make text files
+	echo.  man        to make manual pages
+	echo.  texinfo    to make Texinfo files
+	echo.  gettext    to make PO message catalogs
+	echo.  changes    to make an overview over all changed/added/deprecated items
+	echo.  xml        to make Docutils-native XML files
+	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
+	echo.  linkcheck  to check all external links for integrity
+	echo.  doctest    to run all doctests embedded in the documentation if enabled
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+
+%SPHINXBUILD% 2> nul
+if errorlevel 9009 (
+	echo.
+	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+	echo.installed, then set the SPHINXBUILD environment variable to point
+	echo.to the full path of the 'sphinx-build' executable. Alternatively you
+	echo.may add the Sphinx directory to PATH.
+	echo.
+	echo.If you don't have Sphinx installed, grab it from
+	echo.http://sphinx-doc.org/
+	exit /b 1
+)
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "singlehtml" (
+	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\PythonOverpassAPI.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PythonOverpassAPI.ghc
+	goto end
+)
+
+if "%1" == "devhelp" (
+	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished.
+	goto end
+)
+
+if "%1" == "epub" (
+	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The epub file is in %BUILDDIR%/epub.
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "latexpdf" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	cd %BUILDDIR%/latex
+	make all-pdf
+	cd %BUILDDIR%/..
+	echo.
+	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "latexpdfja" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	cd %BUILDDIR%/latex
+	make all-pdf-ja
+	cd %BUILDDIR%/..
+	echo.
+	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "text" (
+	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The text files are in %BUILDDIR%/text.
+	goto end
+)
+
+if "%1" == "man" (
+	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The manual pages are in %BUILDDIR%/man.
+	goto end
+)
+
+if "%1" == "texinfo" (
+	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+	goto end
+)
+
+if "%1" == "gettext" (
+	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+	goto end
+)
+
+if "%1" == "changes" (
+	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.The overview file is in %BUILDDIR%/changes.
+	goto end
+)
+
+if "%1" == "linkcheck" (
+	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+	goto end
+)
+
+if "%1" == "doctest" (
+	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+	goto end
+)
+
+if "%1" == "xml" (
+	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The XML files are in %BUILDDIR%/xml.
+	goto end
+)
+
+if "%1" == "pseudoxml" (
+	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
+	goto end
+)
+
+:end
diff --git a/docs/source/api.rst b/docs/source/api.rst
new file mode 100644
index 0000000..a2ffb6d
--- /dev/null
+++ b/docs/source/api.rst
@@ -0,0 +1,66 @@
+API Reference
+=============
+
+.. currentmodule:: overpy
+
+Overpass API
+------------
+
+.. autoclass:: Overpass
+    :members:
+
+
+Result
+------
+
+.. autoclass:: Result
+    :members:
+
+
+Elements
+--------
+
+.. autoclass:: Element
+    :members:
+
+.. autoclass:: Area
+    :members:
+
+.. autoclass:: Node
+    :members:
+
+.. autoclass:: Relation
+    :members:
+
+.. autoclass:: Way
+    :members:
+
+
+Relation Members
+----------------
+
+.. autoclass:: RelationMember
+    :members:
+
+.. autoclass:: RelationArea
+    :members:
+
+.. autoclass:: RelationNode
+    :members:
+
+.. autoclass:: RelationWay
+    :members:
+
+
+Exceptions
+----------
+
+.. automodule:: overpy.exception
+    :members:
+
+
+Helper
+------
+
+.. automodule:: overpy.helper
+    :members:
diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
new file mode 100644
index 0000000..6f90edd
--- /dev/null
+++ b/docs/source/changelog.rst
@@ -0,0 +1 @@
+.. include:: ../../CHANGELOG.rst
\ No newline at end of file
diff --git a/docs/source/conf.py b/docs/source/conf.py
new file mode 100644
index 0000000..99dc446
--- /dev/null
+++ b/docs/source/conf.py
@@ -0,0 +1,335 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(
+    0,
+    os.path.abspath(
+        os.path.join(
+            os.path.dirname(__file__),
+            '../../'
+        )
+    )
+)
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx.ext.autodoc',
+    'sphinx.ext.todo',
+    'sphinx.ext.coverage',
+    'sphinx.ext.viewcode',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = 'Python Overpass API'
+copyright = '2014, PhiBo'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+from overpy import __about__ as overpy_about
+version = overpy_about.__version__
+# The full version, including alpha/beta/rc tags.
+release = overpy_about.__version__
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'PythonOverpassAPIdoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+  ('index', 'PythonOverpassAPI.tex', 'Python Overpass API Documentation',
+   'PhiBo', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'pythonoverpassapi', 'Python Overpass API Documentation',
+     ['PhiBo'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'PythonOverpassAPI', 'Python Overpass API Documentation',
+   'PhiBo', 'PythonOverpassAPI', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+
+# -- Options for Epub output ----------------------------------------------
+
+# Bibliographic Dublin Core info.
+epub_title = 'Python Overpass API'
+epub_author = 'PhiBo'
+epub_publisher = 'PhiBo'
+epub_copyright = '2014, PhiBo'
+
+# The basename for the epub file. It defaults to the project name.
+#epub_basename = 'Python Overpass API'
+
+# The HTML theme for the epub output. Since the default themes are not optimized
+# for small screen space, using the same theme for HTML and epub output is
+# usually not wise. This defaults to 'epub', a theme designed to save visual
+# space.
+#epub_theme = 'epub'
+
+# The language of the text. It defaults to the language option
+# or en if the language is not set.
+#epub_language = ''
+
+# The scheme of the identifier. Typical schemes are ISBN or URL.
+#epub_scheme = ''
+
+# The unique identifier of the text. This can be a ISBN number
+# or the project homepage.
+#epub_identifier = ''
+
+# A unique identification for the text.
+#epub_uid = ''
+
+# A tuple containing the cover image and cover page html template filenames.
+#epub_cover = ()
+
+# A sequence of (type, uri, title) tuples for the guide element of content.opf.
+#epub_guide = ()
+
+# HTML files that should be inserted before the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_pre_files = []
+
+# HTML files shat should be inserted after the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_post_files = []
+
+# A list of files that should not be packed into the epub file.
+epub_exclude_files = ['search.html']
+
+# The depth of the table of contents in toc.ncx.
+#epub_tocdepth = 3
+
+# Allow duplicate toc entries.
+#epub_tocdup = True
+
+# Choose between 'default' and 'includehidden'.
+#epub_tocscope = 'default'
+
+# Fix unsupported image types using the PIL.
+#epub_fix_images = False
+
+# Scale large images.
+#epub_max_image_width = 0
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#epub_show_urls = 'inline'
+
+# If false, no index is generated.
+#epub_use_index = True
diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst
new file mode 100644
index 0000000..8cb3146
--- /dev/null
+++ b/docs/source/contributing.rst
@@ -0,0 +1 @@
+.. include:: ../../CONTRIBUTING.rst
\ No newline at end of file
diff --git a/docs/source/example.rst b/docs/source/example.rst
new file mode 100644
index 0000000..f749227
--- /dev/null
+++ b/docs/source/example.rst
@@ -0,0 +1,260 @@
+Examples
+========
+
+Basic example
+-------------
+
+Lets start with an example from the Overpass API documentation.
+
+**Query String:**
+
+.. code-block:: text
+    :linenos:
+
+    node(50.745,7.17,50.75,7.18);
+    out;
+
+**Use OverPy:**
+
+.. code-block:: pycon
+    :linenos:
+
+    >>> import overpy
+    >>> api = overpy.Overpass()
+    >>> result = api.query("node(50.745,7.17,50.75,7.18);out;")
+    >>> len(result.nodes)
+    1984
+    >>> len(result.ways)
+    0
+    >>> len(result.relations)
+    0
+    >>> node = result.nodes[2]
+    >>> node.id
+    100792806
+    >>> node.tags
+    {}
+
+Line 1:
+    Import the required Python module
+
+Line 2:
+    Create a new instance of the Overpass() class.
+    This instance is used to query the Overpass API.
+
+Line 3:
+    Use the Query-String from above to query the Overpass API service.
+
+Line 4,5:
+    Get the number of nodes in the result set.
+
+Line 6-9:
+    Get the number of ways and relations available in the result set.
+
+Line 10-14:
+    Get the third node from the list.
+    Display the ID and the tags of this node.
+
+
+Use Overpass QL or Overpass XML
+-------------------------------
+
+Queries are passed directly to the Overpass API service without any modification.
+So it is possible to use Overpass QL and Overpass XML.
+
+Overpass QL
+~~~~~~~~~~~
+
+**Query:**
+
+.. code-block:: text
+    :linenos:
+
+    node["name"="Gielgen"];
+    out body;
+
+
+**Use OverPy:**
+
+.. code-block:: pycon
+    :linenos:
+
+    >>> import overpy
+    >>> api = overpy.Overpass()
+    >>> result = api.query("""node["name"="Gielgen"];out body;""")
+    >>> len(result.nodes)
+    6
+    >>> len(result.ways)
+    0
+    >>> len(result.relations)
+    0
+
+
+Overpass XML
+~~~~~~~~~~~~
+
+**Query:**
+
+.. code-block:: xml
+    :linenos:
+
+    <osm-script>
+      <query type="node">
+        <has-kv k="name" v="Gielgen"/>
+      </query>
+      <print/>
+    </osm-script>
+
+**Use OverPy:**
+
+.. code-block:: pycon
+    :linenos:
+
+    >>> import overpy
+    >>> api = overpy.Overpass()
+    >>> result = api.query("""<osm-script>
+    ...   <query type="node">
+    ...     <has-kv k="name" v="Gielgen"/>
+    ...   </query>
+    ...   <print/>
+    ... </osm-script>""")
+    >>> len(result.nodes)
+    6
+    >>> len(result.ways)
+    0
... 6219 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-overpy.git



More information about the Python-modules-commits mailing list