theho / postcodes_io

Python Client for accessing Postcodes.io restful API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postcodes.io Python Client - alpha

Documentation Status Updates

Python client to connect to Postcodes.io webservice

Features

  • Supports python 3.x (not yet python 2.x, sorry!)
  • Response in Python native list and dict types
  • Supports free http://postcodes.io REST service and self-hosted service (See documentation for self-hosted installation details)

Quick Start

Install python package:

$ pip install postcodes_io
$ python

Self-hosted Service using Docker

  1. Pull docker image:

    docker pull randomvariable/docker-postcodes.io
    
  2. Run docker container as a daemon:

    docker run -p 8000:8000 -d randomvariable/docker-postcodes.io
    
  3. Execute API using hosts

# Connects to self hosted PostcodesIO instance.
from postcodes_io import PostcodesIO
postcode = PostcodesIO('http://localhost:8000').get('SW1A 1AA')

TODOs

  • Add more endpoints
  • Documentation
  • Proper isolated unit tests

About

Python Client for accessing Postcodes.io restful API

License:MIT License


Languages

Language:Python 80.7%Language:Makefile 19.3%