dimo-python-sdk 0.0.5__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.
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/PKG-INFO +3 -1
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/auth.py +3 -1
- dimo_python_sdk-0.0.7/dimo/eth_signer.py +14 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo_python_sdk.egg-info/PKG-INFO +3 -1
- dimo_python_sdk-0.0.7/dimo_python_sdk.egg-info/requires.txt +3 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/pyproject.toml +3 -1
- dimo_python_sdk-0.0.5/dimo/eth_signer.py +0 -14
- dimo_python_sdk-0.0.5/dimo_python_sdk.egg-info/requires.txt +0 -1
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/LICENSE +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/README.md +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/__init__.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/__init__.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/device_data.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/device_definitions.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/devices.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/events.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/token_exchange.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/trips.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/user.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/valuations.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/api/vehicle_signal_decoding.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/constants.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/dimo.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/environments.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/errors.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/graphql/__init__.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/graphql/identity.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/graphql/telemetry.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo/request.py +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo_python_sdk.egg-info/SOURCES.txt +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo_python_sdk.egg-info/dependency_links.txt +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo_python_sdk.egg-info/top_level.txt +0 -0
- {dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dimo-python-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: DIMO SDK in Python
|
|
5
5
|
Author-email: Barrett Kowalsky <barrettkowalsky@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/DIMO-Network/dimo-python-sdk
|
|
@@ -13,6 +13,8 @@ Requires-Python: >=3.8
|
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: requests>=2.30.0
|
|
16
|
+
Requires-Dist: eth-account==0.13.4
|
|
17
|
+
Requires-Dist: eth-utils==4.1.1
|
|
16
18
|
|
|
17
19
|
# DIMO Python Developer SDK
|
|
18
20
|
|
|
@@ -75,11 +75,13 @@ class Auth:
|
|
|
75
75
|
"grant_type": "authorization_code",
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
encoded_data = urlencode(form_data)
|
|
79
|
+
|
|
78
80
|
return self._request(
|
|
79
81
|
"POST",
|
|
80
82
|
"Auth",
|
|
81
83
|
"/auth/web3/submit_challenge",
|
|
82
|
-
data=
|
|
84
|
+
data=encoded_data,
|
|
83
85
|
headers=headers,
|
|
84
86
|
)
|
|
85
87
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from eth_account import Account
|
|
2
|
+
from eth_account.messages import encode_defunct
|
|
3
|
+
from eth_utils import to_bytes, remove_0x_prefix, add_0x_prefix
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class EthSigner:
|
|
7
|
+
@staticmethod
|
|
8
|
+
def sign_message(message: str, private_key: str) -> str:
|
|
9
|
+
private_key = add_0x_prefix(remove_0x_prefix(private_key))
|
|
10
|
+
message_hash = encode_defunct(text=message)
|
|
11
|
+
account = Account.from_key(private_key)
|
|
12
|
+
signed_message = account.sign_message(message_hash)
|
|
13
|
+
|
|
14
|
+
return add_0x_prefix(signed_message.signature.hex())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dimo-python-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: DIMO SDK in Python
|
|
5
5
|
Author-email: Barrett Kowalsky <barrettkowalsky@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/DIMO-Network/dimo-python-sdk
|
|
@@ -13,6 +13,8 @@ Requires-Python: >=3.8
|
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: requests>=2.30.0
|
|
16
|
+
Requires-Dist: eth-account==0.13.4
|
|
17
|
+
Requires-Dist: eth-utils==4.1.1
|
|
16
18
|
|
|
17
19
|
# DIMO Python Developer SDK
|
|
18
20
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dimo-python-sdk"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.7"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Barrett Kowalsky", email="barrettkowalsky@gmail.com" },
|
|
10
10
|
]
|
|
@@ -20,6 +20,8 @@ classifiers = [
|
|
|
20
20
|
|
|
21
21
|
dependencies = [
|
|
22
22
|
"requests>=2.30.0",
|
|
23
|
+
"eth-account==0.13.4",
|
|
24
|
+
"eth-utils==4.1.1",
|
|
23
25
|
]
|
|
24
26
|
|
|
25
27
|
[project.urls]
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from eth_account import Account
|
|
2
|
-
from eth_account.messages import encode_defunct
|
|
3
|
-
from eth_utils import to_bytes
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class EthSigner:
|
|
7
|
-
@staticmethod
|
|
8
|
-
def sign_message(message: str, private_key: str) -> str:
|
|
9
|
-
message_bytes = to_bytes(text=message)
|
|
10
|
-
signable_message = encode_defunct(message_bytes)
|
|
11
|
-
account = Account.from_key(private_key)
|
|
12
|
-
signed_message = account.sign_message(signable_message)
|
|
13
|
-
|
|
14
|
-
return signed_message.signature.hex()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
requests>=2.30.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dimo_python_sdk-0.0.5 → dimo_python_sdk-0.0.7}/dimo_python_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|