sparq 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl
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.
- recover.py +29 -22
- {sparq-0.1.4.dist-info → sparq-0.1.5.dist-info}/METADATA +1 -1
- sparq-0.1.5.dist-info/RECORD +9 -0
- sparq-0.1.4.dist-info/RECORD +0 -9
- {sparq-0.1.4.dist-info → sparq-0.1.5.dist-info}/WHEEL +0 -0
- {sparq-0.1.4.dist-info → sparq-0.1.5.dist-info}/licenses/LICENSE +0 -0
- {sparq-0.1.4.dist-info → sparq-0.1.5.dist-info}/top_level.txt +0 -0
recover.py
CHANGED
@@ -23,32 +23,39 @@ def recover():
|
|
23
23
|
print("Invalid email address")
|
24
24
|
return
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
26
|
+
try:
|
27
|
+
response = requests.post(
|
28
|
+
f"{API_URL}/recover",
|
29
|
+
json={"email": email},
|
30
|
+
headers={"Content-Type": "application/json"}
|
31
|
+
)
|
32
|
+
|
33
|
+
if response.status_code != 200:
|
34
|
+
print(f"Error: {response.json().get('detail', 'Unknown error')}")
|
35
|
+
return
|
36
|
+
|
37
|
+
print("Verification code sent to your email")
|
38
|
+
except Exception as e:
|
39
|
+
print(f"Error connecting to API: {e}")
|
34
40
|
return
|
35
41
|
|
36
|
-
print("Verification code sent to your email")
|
37
|
-
|
38
42
|
code = input("Enter code: ").strip()
|
39
43
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
44
|
+
try:
|
45
|
+
response = requests.post(
|
46
|
+
f"{API_URL}/recover",
|
47
|
+
json={"email": email, "code": code},
|
48
|
+
headers={"Content-Type": "application/json"}
|
49
|
+
)
|
50
|
+
|
51
|
+
if response.status_code == 200:
|
52
|
+
api_key = response.json()["api_key"]
|
53
|
+
print(f"\nAPI Key: {api_key}")
|
54
|
+
save_api_key(api_key, email)
|
55
|
+
else:
|
56
|
+
print(f"Error: {response.json().get('detail', 'Unknown error')}")
|
57
|
+
except Exception as e:
|
58
|
+
print(f"Error connecting to API: {e}")
|
52
59
|
|
53
60
|
if __name__ == "__main__":
|
54
61
|
recover()
|
@@ -0,0 +1,9 @@
|
|
1
|
+
auth.py,sha256=MK1cCKnhkPru6DTp8rSG4G4cTuxydRC-FJQV2Ua4zqc,1576
|
2
|
+
client.py,sha256=V-2lY3-Bqf3OS57uDvld1pCJ0GgOAQCNQathZoAJbVI,2003
|
3
|
+
recover.py,sha256=wTisYzw-B_xpciqep1bwEOQcNoVpsdQKzCaxIli3dL8,1701
|
4
|
+
usage.py,sha256=-iaXr_CZGlY7qNxJCzkU0P1eZ-cZDHJYjLPbpKDBqq8,1845
|
5
|
+
sparq-0.1.5.dist-info/licenses/LICENSE,sha256=u3S2yd9hZVIlnAs1I1u7Dh7yvkF5UOD2ioaXRzuPqhQ,1068
|
6
|
+
sparq-0.1.5.dist-info/METADATA,sha256=qiS_e9UOLPTc5fCHj26RVn9Z3dCcv0VjV_YD1a-z0IM,2043
|
7
|
+
sparq-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
+
sparq-0.1.5.dist-info/top_level.txt,sha256=BC13SQ_ChSPIgV2PKOkVEiZ7xvZH7PocWm29AQN_2NU,26
|
9
|
+
sparq-0.1.5.dist-info/RECORD,,
|
sparq-0.1.4.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
auth.py,sha256=MK1cCKnhkPru6DTp8rSG4G4cTuxydRC-FJQV2Ua4zqc,1576
|
2
|
-
client.py,sha256=V-2lY3-Bqf3OS57uDvld1pCJ0GgOAQCNQathZoAJbVI,2003
|
3
|
-
recover.py,sha256=mytwHgfYqLXP8TTLpHA1MQuHSwqiXk5d3_0IlNOnTkQ,1362
|
4
|
-
usage.py,sha256=-iaXr_CZGlY7qNxJCzkU0P1eZ-cZDHJYjLPbpKDBqq8,1845
|
5
|
-
sparq-0.1.4.dist-info/licenses/LICENSE,sha256=u3S2yd9hZVIlnAs1I1u7Dh7yvkF5UOD2ioaXRzuPqhQ,1068
|
6
|
-
sparq-0.1.4.dist-info/METADATA,sha256=IPIEIhRbwK5_HWVjFeJ66BTtS0SoWl_T4cP5_aemcGo,2043
|
7
|
-
sparq-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
-
sparq-0.1.4.dist-info/top_level.txt,sha256=BC13SQ_ChSPIgV2PKOkVEiZ7xvZH7PocWm29AQN_2NU,26
|
9
|
-
sparq-0.1.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|