datadid-sdk-python 1.0.0__tar.gz → 1.0.3__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.4
2
2
  Name: datadid-sdk-python
3
- Version: 1.0.0
3
+ Version: 1.0.3
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
@@ -229,10 +229,6 @@ 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
@@ -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 |
@@ -219,10 +219,6 @@ 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
@@ -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 |
@@ -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.3
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
@@ -229,10 +229,6 @@ 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
@@ -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 |
@@ -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.3"
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"