planetlabs / planet-client-python

Python client for Planet APIs
https://planet-sdk-for-python-v2.readthedocs.io/en/latest/
Apache License 2.0
276 stars 92 forks source link

Add Hosting Block Convenience Method to SDK #1029

Closed emma-steuer closed 8 months ago

emma-steuer commented 8 months ago

Related Issue(s):

Closes #

Proposed Changes:

For inclusion in changelog (if applicable):

  1. Support Subscriptions API hosting block for Sentinel Hub in the CLI (#1029).

Not intended for changelog:

  1. N/A

Diff of User Interface

Old behavior: Hosting was not supported for create and request for the Subscriptions CLI.

New behavior: Hosting is now supported for both create and request in the Subscriptions CLI. --hosting and --collection_id are flags used for this.

PR Checklist:

(Optional) @mentions for Notifications:

asonnenschein commented 8 months ago

Following up re: other places in the CLI where the hosting flags could be added --

The CLI has convenience methods that structure JSON payloads from flagged arguments (see https://planet-sdk-for-python-v2.readthedocs.io/en/latest/cli/cli-subscriptions/#subscription-request-conveniences). JSON output from these commands can be piped into the subscriptions create command. With that in mind, I think convenience method request (https://github.com/planetlabs/planet-client-python/blob/main/planet/cli/subscriptions.py#L274) should be enhanced with hosting flag arguments similar to the create command.