sfq 0.0.6__tar.gz → 0.0.7__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
  Metadata-Version: 2.1
2
2
  Name: sfq
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Python wrapper for the Salesforce's Query API.
5
5
  Author-email: David Moruzzi <sfq.pypi@dmoruzi.com>
6
6
  Keywords: salesforce,salesforce query
@@ -114,7 +114,7 @@ To use the `sfq` library, you'll need a **client ID** and **refresh token**. The
114
114
  "status": 0,
115
115
  "result": {
116
116
  "id": "00Daa0000000000000",
117
- "apiVersion": "62.0",
117
+ "apiVersion": "63.0",
118
118
  "accessToken": "your-access-token-here",
119
119
  "instanceUrl": "https://example-dev-ed.trailblaze.my.salesforce.com",
120
120
  "username": "user@example.com",
@@ -95,7 +95,7 @@ To use the `sfq` library, you'll need a **client ID** and **refresh token**. The
95
95
  "status": 0,
96
96
  "result": {
97
97
  "id": "00Daa0000000000000",
98
- "apiVersion": "62.0",
98
+ "apiVersion": "63.0",
99
99
  "accessToken": "your-access-token-here",
100
100
  "instanceUrl": "https://example-dev-ed.trailblaze.my.salesforce.com",
101
101
  "username": "user@example.com",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sfq"
3
- version = "0.0.6"
3
+ version = "0.0.7"
4
4
  description = "Python wrapper for the Salesforce's Query API."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "David Moruzzi", email = "sfq.pypi@dmoruzi.com" }]
@@ -19,6 +19,7 @@ class SFAuth:
19
19
  token_expiration_time=None,
20
20
  token_lifetime=15 * 60,
21
21
  proxy="auto",
22
+ user_agent="sfq/0.0.7",
22
23
  ):
23
24
  """
24
25
  Initializes the SFAuth with necessary parameters.
@@ -42,6 +43,7 @@ class SFAuth:
42
43
  self.token_expiration_time = token_expiration_time
43
44
  self.token_lifetime = token_lifetime
44
45
  self._auto_configure_proxy(proxy)
46
+ self.user_agent = user_agent
45
47
 
46
48
  def _auto_configure_proxy(self, proxy):
47
49
  """
@@ -83,7 +85,7 @@ class SFAuth:
83
85
  parsed_url = urlparse(self.instance_url)
84
86
  conn = self._create_connection(parsed_url.netloc)
85
87
 
86
- headers = {"Content-Type": "application/x-www-form-urlencoded"}
88
+ headers = {"Content-Type": "application/x-www-form-urlencoded", "User-Agent": self.user_agent}
87
89
  body = "&".join([f"{key}={quote(str(value))}" for key, value in payload.items()])
88
90
 
89
91
  try:
@@ -146,7 +148,7 @@ class SFAuth:
146
148
  else:
147
149
  query_endpoint = f"/services/data/{self.api_version}/query"
148
150
 
149
- headers = {"Authorization": f"Bearer {self.access_token}"}
151
+ headers = {"Authorization": f"Bearer {self.access_token}", "User-Agent": self.user_agent}
150
152
 
151
153
  # Handle special characters in the query
152
154
  encoded_query = quote(query)
@@ -16,7 +16,7 @@ wheels = [
16
16
 
17
17
  [[package]]
18
18
  name = "sfq"
19
- version = "0.0.6"
19
+ version = "0.0.7"
20
20
  source = { editable = "." }
21
21
  dependencies = [
22
22
  { name = "prompt-toolkit" },
File without changes
File without changes
File without changes
File without changes
File without changes