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.0.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.0.0-py3-none-any.whl (106.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dinie_sdk-1.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 4385b821667b237906a9ae328c28d1d06b398e5ac29991dd7a768b5b40d03804
MD5 a516a31681089fac21c2c4870fb506a9
BLAKE2b-256 b253384e3ebceb24952c518c5476e0e1d54910bd6810a3a12ce672dd81f2fca3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dinie_sdk-1.0.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.0.0-py3-none-any.whl.

File metadata

  • Download URL: dinie_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 106.6 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e78f2e404b5af93922bc6e4986a2c16523876b8b44f462a987f0462728d80687
MD5 4180604e03f82d3fcebe8d32d5d100c8
BLAKE2b-256 6b8a46a53ce9b268465cfc2929730965c647b33d17a7ed203562b02bc9c46a9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dinie_sdk-1.0.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