isogeo / isogeo-api-py-minsdk

Python minimalist SDK to use Isogeo REST API

Home Page:https://pypi.org/project/isogeo-pysdk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Isogeo API Python SDK

PyPI PyPI - Python Version

Build Status Azure DevOps coverage

Documentation Status Code style: black

A Python package to use Isogeo REST API.

Requirements

Isogeo API requires oAuth2 authentication. To obtain credentials, send us your request by email projects+api@isogeo.com.

Based on the well known requests package and the extension requests-oauthlib.

Documentation

Usage in a nutshell

python -m pip install --user isogeo-pysdk
# or using pipenv
python -m pipenv install isogeo-pysdk

Quickstart

from isogeo_pysdk import Isogeo

# authenticate your client application
isogeo = Isogeo(client_id=app_id,
                client_secret=app_secret)

# get the token
isogeo.connect()

# search within catalogs shared to the application
search = isogeo.search()

# print some statements
print("Search query parameters: ", search.query)
print("Total count of metadatas shared: ", search.total)
print("Count of resources got by request: {}\n".format(len(search.results)))

# close the session when you finish
isogeo.close()

Samples are available in the source repository <https://github.com/isogeo/isogeo-api-py-minsdk/tree/master/isogeo_pysdk/samples>_.

Tests

Tests are performed for each published commit:

python -m pip install --upgrade -r tests/requirements_test.txt
python -m pytest

Or using the included Powershell script:

.\tool_test_coverage.ps1

Build

To package and upload:

.\tool_build_upload.ps1

To build docs:

.\tool_docs_build.ps1

About

Python minimalist SDK to use Isogeo REST API

https://pypi.org/project/isogeo-pysdk/

License:GNU Lesser General Public License v3.0


Languages

Language:Python 99.8%Language:PowerShell 0.2%