Skip to main content

Enfuce nextgen client SDK (Python). One sub-package per API under enfuce_nextgen.

Project description

enfuce-nextgen-sdk

Enfuce nextgen client SDK for Python. Each API is an isolated sub-package under enfuce_nextgen, so identically-named models across APIs never collide.

Installation

pip install enfuce-nextgen-sdk

Usage

Every API module ships a fluent <Module>Client (e.g. CardClient, ExchangeRateClient) that builds the ApiClient, installs OAuth, applies the host, and exposes each API:

from enfuce_nextgen.oauth import client_credentials
from enfuce_nextgen.config import TenantEnvironment, issuer_base_url, token_url
from enfuce_nextgen.card import CardClient

# Identify the host by tenant + environment; the config helper derives every URL from it.
te = TenantEnvironment("<tenant>", "eu.live.prod")

# One token manager (cached client-credentials grant) — reuse it across every module.
clientCredentialsManager = client_credentials(
    token_url(te),
    "<client-id>", "<client-secret>", scopes=["issuer/admin.read"],
)

client = (
    CardClient.builder()
    .base_url(issuer_base_url(te))
    .oauth(clientCredentialsManager)                                          # token on every request + 401 retry
    .configure(lambda c: setattr(c, "proxy", "http://proxy:8080"))  # optional: TLS, retries, pool …
    .build()
)

card = client.get_card_api().get_card(card_id, x_audit_user="you@example.com")

build() works without .oauth(...) (unauthenticated), and configure(lambda c: …) hands you the Configuration for transport settings (proxy, TLS, retries, connection pool). The same builder is available for every module, including ones whose spec declares no security scheme (e.g. ExchangeRateClient).

Timeouts are per request in the Python client — pass _request_timeout (seconds, or a (connect, read) tuple) on any call:

client.get_card_api().get_card(card_id, x_audit_user="you@example.com", _request_timeout=10)

Prefer the lower level? enfuce_nextgen.oauth.oauth_configuration / oauth_api_client build an OAuth-enabled Configuration / ApiClient you can pass to an API class directly.

Keeping the token URL separate from the client identity? Pass a ClientCredentials — e.g. with the config helper deriving the URL:

from enfuce_nextgen.oauth import ClientCredentials, client_credentials
from enfuce_nextgen.config import TenantEnvironment, token_url

te = TenantEnvironment("<tenant>", "eu.live.prod")
clientCredentialsManager = client_credentials(
    token_url(te),
    ClientCredentials("<client-id>", "<client-secret>", ["issuer/admin.read"]),
)

Available APIs

  • enfuce_nextgen.card
  • enfuce_nextgen.wallet
  • enfuce_nextgen.cardholder
  • enfuce_nextgen.pin
  • enfuce_nextgen.issuer_events
  • enfuce_nextgen.authorisation_control
  • enfuce_nextgen.cards
  • enfuce_nextgen.threeds
  • enfuce_nextgen.threeds_oob
  • enfuce_nextgen.clearing_file_copy
  • enfuce_nextgen.transaction_event

Requirements

  • Python >=3.9
  • pydantic >=2

License

MIT

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

enfuce_nextgen_sdk-0.0.8.tar.gz (369.8 kB view details)

Uploaded Source

Built Distribution

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

enfuce_nextgen_sdk-0.0.8-py3-none-any.whl (703.1 kB view details)

Uploaded Python 3

File details

Details for the file enfuce_nextgen_sdk-0.0.8.tar.gz.

File metadata

  • Download URL: enfuce_nextgen_sdk-0.0.8.tar.gz
  • Upload date:
  • Size: 369.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for enfuce_nextgen_sdk-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e7ffad8e8162c35f835c2917c6eacfe6e4a58ef24ce0828a0b578c0e61c33343
MD5 d50a29ecb5b63a0982fb28375ee30b09
BLAKE2b-256 cf7426becd979c21db3545e2167efd6a0f7256553498b61c431bcbb196a18579

See more details on using hashes here.

File details

Details for the file enfuce_nextgen_sdk-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for enfuce_nextgen_sdk-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b7f66b80a246676427a255e0a0da0ba15b0ea155deafef973472bd15ce6877f3
MD5 117b40919792672997aa3619410e6419
BLAKE2b-256 b6ee2ad6a7982824252c0f8a1e5f484fd2499181582b0c86480d43b970c93fb0

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