The GeoUK Python library provides a pythonic interface to the GeoUK API.
Project description
GeoUK Python Library
The GeoUK Python library provides a pythonic interface to the GeoUK API. It includes an API client class, and a set of resource classes.
Installation
pip install geouk
Requirements
- Python 3.7+
Usage
import geouk
client = geouk.Client('your_api_key...')
# Get a list of place names and postcodes starting with the query string's
# first 2 characters (ideal for use with a typeahead).
suggestions = geouk.resources.Place.typeahead(client, 'wo...')
# Fetch a list of `Place`s that match the given query string
places = geouk.resources.Place.search(client, 'worcester')
print(places[0].humanized_name, places[0].geo_coords)
>> Worcester [52.18935, -2.22001]
# Fetch all the (data) sources
sources = geouk.resources.Source.all(client)
# Fetch a single (data) source
source = geouk.resources.Source.one(client, 'geonames')
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
GeoUK-0.0.6.tar.gz
(6.4 kB
view details)
File details
Details for the file GeoUK-0.0.6.tar.gz
.
File metadata
- Download URL: GeoUK-0.0.6.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad5d0cd5bf831650e7c743c157515221d4ea7ea5b53c7feb2dda1e860375eaf9 |
|
MD5 | 2185cb48c1701f2f187c442799d745c3 |
|
BLAKE2b-256 | 311ec62cd8d9e6b99f84febae8c3b5028533941105dbebee864797e5388d3005 |