Picterra API client
Project description
Picterra Python API Client
Easily integrate state-of-the-art machine learning models in your app
from picterra import APIClient
# Replace this with the id of one of your detectors
detector_id = 'd552605b-6972-4a68-8d51-91e6cb531c24'
# Set the PICTERRA_API_KEY environment variable to define your API key
client = APIClient()
print('Uploading raster...')
raster_id = client.upload_raster('data/raster1.tif', name='a nice raster')
print('Upload finished, starting detector...')
result_id = client.run_detector(detector_id, raster_id)
client.download_result_to_feature_collection(result_id, 'result.geojson')
print('Detection finished, results are in result.geojson')
Installation
pip install picterra
See the examples
folder for examples.
API Reference and User Guide available on Read the Docs
Development
In order to test locally, run:
python setup.py test
Release process
- Bump the version number in
setup.py
- Manually run the publish to testpypi workflow
- Check the publication result on testpypi
- Create a release through github
- The 'publish to pypi' workflow should automatically run
- Updated package should be available on pypi
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
picterra-2.0.0.tar.gz
(21.0 kB
view hashes)
Built Distribution
picterra-2.0.0-py3-none-any.whl
(13.5 kB
view hashes)