Skip to main content

Official Python SDK for the Dinie V3 API

Project description

dinie

Official Python SDK for the Dinie V3 API (backend-only).

A synchronous Python client for the Dinie credit-as-a-service platform: OAuth2 client-credentials auth (handled for you), automatic retries with idempotency, cursor pagination, typed errors, and webhook verification. Snake_case throughout — the wire and the Python surface match, so there is no casing to translate.

Status — pre-release (0.5.0). The public surface is being generated from the Dinie V3 contract. PyPI publishing is planned for V1.0; until then install directly from the repository.

Requirements

  • Python >= 3.10
  • A Dinie API credential (client_id + client_secret)

Installation

pip install -e ".[dev]"

Quickstart

import dinie

client = dinie.Dinie(client_id="dinie_ci_…", client_secret="…")

customer = client.customers.create(
    email="ana@example.com",
    phone="+5511999999999",
    cpf="123.456.789-09",
)

customer.id      # "cust_…"
customer.status  # "pending_kyc"

Note: the Dinie client and generated resource methods are populated in story 007. This scaffold ships a typed skeleton that keeps CI green.

The client owns an in-memory OAuth2 token cache, so construct it once and reuse it. Tokens are fetched and refreshed transparently.

Development

pip install -e ".[dev]"
pytest tests/
ruff check dinie/ tests/
mypy --strict dinie/

Architecture

dinie/
  runtime/    # hand-written: HTTP, auth, retries, pagination, errors, webhooks
  generated/  # spec-driven: client, resources, types, events (emitted by sdk-generator)

The runtime/ layer is hand-written and owned by humans. The generated/ layer is emitted by sdk-generator --target python from the OpenAPI spec + sdk-config.yml. Never hand-edit generated/ — regenerate instead.

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

dinie_sdk-1.1.0.tar.gz (81.0 kB view details)

Uploaded Source

Built Distribution

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

dinie_sdk-1.1.0-py3-none-any.whl (106.7 kB view details)

Uploaded Python 3

File details

Details for the file dinie_sdk-1.1.0.tar.gz.

File metadata

  • Download URL: dinie_sdk-1.1.0.tar.gz
  • Upload date:
  • Size: 81.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dinie_sdk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e403787804d512f9aae8e1f4d7aea50313cb64bb58bff6b0c8efabc9f17926cb
MD5 d82d9744ad3aafc3304579706be3a46f
BLAKE2b-256 14030995cddbedb38288e1e332c880e21f0b9dff7d28bb27607256d84782bf72

See more details on using hashes here.

Provenance

The following attestation bundles were made for dinie_sdk-1.1.0.tar.gz:

Publisher: publish.yml on dinie-tech/sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dinie_sdk-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: dinie_sdk-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 106.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dinie_sdk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a886a0aed131cb5794913372b60881514881c604ed77b78f1205213209ae3e4
MD5 8bd9a05b1d5a379ac60ea0268d5687a4
BLAKE2b-256 b77bb70c5ec3fcf57cff7a17236eed095499ff5e3767c04ce02092cd2dc35043

See more details on using hashes here.

Provenance

The following attestation bundles were made for dinie_sdk-1.1.0-py3-none-any.whl:

Publisher: publish.yml on dinie-tech/sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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