datadid-sdk-python 1.0.0__tar.gz → 1.0.4__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.

Potentially problematic release.


This version of datadid-sdk-python might be problematic. Click here for more details.

Files changed (19) hide show
  1. {datadid_sdk_python-1.0.0 → datadid_sdk_python-1.0.4}/PKG-INFO +28 -20
  2. {datadid_sdk_python-1.0.0 → datadid_sdk_python-1.0.4}/README.md +27 -19
  3. {datadid_sdk_python-1.0.0 → datadid_sdk_python-1.0.4}/datadid_sdk_python.egg-info/PKG-INFO +28 -20
  4. datadid_sdk_python-1.0.4/datadid_sdk_python.egg-info/SOURCES.txt +23 -0
  5. datadid_sdk_python-1.0.4/datadid_sdk_python.egg-info/top_level.txt +1 -0
  6. {datadid_sdk_python-1.0.0 → datadid_sdk_python-1.0.4}/pyproject.toml +2 -2
  7. datadid_sdk_python-1.0.0/datadid_sdk_python.egg-info/SOURCES.txt +0 -23
  8. datadid_sdk_python-1.0.0/datadid_sdk_python.egg-info/top_level.txt +0 -1
  9. {datadid_sdk_python-1.0.0/src → datadid_sdk_python-1.0.4/datadid}/__init__.py +0 -0
  10. {datadid_sdk_python-1.0.0/src → datadid_sdk_python-1.0.4/datadid}/data/__init__.py +0 -0
  11. {datadid_sdk_python-1.0.0/src → datadid_sdk_python-1.0.4/datadid}/data/client.py +0 -0
  12. {datadid_sdk_python-1.0.0/src → datadid_sdk_python-1.0.4/datadid}/data/types.py +0 -0
  13. {datadid_sdk_python-1.0.0/src → datadid_sdk_python-1.0.4/datadid}/did/__init__.py +0 -0
  14. {datadid_sdk_python-1.0.0/src → datadid_sdk_python-1.0.4/datadid}/did/client.py +0 -0
  15. {datadid_sdk_python-1.0.0/src → datadid_sdk_python-1.0.4/datadid}/did/types.py +0 -0
  16. {datadid_sdk_python-1.0.0/src → datadid_sdk_python-1.0.4/datadid}/errors.py +0 -0
  17. {datadid_sdk_python-1.0.0 → datadid_sdk_python-1.0.4}/datadid_sdk_python.egg-info/dependency_links.txt +0 -0
  18. {datadid_sdk_python-1.0.0 → datadid_sdk_python-1.0.4}/datadid_sdk_python.egg-info/requires.txt +0 -0
  19. {datadid_sdk_python-1.0.0 → datadid_sdk_python-1.0.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datadid-sdk-python
3
- Version: 1.0.0
3
+ Version: 1.0.4
4
4
  Summary: Python SDK for the DataDID developer platform — Data API and DID API clients
5
5
  License-Expression: ISC
6
6
  Keywords: datadid,did,memo
@@ -31,7 +31,7 @@ pip install datadid-sdk-python
31
31
 
32
32
  ```python
33
33
  import asyncio
34
- from src import DataClient
34
+ from datadid import DataClient
35
35
 
36
36
  async def main():
37
37
  client = DataClient.production()
@@ -62,8 +62,8 @@ asyncio.run(main())
62
62
  ### Create a client
63
63
 
64
64
  ```python
65
- from src import DataClient
66
- from src.data.types import DataClientOptions
65
+ from datadid import DataClient
66
+ from datadid.data.types import DataClientOptions
67
67
 
68
68
  client = DataClient.production()
69
69
  # or: client = DataClient.testnet()
@@ -229,16 +229,12 @@ await client.add_action_record(61)
229
229
  await client.add_action_record(61, {"some_option": "value"})
230
230
  ```
231
231
 
232
- **AliveCheck action IDs** (AliveCheck is the platform's liveness/subscription service):
233
- - `5` — first-time AliveCheck subscription
234
- - `6` — AliveCheck renewal
235
-
236
232
  ---
237
233
 
238
234
  ### Error handling
239
235
 
240
236
  ```python
241
- from src import DataDIDApiError
237
+ from datadid import DataDIDApiError
242
238
 
243
239
  try:
244
240
  await client.login_with_email_password("alice@example.com", "wrongpassword")
@@ -255,8 +251,8 @@ except DataDIDApiError as err:
255
251
  By default, login methods store the access token on the client automatically. You can disable this:
256
252
 
257
253
  ```python
258
- from src import DataClient
259
- from src.data.types import DataClientOptions
254
+ from datadid import DataClient
255
+ from datadid.data.types import DataClientOptions
260
256
 
261
257
  client = DataClient(DataClientOptions(
262
258
  base_url="https://data-be.metamemo.one",
@@ -286,7 +282,7 @@ DID operations use a **sign-then-submit** pattern. You never send your private k
286
282
  ### Create a client
287
283
 
288
284
  ```python
289
- from src import DIDClient
285
+ from datadid import DIDClient
290
286
 
291
287
  did_client = DIDClient.production()
292
288
  # or: did_client = DIDClient.testnet()
@@ -413,7 +409,19 @@ file = await did_client.download_mfile(
413
409
  python tests/run.py
414
410
  ```
415
411
 
416
- Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant in `tests/data_client_test.py` needs to be a valid token; replace it if tests fail with a 401 error.
412
+ Tests hit the real production and testnet servers. A valid access token is required.
413
+
414
+ 1. Copy `.env.example` to `.env`
415
+ 2. Paste your token as `DATADID_TOKEN=eyJ...`
416
+
417
+ To get a token: log into the DataDID app, open browser devtools (F12 → Network tab), find the login request, and copy the `access_token` from the response JSON. Tokens expire after 24 hours.
418
+
419
+ You can also pass the token inline without creating a `.env` file:
420
+
421
+ ```bash
422
+ DATADID_TOKEN=eyJ... python tests/run.py # macOS / Linux
423
+ set DATADID_TOKEN=eyJ... && python tests/run.py # Windows cmd
424
+ ```
417
425
 
418
426
  ---
419
427
 
@@ -428,14 +436,14 @@ Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant i
428
436
  | `set_access_token(token)` | Manually set the auth token |
429
437
  | `get_access_token()` | Read the current token |
430
438
  | `send_email_code(email)` | Send verification code to email |
431
- | `login_with_email(email, code, source)` | Login with email + code |
432
- | `register_with_email(email, code, password, source)` | Register new account |
439
+ | `login_with_email(email, code, source, useragent?)` | Login with email + code |
440
+ | `register_with_email(email, code, password, source, useragent?)` | Register new account |
433
441
  | `login_with_email_password(email, password)` | Login with email + password |
434
442
  | `reset_password(email, code, new_password)` | Reset password |
435
- | `login_with_telegram(initdata, source)` | Login with Telegram |
436
- | `login_with_pi(pi_access_token, source)` | Login with Pi Browser |
437
- | `get_evm_challenge(address, chain_id?)` | Get EVM sign-in challenge |
438
- | `login_with_evm(message, signature, source)` | Login with EVM wallet signature |
443
+ | `login_with_telegram(initdata, source, useragent?)` | Login with Telegram |
444
+ | `login_with_pi(pi_access_token, source, useragent?)` | Login with Pi Browser |
445
+ | `get_evm_challenge(address, chain_id?, origin?)` | Get EVM sign-in challenge |
446
+ | `login_with_evm(message, signature, source, useragent?)` | Login with EVM wallet signature |
439
447
  | `refresh_token(refresh_token)` | Get a new access token |
440
448
  | `get_me()` | Basic user info (uid, email, role) |
441
449
  | `get_user_info()` | Full user profile |
@@ -475,5 +483,5 @@ Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant i
475
483
 
476
484
  ## Links
477
485
 
478
- - [Data API reference](https://data-be.metamemo.one)
486
+ - [Data API reference](https://memolabs.gitbook.io/datadid-developer-platform/en/api)
479
487
  - [DID API reference (Swagger)](https://prodidapi.memolabs.org/swagger/index.html)
@@ -21,7 +21,7 @@ pip install datadid-sdk-python
21
21
 
22
22
  ```python
23
23
  import asyncio
24
- from src import DataClient
24
+ from datadid import DataClient
25
25
 
26
26
  async def main():
27
27
  client = DataClient.production()
@@ -52,8 +52,8 @@ asyncio.run(main())
52
52
  ### Create a client
53
53
 
54
54
  ```python
55
- from src import DataClient
56
- from src.data.types import DataClientOptions
55
+ from datadid import DataClient
56
+ from datadid.data.types import DataClientOptions
57
57
 
58
58
  client = DataClient.production()
59
59
  # or: client = DataClient.testnet()
@@ -219,16 +219,12 @@ await client.add_action_record(61)
219
219
  await client.add_action_record(61, {"some_option": "value"})
220
220
  ```
221
221
 
222
- **AliveCheck action IDs** (AliveCheck is the platform's liveness/subscription service):
223
- - `5` — first-time AliveCheck subscription
224
- - `6` — AliveCheck renewal
225
-
226
222
  ---
227
223
 
228
224
  ### Error handling
229
225
 
230
226
  ```python
231
- from src import DataDIDApiError
227
+ from datadid import DataDIDApiError
232
228
 
233
229
  try:
234
230
  await client.login_with_email_password("alice@example.com", "wrongpassword")
@@ -245,8 +241,8 @@ except DataDIDApiError as err:
245
241
  By default, login methods store the access token on the client automatically. You can disable this:
246
242
 
247
243
  ```python
248
- from src import DataClient
249
- from src.data.types import DataClientOptions
244
+ from datadid import DataClient
245
+ from datadid.data.types import DataClientOptions
250
246
 
251
247
  client = DataClient(DataClientOptions(
252
248
  base_url="https://data-be.metamemo.one",
@@ -276,7 +272,7 @@ DID operations use a **sign-then-submit** pattern. You never send your private k
276
272
  ### Create a client
277
273
 
278
274
  ```python
279
- from src import DIDClient
275
+ from datadid import DIDClient
280
276
 
281
277
  did_client = DIDClient.production()
282
278
  # or: did_client = DIDClient.testnet()
@@ -403,7 +399,19 @@ file = await did_client.download_mfile(
403
399
  python tests/run.py
404
400
  ```
405
401
 
406
- Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant in `tests/data_client_test.py` needs to be a valid token; replace it if tests fail with a 401 error.
402
+ Tests hit the real production and testnet servers. A valid access token is required.
403
+
404
+ 1. Copy `.env.example` to `.env`
405
+ 2. Paste your token as `DATADID_TOKEN=eyJ...`
406
+
407
+ To get a token: log into the DataDID app, open browser devtools (F12 → Network tab), find the login request, and copy the `access_token` from the response JSON. Tokens expire after 24 hours.
408
+
409
+ You can also pass the token inline without creating a `.env` file:
410
+
411
+ ```bash
412
+ DATADID_TOKEN=eyJ... python tests/run.py # macOS / Linux
413
+ set DATADID_TOKEN=eyJ... && python tests/run.py # Windows cmd
414
+ ```
407
415
 
408
416
  ---
409
417
 
@@ -418,14 +426,14 @@ Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant i
418
426
  | `set_access_token(token)` | Manually set the auth token |
419
427
  | `get_access_token()` | Read the current token |
420
428
  | `send_email_code(email)` | Send verification code to email |
421
- | `login_with_email(email, code, source)` | Login with email + code |
422
- | `register_with_email(email, code, password, source)` | Register new account |
429
+ | `login_with_email(email, code, source, useragent?)` | Login with email + code |
430
+ | `register_with_email(email, code, password, source, useragent?)` | Register new account |
423
431
  | `login_with_email_password(email, password)` | Login with email + password |
424
432
  | `reset_password(email, code, new_password)` | Reset password |
425
- | `login_with_telegram(initdata, source)` | Login with Telegram |
426
- | `login_with_pi(pi_access_token, source)` | Login with Pi Browser |
427
- | `get_evm_challenge(address, chain_id?)` | Get EVM sign-in challenge |
428
- | `login_with_evm(message, signature, source)` | Login with EVM wallet signature |
433
+ | `login_with_telegram(initdata, source, useragent?)` | Login with Telegram |
434
+ | `login_with_pi(pi_access_token, source, useragent?)` | Login with Pi Browser |
435
+ | `get_evm_challenge(address, chain_id?, origin?)` | Get EVM sign-in challenge |
436
+ | `login_with_evm(message, signature, source, useragent?)` | Login with EVM wallet signature |
429
437
  | `refresh_token(refresh_token)` | Get a new access token |
430
438
  | `get_me()` | Basic user info (uid, email, role) |
431
439
  | `get_user_info()` | Full user profile |
@@ -465,5 +473,5 @@ Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant i
465
473
 
466
474
  ## Links
467
475
 
468
- - [Data API reference](https://data-be.metamemo.one)
476
+ - [Data API reference](https://memolabs.gitbook.io/datadid-developer-platform/en/api)
469
477
  - [DID API reference (Swagger)](https://prodidapi.memolabs.org/swagger/index.html)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datadid-sdk-python
3
- Version: 1.0.0
3
+ Version: 1.0.4
4
4
  Summary: Python SDK for the DataDID developer platform — Data API and DID API clients
5
5
  License-Expression: ISC
6
6
  Keywords: datadid,did,memo
@@ -31,7 +31,7 @@ pip install datadid-sdk-python
31
31
 
32
32
  ```python
33
33
  import asyncio
34
- from src import DataClient
34
+ from datadid import DataClient
35
35
 
36
36
  async def main():
37
37
  client = DataClient.production()
@@ -62,8 +62,8 @@ asyncio.run(main())
62
62
  ### Create a client
63
63
 
64
64
  ```python
65
- from src import DataClient
66
- from src.data.types import DataClientOptions
65
+ from datadid import DataClient
66
+ from datadid.data.types import DataClientOptions
67
67
 
68
68
  client = DataClient.production()
69
69
  # or: client = DataClient.testnet()
@@ -229,16 +229,12 @@ await client.add_action_record(61)
229
229
  await client.add_action_record(61, {"some_option": "value"})
230
230
  ```
231
231
 
232
- **AliveCheck action IDs** (AliveCheck is the platform's liveness/subscription service):
233
- - `5` — first-time AliveCheck subscription
234
- - `6` — AliveCheck renewal
235
-
236
232
  ---
237
233
 
238
234
  ### Error handling
239
235
 
240
236
  ```python
241
- from src import DataDIDApiError
237
+ from datadid import DataDIDApiError
242
238
 
243
239
  try:
244
240
  await client.login_with_email_password("alice@example.com", "wrongpassword")
@@ -255,8 +251,8 @@ except DataDIDApiError as err:
255
251
  By default, login methods store the access token on the client automatically. You can disable this:
256
252
 
257
253
  ```python
258
- from src import DataClient
259
- from src.data.types import DataClientOptions
254
+ from datadid import DataClient
255
+ from datadid.data.types import DataClientOptions
260
256
 
261
257
  client = DataClient(DataClientOptions(
262
258
  base_url="https://data-be.metamemo.one",
@@ -286,7 +282,7 @@ DID operations use a **sign-then-submit** pattern. You never send your private k
286
282
  ### Create a client
287
283
 
288
284
  ```python
289
- from src import DIDClient
285
+ from datadid import DIDClient
290
286
 
291
287
  did_client = DIDClient.production()
292
288
  # or: did_client = DIDClient.testnet()
@@ -413,7 +409,19 @@ file = await did_client.download_mfile(
413
409
  python tests/run.py
414
410
  ```
415
411
 
416
- Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant in `tests/data_client_test.py` needs to be a valid token; replace it if tests fail with a 401 error.
412
+ Tests hit the real production and testnet servers. A valid access token is required.
413
+
414
+ 1. Copy `.env.example` to `.env`
415
+ 2. Paste your token as `DATADID_TOKEN=eyJ...`
416
+
417
+ To get a token: log into the DataDID app, open browser devtools (F12 → Network tab), find the login request, and copy the `access_token` from the response JSON. Tokens expire after 24 hours.
418
+
419
+ You can also pass the token inline without creating a `.env` file:
420
+
421
+ ```bash
422
+ DATADID_TOKEN=eyJ... python tests/run.py # macOS / Linux
423
+ set DATADID_TOKEN=eyJ... && python tests/run.py # Windows cmd
424
+ ```
417
425
 
418
426
  ---
419
427
 
@@ -428,14 +436,14 @@ Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant i
428
436
  | `set_access_token(token)` | Manually set the auth token |
429
437
  | `get_access_token()` | Read the current token |
430
438
  | `send_email_code(email)` | Send verification code to email |
431
- | `login_with_email(email, code, source)` | Login with email + code |
432
- | `register_with_email(email, code, password, source)` | Register new account |
439
+ | `login_with_email(email, code, source, useragent?)` | Login with email + code |
440
+ | `register_with_email(email, code, password, source, useragent?)` | Register new account |
433
441
  | `login_with_email_password(email, password)` | Login with email + password |
434
442
  | `reset_password(email, code, new_password)` | Reset password |
435
- | `login_with_telegram(initdata, source)` | Login with Telegram |
436
- | `login_with_pi(pi_access_token, source)` | Login with Pi Browser |
437
- | `get_evm_challenge(address, chain_id?)` | Get EVM sign-in challenge |
438
- | `login_with_evm(message, signature, source)` | Login with EVM wallet signature |
443
+ | `login_with_telegram(initdata, source, useragent?)` | Login with Telegram |
444
+ | `login_with_pi(pi_access_token, source, useragent?)` | Login with Pi Browser |
445
+ | `get_evm_challenge(address, chain_id?, origin?)` | Get EVM sign-in challenge |
446
+ | `login_with_evm(message, signature, source, useragent?)` | Login with EVM wallet signature |
439
447
  | `refresh_token(refresh_token)` | Get a new access token |
440
448
  | `get_me()` | Basic user info (uid, email, role) |
441
449
  | `get_user_info()` | Full user profile |
@@ -475,5 +483,5 @@ Tests hit the real production and testnet servers. The `ACCESS_TOKEN` constant i
475
483
 
476
484
  ## Links
477
485
 
478
- - [Data API reference](https://data-be.metamemo.one)
486
+ - [Data API reference](https://memolabs.gitbook.io/datadid-developer-platform/en/api)
479
487
  - [DID API reference (Swagger)](https://prodidapi.memolabs.org/swagger/index.html)
@@ -0,0 +1,23 @@
1
+ README.md
2
+ pyproject.toml
3
+ ./datadid/__init__.py
4
+ ./datadid/errors.py
5
+ ./datadid/data/__init__.py
6
+ ./datadid/data/client.py
7
+ ./datadid/data/types.py
8
+ ./datadid/did/__init__.py
9
+ ./datadid/did/client.py
10
+ ./datadid/did/types.py
11
+ datadid/__init__.py
12
+ datadid/errors.py
13
+ datadid/data/__init__.py
14
+ datadid/data/client.py
15
+ datadid/data/types.py
16
+ datadid/did/__init__.py
17
+ datadid/did/client.py
18
+ datadid/did/types.py
19
+ datadid_sdk_python.egg-info/PKG-INFO
20
+ datadid_sdk_python.egg-info/SOURCES.txt
21
+ datadid_sdk_python.egg-info/dependency_links.txt
22
+ datadid_sdk_python.egg-info/requires.txt
23
+ datadid_sdk_python.egg-info/top_level.txt
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "datadid-sdk-python"
7
- version = "1.0.0"
7
+ version = "1.0.4"
8
8
  description = "Python SDK for the DataDID developer platform — Data API and DID API clients"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -16,7 +16,7 @@ dependencies = [
16
16
 
17
17
  [tool.setuptools.packages.find]
18
18
  where = ["."]
19
- include = ["src*"]
19
+ include = ["datadid*"]
20
20
 
21
21
  [tool.setuptools.package-dir]
22
22
  "" = "."
@@ -1,23 +0,0 @@
1
- README.md
2
- pyproject.toml
3
- ./src/__init__.py
4
- ./src/errors.py
5
- ./src/data/__init__.py
6
- ./src/data/client.py
7
- ./src/data/types.py
8
- ./src/did/__init__.py
9
- ./src/did/client.py
10
- ./src/did/types.py
11
- datadid_sdk_python.egg-info/PKG-INFO
12
- datadid_sdk_python.egg-info/SOURCES.txt
13
- datadid_sdk_python.egg-info/dependency_links.txt
14
- datadid_sdk_python.egg-info/requires.txt
15
- datadid_sdk_python.egg-info/top_level.txt
16
- src/__init__.py
17
- src/errors.py
18
- src/data/__init__.py
19
- src/data/client.py
20
- src/data/types.py
21
- src/did/__init__.py
22
- src/did/client.py
23
- src/did/types.py