-
Notifications
You must be signed in to change notification settings - Fork 282
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
1 parent
04ce128
commit 92717da
Showing
5 changed files
with
76 additions
and
12 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
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,45 @@ | ||
# Using iPython | ||
|
||
```bash | ||
$ pip install ipython | ||
$ ipython | ||
``` | ||
|
||
Using the **TAB** key after entering '.' you will see all the available **providers**. | ||
|
||
```python | ||
>>> import geocoder | ||
>>> g = geocoder. | ||
geocoder.api geocoder.geolytica geocoder.mapquest | ||
geocoder.arcgis geocoder.geonames geocoder.nokia | ||
geocoder.base geocoder.get geocoder.osm | ||
geocoder.bing geocoder.google geocoder.timezone | ||
geocoder.canadapost geocoder.ip geocoder.yahoo | ||
geocoder.cli geocoder.keys geocoder.tomtom | ||
geocoder.elevation geocoder.location | ||
... | ||
``` | ||
|
||
Using the **TAB** key again, you can see all the available **attributes**. | ||
|
||
```python | ||
>>> g = geocoder.google('Ottawa') | ||
>>> g. | ||
g.accuracy g.latlng g.south | ||
g.address g.lng g.southeast | ||
g.api g.locality g.southwest | ||
g.attributes g.location g.state | ||
g.bbox g.neighborhood g.status | ||
g.content g.north g.status_code | ||
g.country g.northeast g.status_description | ||
g.county g.northwest g.street_number | ||
g.debug g.ok g.sublocality | ||
g.east g.params g.subpremise | ||
g.error g.parse g.url | ||
g.geometry g.postal g.west | ||
g.headers g.provider g.wkt | ||
g.help g.quality g.x | ||
g.json g.route g.y | ||
g.lat g.short_name | ||
... | ||
``` |
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,11 @@ | ||
# Using Proxies | ||
|
||
Using proxies will hide the IP address of the client computer when calling a request using the Python Geocoder. | ||
|
||
```python | ||
>>> import geocoder | ||
>>> proxies = {'http':'http://108.165.33.12:3128'} | ||
>>> g = geocoder.google('New York City', proxies=proxies) | ||
>>> g.json | ||
... | ||
``` |
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
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