erioon 0.0.5__tar.gz → 0.0.6__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.
- {erioon-0.0.5 → erioon-0.0.6}/PKG-INFO +1 -1
- {erioon-0.0.5 → erioon-0.0.6}/erioon/auth.py +2 -2
- {erioon-0.0.5 → erioon-0.0.6}/erioon/client.py +5 -2
- {erioon-0.0.5 → erioon-0.0.6}/erioon.egg-info/PKG-INFO +1 -1
- {erioon-0.0.5 → erioon-0.0.6}/setup.py +1 -1
- {erioon-0.0.5 → erioon-0.0.6}/LICENSE +0 -0
- {erioon-0.0.5 → erioon-0.0.6}/README.md +0 -0
- {erioon-0.0.5 → erioon-0.0.6}/erioon/collection.py +0 -0
- {erioon-0.0.5 → erioon-0.0.6}/erioon/database.py +0 -0
- {erioon-0.0.5 → erioon-0.0.6}/erioon.egg-info/SOURCES.txt +0 -0
- {erioon-0.0.5 → erioon-0.0.6}/erioon.egg-info/dependency_links.txt +0 -0
- {erioon-0.0.5 → erioon-0.0.6}/erioon.egg-info/requires.txt +0 -0
- {erioon-0.0.5 → erioon-0.0.6}/erioon.egg-info/top_level.txt +0 -0
- {erioon-0.0.5 → erioon-0.0.6}/setup.cfg +0 -0
@@ -16,5 +16,5 @@ def Auth(credential_string):
|
|
16
16
|
>>> client = Auth("<EMAIL>:<PASSWORD>")
|
17
17
|
>>> print(client) # prints user_id if successful or error message if not
|
18
18
|
"""
|
19
|
-
email, password = credential_string.split(":")
|
20
|
-
return ErioonClient(email, password)
|
19
|
+
api, email, password = credential_string.split(":")
|
20
|
+
return ErioonClient(api ,email, password)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import os
|
2
2
|
import json
|
3
3
|
import requests
|
4
|
+
from werkzeug.security import generate_password_hash
|
4
5
|
from erioon.database import Database
|
5
6
|
|
6
7
|
class ErioonClient:
|
@@ -18,7 +19,7 @@ class ErioonClient:
|
|
18
19
|
token_path (str): Local path to cached authentication token.
|
19
20
|
"""
|
20
21
|
|
21
|
-
def __init__(self, email, password, base_url="https://sdk.erioon.com"):
|
22
|
+
def __init__(self, api, email, password, base_url="https://sdk.erioon.com"):
|
22
23
|
"""
|
23
24
|
Initialize ErioonClient instance, attempts to load cached token or perform login.
|
24
25
|
|
@@ -27,6 +28,7 @@ class ErioonClient:
|
|
27
28
|
password (str): User password for authentication.
|
28
29
|
base_url (str, optional): Base API URL. Defaults to "https://sdk.erioon.com".
|
29
30
|
"""
|
31
|
+
self.api = api
|
30
32
|
self.email = email
|
31
33
|
self.password = password
|
32
34
|
self.base_url = base_url
|
@@ -90,7 +92,8 @@ class ErioonClient:
|
|
90
92
|
dict: Metadata with user_id, database, cluster, etc.
|
91
93
|
"""
|
92
94
|
url = f"{self.base_url}/login_with_credentials"
|
93
|
-
|
95
|
+
hashed_key = generate_password_hash(self.api)
|
96
|
+
payload = {"api_key": hashed_key,"email": self.email, "password": self.password}
|
94
97
|
headers = {"Content-Type": "application/json"}
|
95
98
|
|
96
99
|
response = requests.post(url, json=payload, headers=headers)
|
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
|