Skip to content

Commit 9bd0df8

Browse files
Deprecate webhooks module and base::get_credit_balance function (#755)
1 parent 257d4e4 commit 9bd0df8

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ You can check your current version with the following command:
3030

3131
For more information, see [UP42 Python package description](https://pypi.org/project/up42-py/).
3232

33+
### 2.4.0a3
34+
**July 15, 2025**
35+
- Deprecated the `webhooks` module and the `base::get_credits_balance` function
36+
3337
### 2.4.0a2
3438
**July 07, 2025**
3539
- Added `provider_properties` data field to `glossary::Scene` active record class.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "up42-py"
3-
version = "2.4.0a2"
3+
version = "2.4.0a3"
44
description = "Python SDK for UP42, the geospatial marketplace and developer platform."
55
authors = ["UP42 GmbH <[email protected]>"]
66
license = "https://github.com/up42/up42-py/blob/master/LICENSE"

up42/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def authenticate(
6767
self._id = user_info["sub"]
6868
self._auth = up42_client.auth
6969

70+
@utils.deprecation(replacement_name=None, version="3.0.0")
7071
def get_credits_balance(self) -> dict:
7172
"""
7273
Display the overall credits available in your account.

up42/webhooks.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Webhook:
2727
Also see the [full webhook documentation](https://docs.up42.com/account/webhooks).
2828
"""
2929

30+
@utils.deprecation(replacement_name=None, version="3.0.0")
3031
def save(self):
3132
payload = {
3233
"name": self.name,
@@ -49,6 +50,7 @@ def save(self):
4950
logger.info("Created webhook %s", self)
5051

5152
@staticmethod
53+
@utils.deprecation(replacement_name=None, version="3.0.0")
5254
def from_metadata(metadata: dict) -> "Webhook":
5355
return Webhook(
5456
id=metadata["id"],
@@ -62,11 +64,13 @@ def from_metadata(metadata: dict) -> "Webhook":
6264
)
6365

6466
@classmethod
67+
@utils.deprecation(replacement_name=None, version="3.0.0")
6568
def get(cls, webhook_id: str) -> "Webhook":
6669
url = host.endpoint(f"/workspaces/{cls.workspace_id}/webhooks/{webhook_id}")
6770
metadata = cls.session.get(url).json()["data"]
6871
return cls.from_metadata(metadata)
6972

73+
@utils.deprecation(replacement_name=None, version="3.0.0")
7074
def trigger_test_events(self) -> dict:
7175
"""
7276
Triggers webhook test event to test your receiving side. The UP42 server will send test
@@ -78,6 +82,7 @@ def trigger_test_events(self) -> dict:
7882
url = host.endpoint(f"/workspaces/{self.workspace_id}/webhooks/{self.id}/tests")
7983
return self.session.post(url=url).json()["data"]
8084

85+
@utils.deprecation(replacement_name=None, version="3.0.0")
8186
def delete(self) -> None:
8287
"""
8388
Deletes a registered webhook.
@@ -87,6 +92,7 @@ def delete(self) -> None:
8792
logger.info("Successfully deleted Webhook: %s", self.id)
8893

8994
@classmethod
95+
@utils.deprecation(replacement_name=None, version="3.0.0")
9096
def get_webhook_events(cls) -> list[dict]:
9197
"""
9298
Gets all available webhook events.
@@ -98,6 +104,7 @@ def get_webhook_events(cls) -> list[dict]:
98104
return cls.session.get(url=url).json()["data"]
99105

100106
@classmethod
107+
@utils.deprecation(replacement_name=None, version="3.0.0")
101108
def all(cls) -> List["Webhook"]:
102109
"""
103110
Gets all registered webhooks for this workspace.

0 commit comments

Comments
 (0)