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
20 changes: 13 additions & 7 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,15 +26,18 @@ print(rep["score"]["value"], rep["score"]["grade"])
base_rep = client.get_reputation("0x1234...", chain="base")

# Identity gate with policy (paid)
gated = client.assess("0x1234...", policy={
"require_kyc": True,
"require_sanctions_clear": True,
"min_age": 21,
})
gated = client.assess(
"0x1234...",
policy={
"require_kyc": True,
"require_sanctions_clear": True,
"min_age": 21,
},
)

if gated["decision"] == "deny":
print(gated["decision_reasons"]) # ["kyc_required"]
print(gated.get("verify_url")) # URL for operator verification
print(gated.get("verify_url")) # URL for operator verification

# Check verification level
rep = client.get_reputation("0x1234...")
Expand DownExpand Up@@ -198,7 +201,10 @@ All non-timeout `httpx.HTTPError` (ConnectError, ProtocolError, NetworkError, et

```python
from agentscore import (
AgentScore, AgentScoreError, TokenExpiredError, QuotaExceededError,
AgentScore,
AgentScoreError,
TokenExpiredError,
QuotaExceededError,
)
from agentscore.errors import TimeoutError as AgentScoreTimeoutError

Expand Down
4 changes: 2 additions & 2 deletions agentscore/client.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -563,11 +563,11 @@ async def aclose(self):
def __enter__(self):
return self

def __exit__(self, *args):
def __exit__(self, *_args):
self.close()

async def __aenter__(self):
return self

async def __aexit__(self, *args):
async def __aexit__(self, *_args):
await self.aclose()
Loading