Skip to content

Commit

Permalink
Merge pull request #943 from planetlabs/938-update-example-in-docstring
Browse files Browse the repository at this point in the history
938 update example in docstring
  • Loading branch information
emma-steuer authored May 4, 2023
2 parents d22f946 + 5682b22 commit 570b3c9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 deletions planet/clients/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ class Searches(Paged):


class DataClient:
"""Low-level asynchronous access to Planet's data API.
"""High-level asynchronous access to Planet's data API.
Example:
```python
>>> import asyncio
>>> from planet import Session, DataClient
>>> from planet import Session
>>>
>>> async def main():
... async with Session() as sess:
... cl = DataClient(sess)
... cl = sess.client('data')
... # use client here
...
>>> asyncio.run(main())
Expand Down
8 changes: 4 additions & 4 deletions planet/clients/orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ class OrdersClient:
Example:
```python
>>> import asyncio
>>> from planet import Session, OrdersClient
>>> from planet import Session
>>>
>>> async def main():
... async with Session() as sess:
... cl = OrdersClient(sess)
... cl = sess.client('orders')
... # use client here
...
>>> asyncio.run(main())
Expand Down Expand Up @@ -119,7 +119,7 @@ async def create_order(self, request: dict) -> dict:
```python
>>> import asyncio
>>> from planet import Session, OrdersClient
>>> from planet import Session
>>> from planet.order_request import build_request, product
>>>
>>> async def main():
Expand All @@ -129,7 +129,7 @@ async def create_order(self, request: dict) -> dict:
... [product(image_ids, 'analytic_udm2', 'psscene')]
... )
... async with Session() as sess:
... cl = OrdersClient(sess)
... cl = sess.client('orders')
... order = await cl.create_order(request)
...
>>> asyncio.run(main())
Expand Down
15 changes: 15 additions & 0 deletions planet/clients/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ class SubscriptionsClient:
exceptions raised by this class are categorized by HTTP client
(4xx) or server (5xx) errors. This client's level of abstraction is
low.
High-level asynchronous access to Planet's subscriptions API:
Example:
```python
>>> import asyncio
>>> from planet import Session
>>>
>>> async def main():
... async with Session() as sess:
... cl = sess.client('subscriptions')
... # use client here
...
>>> asyncio.run(main())
```
"""

def __init__(self,
Expand Down

0 comments on commit 570b3c9

Please sign in to comment.