Skip to main content

Official Python SDK for the Verifiquemos compliance API

Project description

verifiquemos

Official Python SDK for the Verifiquemos compliance API.

KYC, RENAP, OFAC, ONU, Lista Engel, PEP, CPE — Guatemala-specific compliance in one API call.

Requirements

  • Python >= 3.10 (tested on 3.10, 3.11, 3.12, 3.13, 3.14)

Install

pip install verifiquemos

Quickstart (sync)

from verifiquemos import VerifiquemosClient

with VerifiquemosClient(api_key="vfq_...") as client:
    me = client.auth.me()
    print(me["tenant"]["name"])

    # cui is NOT a parameter — it is extracted from the DPI via OCR.
    with open("dpi.jpg", "rb") as f:
        validation = client.validations.create(
            naturaleza_cliente="individual",
            dpi_file=f.read(),
            pais_origen_fondos="GTM",
        )
    print(f"Validation submitted: {validation['id']}")

Quickstart (async)

import asyncio
from verifiquemos import AsyncVerifiquemosClient

async def main():
    async with AsyncVerifiquemosClient(api_key="vfq_...") as client:
        me = await client.auth.me()
        print(me)

asyncio.run(main())

Poll and download the report

create() returns immediately; the validation runs asynchronously. Poll get() until it finishes, then fetch the PDF report.

import time

while True:
    result = client.validations.get(validation["id"])
    if result["status"] == "completed":
        break
    time.sleep(3)

pdf_bytes = client.validations.report(validation["id"])   # raw PDF bytes
with open("report.pdf", "wb") as f:
    f.write(pdf_bytes)

Error handling

from verifiquemos import ApiError, RateLimitError, NetworkError, VerifiquemosClient

with VerifiquemosClient(api_key="vfq_...") as client:
    try:
        client.validations.create(...)
    except RateLimitError as e:
        print(f"Retry after {e.retry_after_seconds}s")
    except ApiError as e:
        if e.is_payment_required:
            print("Buy more credits")
        else:
            raise
    except NetworkError:
        print("Connection failed")

Configuration

Argument Default Description
api_key (required) Server-issued API key. Starts with vfq_.
base_url https://api.verifiquemos.com Override for staging/dev.
timeout 30.0 httpx timeout in seconds.

Documentation

Development

cd verifiquemos-sdk-python
pip install -e ".[dev]"
pytest tests/ -v                              # tests (respx mockea httpx)
ruff check verifiquemos/ tests/
mypy verifiquemos/ --ignore-missing-imports

# Los modelos en verifiquemos/_generated/ se generan desde el OpenAPI del API.
# No editarlos a mano; regenerar tras cambios de contrato (requiere el repo
# hermano ../verifiquemos-api):
bash scripts/regen_models.sh             # lee ../verifiquemos-api/openapi.json

Publicacion a PyPI: el push de un tag git v<version> dispara el pipeline (hatch build + twine upload). Ver CHANGELOG.md.

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

verifiquemos-0.2.2.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

verifiquemos-0.2.2-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file verifiquemos-0.2.2.tar.gz.

File metadata

  • Download URL: verifiquemos-0.2.2.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for verifiquemos-0.2.2.tar.gz
Algorithm Hash digest
SHA256 9d203660588baae8386d8837a8d33c9666744fb25e1c7b88706b0be7e39a2afa
MD5 82e5afa766d7d750a8fd0d97d74cd6d4
BLAKE2b-256 3ef5f4b7c122f2c46ba26935b029411d7310664b4358e586d1d55b4491551473

See more details on using hashes here.

File details

Details for the file verifiquemos-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: verifiquemos-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for verifiquemos-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0971e9530b15db37babe5080b664cfbd77442c16399a946a73be58b3c41210d7
MD5 1761dac60db027292a4ca6f333e68eea
BLAKE2b-256 6da2f9161ca734a97dc685fcab022b7b1465e39333a80e7036bf7a4a3caf7115

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