Skip to main content

Python client to connect to Postcodes.io API

Project description

Postcodes.io Python Client - alpha

https://img.shields.io/pypi/v/postcodes_io.svg https://img.shields.io/travis/jimmyho/postcodes_io.svg Documentation Status Updates

Python client to connect to Postcodes.io API

Features

  • Supports python 3.x (not yet python 2.x, sorry!)

  • Response in Python native list and dict types

  • Supports free http://postcodes.io/postcodes REST service and self-hosted service (See documentation for installation details)

Quick Start

Install python package:

$ pip install postcodes_io
$ python
from postcodes_io import Postcodes
pio = Postcodes()
postcode = pio.get('SW1A 1AA')

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

from postcodes_io import Postcodes
postcode = Postcodes('http://localhost:8000').get('SW1A 1AA')

TODOs

  • Add more endpoints

  • Documentation

  • Proper isolated unit tests

History

0.1.0 (2016-07-08)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postcodes_io-0.1.0.tar.gz (12.9 kB view details)

Uploaded Source

File details

Details for the file postcodes_io-0.1.0.tar.gz.

File metadata

File hashes

Hashes for postcodes_io-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f0679330a54021633aa351570598383a837da1a29fc28d36402b4192fca33ad
MD5 065233f30fd701d0b4db88910eff02c9
BLAKE2b-256 96aea6cda0f387322c1d076b2757e3c11c2091cdba7b2a4287ed1b37c898c91b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page