planet-client-python icon indicating copy to clipboard operation
planet-client-python copied to clipboard

Tasking API

Open asonnenschein opened this issue 5 months ago • 0 comments

This PR provides a complete, production-ready Tasking API client that seamlessly integrates with the existing Planet Python SDK architecture and follows all established patterns and conventions. Generated with help from Claude Code:

Ticket

https://github.com/planetlabs/planet-client-python/issues/1186

Key Features

  • Feature parity with Planet Tasking API reference
  • AsyncIterator support for listing orders with pagination
  • Order state management with wait functionality
  • UUID validation for order IDs
  • Error handling with Planet SDK exception patterns
  • CLI integration with common Planet CLI patterns
  • Comprehensive testing with both unit and integration tests

Details

  1. Async TaskingClient (planet/clients/tasking.py)
    • Full async API client with all core methods
    • Create, get, cancel, list, and wait for tasking orders
    • Get order results functionality
    • Proper error handling and validation
    • Follows existing SDK patterns
  2. Sync TaskingAPI (planet/sync/tasking.py)
    • Synchronous wrapper around the async client
    • All the same functionality as async version
    • Integrated into the main Planet client
  3. CLI Commands (planet/cli/tasking.py)
    • Complete CLI interface: planet tasking
    • Commands: create-order, get-order, cancel-order, list-orders, wait-order, get-results
    • Supports both JSON file input and direct command-line arguments
    • Integrated into main CLI
  4. Comprehensive Testing
    • Unit tests for TaskingClient and TaskingOrderStates
    • Integration tests for both API and CLI
    • Mock HTTP responses using respx
    • Tests cover all major functionality
  5. Code Quality
    • ✅ Linting passes (flake8, yapf)
    • ✅ Type checking passes (mypy)
    • Follows existing code conventions
    • Proper documentation and docstrings

asonnenschein avatar Aug 13 '25 00:08 asonnenschein