Skip to main content

Asguard API

Project description

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asguard-1.0.0.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asguard-1.0.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file asguard-1.0.0.tar.gz.

File metadata

  • Download URL: asguard-1.0.0.tar.gz
  • Upload date:
  • Size: 32.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for asguard-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c81578ee6c78a8a9108d6e1e3e90b69e3669d6c52d987d38b5817ce74fd22fc0
MD5 80940b202f8129d185181d0b57c74725
BLAKE2b-256 ef7c535a5c1d074421d19ca587fd40c5578a468a0c40983bcf35fbcf17ca927e

See more details on using hashes here.

File details

Details for the file asguard-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: asguard-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for asguard-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4248d1eaa2b3f329279e34984ee3153b1b0202869672f84c4663f9531674351
MD5 d31df4972815a51f7a8587cdf8800eb3
BLAKE2b-256 3eeb8bdc7d2fb2658852b5bfee45a6803133fee3438eef18a75dc10847fef489

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page