Skip to main content

Python CardScan API client

Project description

cardscan-client

The official python client for the CardScan API

Requirements.

Python 3.8+

Installation & Usage

pip install cardscan-client

Getting Started

Please follow the installation procedure and then run the following:

from cardscan_client.api_client import ApiClient
from cardscan_client.api.card_scan_api import CardScanApi
from cardscan_client.configuration import Configuration
from cardscan_client.exceptions import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://sandbox.cardscan.ai/v1
# See configuration.py for a list of all supported configuration parameters.
# configuration = Configuration(host="https://sandbox.cardscan.ai/v1")

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = Configuration(
    host=os.environ["HOST"],
    api_key=os.environ["API_KEY"],
)


async def main():
    # Enter a context with an instance of the API client
    async with ApiClient(configuration) as api_client:
        # Create an instance of the API class
        api_instance = CardScanApi(api_client)

        try:
            # Creates a new card
            api_response = await api_instance.get_access_token()

            print("The response of GetAccessToken->get_access_token:\n")
            pprint(api_response)
        except ApiException as e:
            print("Exception when calling GetAccessToken->get_access_token: %s\n" % e)


if __name__ == "__main__":
    import asyncio

    asyncio.run(main())

```python

import time
import cardscan_client
from cardscan_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://sandbox.cardscan.ai/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = cardscan_client.Configuration(
    host = "https://sandbox.cardscan.ai/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = cardscan_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
async with cardscan_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cardscan_client.CardScanApi(api_client)
    create_card_request = cardscan_client.CreateCardRequest() # CreateCardRequest |  (optional)

    try:
        # Creates a new card
        api_response = await api_instance.create_card(create_card_request=create_card_request)
        print("The response of CardScanApi->create_card:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CardScanApi->create_card: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://sandbox.cardscan.ai/v1

Class Method HTTP request Description
CardScanApi create_card POST /cards Creates a new card
CardScanApi create_eligibility POST /eligibility Create Eligibility Record
CardScanApi delete_card_by_id DELETE /cards/{card_id} Delete Card
CardScanApi direct_upload POST /cards/{card_id}/upload Direct Upload
CardScanApi generate_card_upload_url POST /cards/{card_id}/generate-upload-url Card - Generate Upload URL
CardScanApi generate_magic_link GET /generate-magic-link Generate Magic Link
CardScanApi generate_upload_url GET /generate-upload-url Generate an upload URL
CardScanApi get_access_token GET /access-token Access Token
CardScanApi get_card_by_id GET /cards/{card_id} Get Card by ID
CardScanApi get_eligibility_by_id GET /eligibility/{eligibility_id} Get Eligibility
CardScanApi get_scan_metadata GET /scans/{scan_id}/metadata Get Scan Metadata
CardScanApi list_cards GET /cards List Cards
CardScanApi list_eligibility GET /eligibility List Eligibility
CardScanApi search_cards GET /cards/search Search Cards (200) OK
CardScanApi validate_magic_link GET /validate-magic-link Validate Magic Link

Documentation For Models

<a id="documentation-for-authorization"></a>

Documentation For Authorization

Authentication schemes defined for the API: <a id="bearerAuth"></a>

bearerAuth

  • Type: Bearer authentication

Author

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

cardscan_client-0.0.1.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

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

cardscan_client-0.0.1-py3-none-any.whl (89.0 kB view details)

Uploaded Python 3

File details

Details for the file cardscan_client-0.0.1.tar.gz.

File metadata

  • Download URL: cardscan_client-0.0.1.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.6.30-2-lts

File hashes

Hashes for cardscan_client-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6efdd975b624e889a78fd236101deb4cdbe3539ab314e18083c513b2de031b96
MD5 397927af4e7953f92b3969c04bce150b
BLAKE2b-256 42eef95646c7f98c4dc63168dda10790d30673c57bfc4a43a465b0c24c97aa4d

See more details on using hashes here.

File details

Details for the file cardscan_client-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: cardscan_client-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 89.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.6.30-2-lts

File hashes

Hashes for cardscan_client-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6710632dd2e2183e6cfc5b5b22c0fcc8deb3f3cfee36d2260f9fe1db83fdfd0
MD5 9ca0bc790a6b7d9aec646b3388596e67
BLAKE2b-256 e6846f9e67c663fc397999a93a25e5f2a54738bfc5cac82172b4e6b5e21b03c7

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