Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/previousdeveloper/pythonpostcodeswrapper
Simple wrapper around postcodes.io
https://github.com/previousdeveloper/pythonpostcodeswrapper
Last synced: 18 days ago
JSON representation
Simple wrapper around postcodes.io
- Host: GitHub
- URL: https://github.com/previousdeveloper/pythonpostcodeswrapper
- Owner: previousdeveloper
- Created: 2015-03-20T17:09:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-27T14:56:43.000Z (over 6 years ago)
- Last Synced: 2024-10-12T01:44:38.753Z (about 1 month ago)
- Language: Python
- Homepage: http://api.postcodes.io/
- Size: 10.7 KB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Postcodes.io
[![Build Status](https://magnum-ci.com/status/0ba52677150f6f693976715c413e306b.png)](https://magnum-ci.com/projects/1719)A simple wrapper around [postcodes.io](http://postcodes.io/)
## Installation
------------To install Postcode.io, simply:
```python
$ pip install postcode.io
```
## Usage```python
from lib import PostCodeClient
```Create new instance of the Postcodes
```python
client = PostCodeClient()
```Lookup a postcode example
```python
postcode = client.getLookupPostCode('OX49 5NU')
```Lookup a postcode example
```python
postcode = client.getBulkReverseGecoding('{
"geolocations": [{
"longitude": 0.629834723775309,
"latitude": 0.629834723775309
}, {
"longitude": -2.49690382054704,
"latitude": -2.49690382054704,
"radius": 1000,
"limit": 5
}]
}')
```For more details see [the documentation on postcodes.io](http://postcodes.io/docs)
## ContributingI am not expert in pyhton if you want to contribute please pull request :)
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request