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
Dinieclient 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e403787804d512f9aae8e1f4d7aea50313cb64bb58bff6b0c8efabc9f17926cb
|
|
| MD5 |
d82d9744ad3aafc3304579706be3a46f
|
|
| BLAKE2b-256 |
14030995cddbedb38288e1e332c880e21f0b9dff7d28bb27607256d84782bf72
|
Provenance
The following attestation bundles were made for dinie_sdk-1.1.0.tar.gz:
Publisher:
publish.yml on dinie-tech/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dinie_sdk-1.1.0.tar.gz -
Subject digest:
e403787804d512f9aae8e1f4d7aea50313cb64bb58bff6b0c8efabc9f17926cb - Sigstore transparency entry: 1809729164
- Sigstore integration time:
-
Permalink:
dinie-tech/sdk-python@b2bc1c5fff8def606c1a24f2808b9257b2456c07 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/dinie-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b2bc1c5fff8def606c1a24f2808b9257b2456c07 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a886a0aed131cb5794913372b60881514881c604ed77b78f1205213209ae3e4
|
|
| MD5 |
8bd9a05b1d5a379ac60ea0268d5687a4
|
|
| BLAKE2b-256 |
b77bb70c5ec3fcf57cff7a17236eed095499ff5e3767c04ce02092cd2dc35043
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dinie_sdk-1.1.0-py3-none-any.whl -
Subject digest:
9a886a0aed131cb5794913372b60881514881c604ed77b78f1205213209ae3e4 - Sigstore transparency entry: 1809729184
- Sigstore integration time:
-
Permalink:
dinie-tech/sdk-python@b2bc1c5fff8def606c1a24f2808b9257b2456c07 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/dinie-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b2bc1c5fff8def606c1a24f2808b9257b2456c07 -
Trigger Event:
push
-
Statement type: