Skip to main content

SDK Python

Cliente oficial síncrono e assíncrono, Python 3.10+ e httpx, licença Apache-2.0. Sem telemetria. O cliente assíncrono aceita cancelamento normal de tasks asyncio.

As versões distribuídas pelo PyPI são instaladas com python -m pip install docmatch. Confira o estado da publicação antes da primeira instalação. Para usar este checkout, rode python -m pip install -e sdks/python dentro de um ambiente virtual.

Crie uma chave em Minha conta → Acesso à API com uploads:write, runs:write e runs:read. Configure DM_API_BASE_URL=https://docmatch.com.br e DOCMATCH_API_KEY no ambiente do servidor. O método run aprova o limite da estimativa e pode consumir créditos.

from docmatch import Client
import os
from pathlib import Path
client = Client(os.environ['DM_API_BASE_URL'], os.environ['DOCMATCH_API_KEY'])
file = client.upload('dados.csv', Path('dados.csv').read_bytes(), 'text/csv')
input = client.input([file['id']])
quote = client.estimate(input)
# Apresente quote['cap_credits'] e obtenha aprovação.
run = client.run(quote, input)
result = client.wait(run['id'], timeout=600)
Path('corrigido.xlsx').write_bytes(client.export(result['id']))

AsyncClient oferece as mesmas operações com await. Veja contrato e limites e instruções de publicação.

Projetos (0.2.0)

Crie com client.create_project("Fechamento mensal") e guarde o ID. client.project("prj_ID") mantém os envios, regras e resultados no mesmo projeto. A estimativa devolve a conciliação existente quando nada mudou. Uma análise nova exige cotação aprovada; nunca aprove custos adicionais automaticamente.

O exemplo consulta um projeto existente. Só inicia trabalho se DOCMATCH_APPROVE_CAP for maior ou igual ao limite exibido. Configure DM_API_BASE_URL e DOCMATCH_API_KEY, com projects:read, projects:write, uploads:write, runs:read e runs:write.

python examples/project.py prj_ID

Envio de substituição fica pendente até aplicar a versão com replace_document (Go: ReplaceDocument; TypeScript: replaceDocument). Atualize o projeto antes de editar: version protege o salvamento e revision identifica os dados estimados. Em conflito, releia as alterações; em acesso negado, confira o vínculo e os escopos da chave.

Metadata

Release files for docmatch 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docmatch 0.2.0
File Size Uploaded Provenance Actions
docmatch-0.2.0.tar.gz 13.6 kB Without provenance Details for docmatch-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for docmatch 0.2.0
File Interpreter ABI Platform Actions
docmatch-0.2.0-py3-none-any.whl Python 3 none any Details for docmatch-0.2.0-py3-none-any.whl

Total release size: 25.9 kB

Release files / docmatch-0.2.0.tar.gz

Download URL docmatch-0.2.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
77794bfcdd257949e7cfb92611544a3e6b98d406546d6156ad7968749dcb0e76
BLAKE2b-256 checksum
How to use checksums
22de7f1c5781c64def9798f4e9d5f289667a3a08ea869ec46f1de56874a8f7ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / docmatch-0.2.0-py3-none-any.whl

Download URL docmatch-0.2.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fc91a51bfa4ebbe7035c2682271a165f59384fb6732407d988ce08cabed7797
BLAKE2b-256 checksum
How to use checksums
92a0a2d9d5b8745bb0349455be77ef5f1ca1ea75ccd4a04725e70080cd211bc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for docmatch 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page