Abstraction class to use Isogeo REST API
Project description
Isogeo API Python SDK
A Python package to use Isogeo REST API.
Getting API keys
API keys are required to use it. Send us your request by email.
Getting Help
There is a basic documentation about the Isogeo API.
Installing
To use:
pip install --user isogeo-pysdk
For developers:
git clone git@github.com:Guts/isogeo-api-py-minsdk.git
cd isogeo-api-py-minsdk
python setup.py install
Quickstart
from isogeo_pysdk import Isogeo
# authenticate your client application
isogeo = Isogeo(client_id=app_id,
client_secret=app_secret)
# get the token
token = isogeo.connect()
# search within catalogs shared to the application
search = isogeo.search(token)
# print some statements
print(isogeo.SUBRESOURCES) # available sub resources
print("Search __dict__ keys: ", search.keys()) # search response basic structure
print("Search query parameters: ", search.get('query')) # search response query passed
print("Total count of metadatas shared: ", search.get("total")) # total of available resources
print("Count of resources got by request: {}\n".format(len(search.get("results")))) # total of resources returned by search request
Others samples are available in the source repository.
Isogeo API coverage
Authentication
[X] group application (oAuth2 Credentials Grant)
[ ] user confidential application (oAuth2 Authorization Code Grant)
[ ] user public application (oAuth2 Implicit Grant)
[X] token auto refresh
Resources search ( GET /resources/search )
Resources search parameters:
[X] q (query)
[X] ob (order by)
[X] od (order direction)
[X] _id (filter on specific resources id list)
[X] _include (subresources management)
[X] _lang (French or English with complete translation)
[X] _limit (results length)
[X] _offset (pagination)
[X] box (filter on WGS84 boundging box)
[X] geo (filter on WKT polygon)
[X] rel (geometric operation to apply on 2 previous filters)
[X] s share segregation
Resource details ( GET /resources/{rid} )
Resource detailed parameters:
[X] id (metadata UUID)
[X] _include (subresources management)
Others:
[X] download resource in XML ISO-1939 version
[ ] resource with contacts subresource included ( GET /resources/{rid}/contacts )
[ ] resource with events subresource included ( GET /resources/{rid}/events )
[ ] resource with keywords subresource included ( GET /resources/{rid}/keywords )
[ ] resource with operations subresource included ( GET /resources/{rid}/operationds - only for services)
Keyword details ( GET /keyword/{kid} )
[X] kid (keyword UUID)
[X] _include (subresources management)
[X] searches for keywords in a specific workgroup ( GET /groups/{gid}/keywords/search )
These requests are not publicly available.
Thesaurus ( GET /thesauri )
[X] list of available thesauri
[X] specific thesaurus ( GET /thesauri/tid )
[X] searches for keywords in a specific thesaurus ( GET /thesauri/{tid}/keywords/search )
Licenses ( GET /licenses )
[X] list licenses of a workgroup
[X] details on a specific license ( GET /license/lid )
These requests are not publicly available.
Miscellaneous & bonus
[X] check API version
[X] check database version
[X] pick between different Isogeo API platform (PROD, QA, [INT])
[X] set protocol requests to HTTPS (default) or HTTP (only for GET requests not for authentication)
[X] get every API label automatically translated (not only INSPIRE themes)
[X] additional search parameter to automatically get full results without have to iterate with _limit and _offset
[X] option (ALL) to quickly get every subresources through _include parameter
[X] option (augment) to dynamically add shares ids to a search results tags (#6)
[X] method to easily download Isogeo hosted data
[X] method to easily get application properties from shares request
[X] method to easily get metadata edition URL on https://app.isogeo.com (handle direct tabs) - #23
[X] UUID checker and converter (hex <-> urn) to handle specific Isogeo UUID
[X] automatic check on values passed into query parameter to the API
[-] handle proxies setting (only for basic auth - not PAC nor NTLM)
Tests
Tests are performed for each published commit by Travis
To run tests:
pip install --upgrade -r tests/requirements_test.txt
python setup.py install
python -m unittest discover
Build
To package and upload:
.\build_upload.ps1
To build docs:
cd .\docs\
.\build_docs.ps1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isogeo-pysdk-2.20.0.tar.gz.
File metadata
- Download URL: isogeo-pysdk-2.20.0.tar.gz
- Upload date:
- Size: 43.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88752d60e3c859fdd7278a14799284d3f38904b7d93b55c2ca409e00a49e1f69
|
|
| MD5 |
f5babbd9b2fd843d1ea2759fe11cf3f6
|
|
| BLAKE2b-256 |
90cf9575101f70cd88aa37baf3bcb1fa57ee1925d521821f388e058428c8fb0d
|
File details
Details for the file isogeo_pysdk-2.20.0-py2.py3-none-any.whl.
File metadata
- Download URL: isogeo_pysdk-2.20.0-py2.py3-none-any.whl
- Upload date:
- Size: 38.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaed25b3e50c00bca0d57a76c6460fb5285aa57827c9f13c24042110a278c842
|
|
| MD5 |
644b84a1d9d04c5dd9ad361399b4d5d9
|
|
| BLAKE2b-256 |
bda27aaa80cf0f39dd7025b062dd8a915d9f07923f9c4bdc96450ec15a77913c
|