diff --git a/README.md b/README.md index 1772a00fe20..a70170195bd 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ The module is not on PyPi yet. ## Use it ```python ->>> from overpass import Overpass ->>> api = Overpass.API() +>>> import overpass +>>> api = overpass.API() >>> response = api.Get('node["name"="Salt Lake City"]') ``` @@ -36,7 +36,7 @@ The API takes a few parameters: The default endpoint is `http://overpass-api.de/api/interpreter` but you can pass in the rambler instance (`http://overpass.osm.rambler.ru/cgi/interpreter`) or your own: ```python -api = Overpass.API(endpoint=http://overpass.myserver/interpreter) +api = overpass.API(endpoint=http://overpass.myserver/interpreter) ``` #### `timeout` @@ -44,7 +44,7 @@ api = Overpass.API(endpoint=http://overpass.myserver/interpreter) The default timeout is 25 seconds, but you can set it to whatever you want. ```python -api = Overpass.API(timeout=600) +api = overpass.API(timeout=600) ``` #### `debug` diff --git a/overpass/__init__.py b/overpass/__init__.py index e69de29bb2d..ff16d78e66c 100644 --- a/overpass/__init__.py +++ b/overpass/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +"""Thin wrapper around the OpenStreetMap Overpass API.""" + +__title__ = 'overpass' +__version__ = '0.0.1' +__license__ = 'Apache 2.0' + +from .api import API \ No newline at end of file diff --git a/overpass/Overpass.py b/overpass/api.py similarity index 100% rename from overpass/Overpass.py rename to overpass/api.py diff --git a/test_api.py b/test_api.py index 0b44bf61352..2154f6c8f62 100644 --- a/test_api.py +++ b/test_api.py @@ -1,9 +1,9 @@ -from overpass import Overpass +import overpass class TestAPI: def test_initialize_api(self): - api = Overpass.API() - assert isinstance(api, Overpass.API) + api = overpass.API() + assert isinstance(api, overpass.API) assert api.debug == False \ No newline at end of file