{"id":37075614,"url":"https://github.com/picterra/picterra-python","last_synced_at":"2026-01-14T08:53:59.387Z","repository":{"id":37773631,"uuid":"239966061","full_name":"Picterra/picterra-python","owner":"Picterra","description":"Picterra Python API Client","archived":false,"fork":false,"pushed_at":"2026-01-12T08:33:02.000Z","size":928,"stargazers_count":18,"open_issues_count":19,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-12T17:59:40.839Z","etag":null,"topics":["data-science","earth-observation","geospatial-analysis","geospatial-intelligence","machine-learning"],"latest_commit_sha":null,"homepage":"https://picterra.ch","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Picterra.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-12T08:52:33.000Z","updated_at":"2026-01-12T08:33:04.000Z","dependencies_parsed_at":"2023-09-23T04:12:08.768Z","dependency_job_id":"cfde77a3-3307-4a63-b0c1-6bed435799bb","html_url":"https://github.com/Picterra/picterra-python","commit_stats":{"total_commits":156,"total_committers":7,"mean_commits":"22.285714285714285","dds":0.4807692307692307,"last_synced_commit":"953a1ee7331bc26a1a4cc8b694a440d7f92b9549"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Picterra/picterra-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picterra%2Fpicterra-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picterra%2Fpicterra-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picterra%2Fpicterra-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picterra%2Fpicterra-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Picterra","download_url":"https://codeload.github.com/Picterra/picterra-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picterra%2Fpicterra-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","earth-observation","geospatial-analysis","geospatial-intelligence","machine-learning"],"created_at":"2026-01-14T08:53:58.718Z","updated_at":"2026-01-14T08:53:59.380Z","avatar_url":"https://github.com/Picterra.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://picterra.ch\"\u003e\n    \u003cimg\n        src=\"https://storage.googleapis.com/cloud.picterra.ch/public/assets/logo/picterra_logo_640.png\"\n        alt=\"Picterra logo\" title=\"Picterra\" align=\"right\" height=\"40\" /\u003e\n\u003c/a\u003e\n\n# Picterra Python API Client\n\n![Tests](https://github.com/Picterra/picterra-python/workflows/lint%20and%20tests/badge.svg?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/picterra-python/badge/?version=latest)](https://picterra-python.readthedocs.io/en/latest/?badge=latest)\n[![PyPI - Version](https://img.shields.io/pypi/v/picterra)](https://pypi.org/project/picterra/)\n\nEasily integrate state-of-the-art machine learning models in your app\n\n```python\nfrom picterra import APIClient\n\n# Replace this with the id of one of your detectors\ndetector_id = 'd552605b-6972-4a68-8d51-91e6cb531c24'\n\n# Set the PICTERRA_API_KEY environment variable to define your API key\nclient = APIClient()\nprint('Uploading raster...')\nraster_id = client.upload_raster('data/raster1.tif', name='a nice raster')\nprint('Upload finished, starting detector...')\nresult_id = client.run_detector(detector_id, raster_id)\nclient.download_result_to_feature_collection(result_id, 'result.geojson')\nprint('Detection finished, results are in result.geojson')\n```\n\n\n\n## Installation\n\n```\npip install picterra\n```\n\nSee the `examples` folder for examples.\n\n## API Reference and User Guide available on [Read the Docs](https://picterra-python.readthedocs.io/)\n\n[![Read the Docs](https://storage.googleapis.com/cloud.picterra.ch/external/assets/python_api_docs_screenshot.png)](https://picterra-python.readthedocs.io/)\n\n\n## Development\n\n### Setup\nMake sure you have `Python` and `pip` in your OS and create a virtual environment in the root folder, eg\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate \n```\n\nRunning\n```bash\npip install --editable '.[lint,test]'\n```\nwould allow to run test and linting locally, and also avoid re-installing the library every time you change the code.\n\nIf you want to install from a given branch, simply do\n\n```bash\npip uninstall picterra\npip install git+https://github.com/Picterra/picterra-python.git@\u003cbranch_name\u003e\n```\n\n### Running tests\nIn order to test locally, run:\n```bash\npytest\n```\n\n### Documentation\nRun\n\n```bash\ncd docs\npip install -r requirements.txt\nmake html\n```\n\nto update the HTML documentation under `_build/html`.\nSpawn an HTTP server in that folder to see how they would look like once deployed on Read the Docs.\n\n### Checkling linting\nRun\n```bash\nscripts/lint.sh\n```\n####\n\n#### Sphinx docs\nRun\n```bash\ncd docs\npython -m pip install -r requirements.txt\nmake html\n```\nand verify no errors are output\n\n## Release process\n\n1. Preparatory work:\n   - 1.1 Bump the version number in `setup.py`\n   - 1.2 Update CHANGELOG.md (no need for all commits, just main changes with a tag)\n2. Manually run the [publish to testpypi workflow](https://github.com/Picterra/picterra-python/actions/workflows/python-publish-testpypi.yml)\n3. Check the publication result on [testpypi](https://test.pypi.org/project/picterra/)\n4. Create a release through github\n   - 4.1. Make sure you create a new tag vX.Y.Z through the release UI\n   - 4.2. Click the \"generate release notes\" button in the UI to get release notes (you can even do it after the release is created by updating it)\n5. The 'publish to pypi' workflow should automatically run\n   - 5.1. Note this will *not* work if you create the release first as a draft - you\n       have to create it immediately\n6. Updated package should be available on [pypi](https://pypi.org/project/picterra/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicterra%2Fpicterra-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicterra%2Fpicterra-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicterra%2Fpicterra-python/lists"}