bapp-api-client 0.4.2__tar.gz → 0.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.4.2
3
+ ## 0.4.3
4
4
 
5
5
  - Initial release.
6
6
  - Authentication: Bearer (JWT/OAuth) and Token (API key).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bapp-api-client
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: BAPP Auto API Client for Python
5
5
  Project-URL: Homepage, https://www.bapp.ro
6
6
  Project-URL: Repository, https://github.com/bapp-open/sdk-python
@@ -54,15 +54,19 @@ class BappApiClient:
54
54
  host="https://panel.bapp.ro/api",
55
55
  tenant=None,
56
56
  app="account",
57
+ user_agent=None,
57
58
  ):
58
59
  self.host = host.rstrip("/")
59
60
  self.tenant = tenant
60
61
  self.app = app
62
+ self.user_agent = user_agent
61
63
  self._session = requests.Session()
62
64
  if bearer:
63
65
  self._session.headers["Authorization"] = f"Bearer {bearer}"
64
66
  elif token:
65
67
  self._session.headers["Authorization"] = f"Token {token}"
68
+ if user_agent:
69
+ self._session.headers["User-Agent"] = user_agent
66
70
 
67
71
  # -- internals -----------------------------------------------------------
68
72
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bapp-api-client"
7
- version = "0.4.2"
7
+ version = "0.4.3"
8
8
  description = "BAPP Auto API Client for Python"
9
9
  requires-python = ">=3.9"
10
10
  license = "MIT"
File without changes