Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ repos:
- id: detect-private-key
- id: requirements-txt-fixer
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
rev: v2.4.2
hooks:
- id: codespell
exclude: ^locale/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
rev: v0.15.10
hooks:
- id: ruff-check
args: [--fix]
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## `2.3.0` - 2026-04-14

#### πŸš€ New Features

- **Added `get_metadata_by_public_addresses` to User resource**
- Enables retrieving metadata for a batch of users in a single request, avoiding rate limiting issues when exporting large numbers of users
- Accepts a list of Ethereum public addresses and returns metadata for each user
- Errors for individual addresses (not found, unauthorized, malformed) are returned per-entry without failing the whole request

---

## `2.2.1` - 2026-02-10

#### πŸ› Bug Fixes
Expand Down
13 changes: 13 additions & 0 deletions magic_admin/resources/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

class User(ResourceComponent):
v1_user_info = "/v1/admin/user"
v1_users_info = "/v1/admin/users"
v1_user_logout = "/v1/admin/user/logout"
v2_user_info = "/v2/admin/user"

Expand Down Expand Up @@ -41,6 +42,18 @@ def get_metadata_by_public_address(self, public_address):
construct_issuer_with_public_address(public_address),
)

def get_metadata_by_public_addresses(self, public_addresses):
return self.request(
"post",
self.v1_users_info,
data={
"issuers": [
construct_issuer_with_public_address(addr)
for addr in public_addresses
],
},
)

def get_metadata_by_token(self, did_token):
return self.get_metadata_by_issuer(self.Token.get_issuer(did_token))

Expand Down
2 changes: 1 addition & 1 deletion magic_admin/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.2.1"
VERSION = "2.3.0"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "magic-admin"
version = "2.2.1"
version = "2.3.0"
description = "Magic Python Library"
readme = "README.md"
authors = [
Expand Down
Loading