Python API client for asguard
Complete Asguard platform SDK - Fraud Detection + Face Verification. Two independent microservices, one unified client.
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.0.0
Installation
You can install the package directly from your local repository or via pip:
pip install asguard
# Or when working locally:
python setup.py install
Getting Started
Please follow the installation and then run the following:
import time
import asguard
from asguard.api import fraud_detection_api
from asguard.models.fraud_check_request import FraudCheckRequest
from asguard.models.fraud_check_response import FraudCheckResponse
from pprint import pprint
# Configure API key authorization: ApiKeyAuth
configuration = asguard.Configuration(
host="http://localhost:8081"
)
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'ApiKey'
# Configure Face Service manually via headers or base URL if needed
# Face API is typically hosted on port 8082 with Bearer token
# Enter a context with an instance of the API client
with asguard.ApiClient(configuration) as api_client:
# Set default header for Fraud Service API Key
api_client.set_default_header("X-API-Key", "YOUR_API_KEY")
# Create an instance of the API class
api_instance = fraud_detection_api.FraudDetectionApi(api_client)
fraud_check_request = FraudCheckRequest(
user_id="user_123",
transaction_id="txn_456",
amount=250000.0,
currency="USD",
ip_address="192.168.1.5",
device_id="device_789"
)
try:
# Check transaction for fraud risk
api_response = api_instance.check_fraud(fraud_check_request)
pprint(api_response)
except asguard.ApiException as e:
print("Exception when calling FraudDetectionApi->check_fraud: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost:8081
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FaceVerificationApi | analyze_face | POST /v1/analyze | Analyze face image quality and extract embedding |
| FaceVerificationApi | compare_faces | POST /v1/compare | Compare a probe face image with a reference embedding |
| FraudDetectionApi | check_fraud | POST /analyze | Check transaction for fraud risk |
| SystemApi | health_check_face | GET /face/health | Face service health check |
| SystemApi | health_check_fraud | GET /fraud/health | Fraud service health check |
Documentation For Models
- AnalyzeFaceRequest
- AnalyzeResponse
- CompareFacesRequest
- CompareResponse
- ErrorResponse
- FraudCheckRequest
- FraudCheckResponse
- HealthResponse
Documentation For Authorization
Authentication schemes defined for the API:
ApiKeyAuth
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
BearerAuth
- Type: HTTP Bearer token authentication
Metadata
Release files for asguard 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| asguard-1.0.0.tar.gz | 32.6 kB | Without provenance | Details for asguard-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asguard-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for asguard-1.0.0-py3-none-any.whl |
Total release size: 76.5 kB
Release files / asguard-1.0.0.tar.gz
| Download URL | asguard-1.0.0.tar.gz |
|---|---|
| Size | 32.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c81578ee6c78a8a9108d6e1e3e90b69e3669d6c52d987d38b5817ce74fd22fc0
|
|
BLAKE2b-256 checksum How to use checksums |
ef7c535a5c1d074421d19ca587fd40c5578a468a0c40983bcf35fbcf17ca927e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / asguard-1.0.0-py3-none-any.whl
| Download URL | asguard-1.0.0-py3-none-any.whl |
|---|---|
| Size | 43.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4248d1eaa2b3f329279e34984ee3153b1b0202869672f84c4663f9531674351
|
|
BLAKE2b-256 checksum How to use checksums |
3eeb8bdc7d2fb2658852b5bfee45a6803133fee3438eef18a75dc10847fef489
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for asguard 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.