Skip to content

AGT-38: Add Async Processing API SDK/CLI - #1229

Draft
Regan-Koopmans wants to merge 1 commit into
mainfrom
AGT-38/async-processing-api
Draft

Regan-Koopmans wants to merge 1 commit into
mainfrom
AGT-38/async-processing-api

Conversation

@Regan-Koopmans

Copy link
Copy Markdown
Contributor

Adds SDK and CLI support for the Async Processing API.

API

The API is served from services.sentinel-hub.com. The public spec has two operations:

  • POST /async/v1/process: submit a request
  • GET /async/v1/process/{id}: get status

The only status is RUNNING. Finished requests return 404, whether they succeeded or failed. The outcome lives in the delivery bucket: results, or error.json.

Changes

  • planet.AsyncProcessingClient: create_request, get_request, wait. wait polls until 404.
  • Planet().async_processing: sync wrapper.
  • planet.async_processing_request: builders for input, output, data sources, responses, and S3/GCS buckets. Validates locally.
  • planet async-processing request | create | get | wait. --deployment selects aws-eu-central-1 or aws-us-west-2. Each command's --help has an example.
  • Docs: CLI tutorial with SDK snippets, SDK reference entries, auth overview fix.

Notes

  • OAuth2 only. Planet API keys are rejected by this API. The docs and help text say so.
  • wait cannot tell a finished request from an unknown ID. Both return 404.

Open questions for the Async Processing team

  • Are there list or cancel endpoints outside the public spec?
  • Do Planet user tokens work in production? The auth docs say yes. Not verified live.
  • Is sentinel-2-l2a the preferred collection name? The public examples use S2L2A.

Testing

  • 64 new tests: unit tests for the builders, respx tests for the client (async and sync) and CLI.
  • Full suite passes (1010 tests, 97% coverage). Lint, mypy, and the docs build pass.
  • Not run against the live API.

Remaining from the ticket

  • Update the public docs.planet.com page. Snippets are in docs/cli/cli-async-processing.md.
  • Product review with the Async Processing team.

🤖 Generated with Claude Code

Add a client for the Async Processing API, served from
services.sentinel-hub.com. The API has two operations: submit a
request and get its status. Finished requests return 404.

- AsyncProcessingClient: create_request, get_request, wait
- AsyncProcessingAPI sync wrapper, exposed as Planet().async_processing
- async_processing_request: builders for input, output, data sources,
  responses, and S3/GCS buckets
- `planet async-processing request|create|get|wait`, with
  --deployment for the EU and US hosts
- CLI tutorial, SDK reference entries, auth overview update
- Unit tests for the builders; respx tests for client and CLI

Requires OAuth2 auth. Planet API keys are not accepted by this API.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant