We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e3aa242 + eb94132 commit e2234fdCopy full SHA for e2234fd
planet/sync/client.py
@@ -3,8 +3,9 @@
3
from .orders import OrdersAPI
4
from .subscriptions import SubscriptionsAPI
5
from planet.http import Session
6
+from planet.__version__ import __version__
7
-SYNC_CLIENT_AGENT = "python-sdk-sync"
8
+SYNC_CLIENT_X_PLANET_APP = "python-sdk-sync"
9
10
11
class Planet:
@@ -42,8 +43,12 @@ class Planet:
42
43
44
def __init__(self, session: Optional[Session] = None) -> None:
45
self._session = session or Session()
- self._session._client.headers.update(
46
- {"X-Planet-App": SYNC_CLIENT_AGENT})
+ self._session._client.headers.update({
47
+ "X-Planet-App":
48
+ SYNC_CLIENT_X_PLANET_APP,
49
+ "User-Agent":
50
+ f"planet-client-python/{__version__}/sync"
51
+ })
52
53
self.data = DataAPI(self._session)
54
self.orders = OrdersAPI(self._session)
0 commit comments