Skip to main content

anvisa

Python client and command-line tool for ANVISA's official Consultas Externas API (fila de análise, listas, UDI de dispositivos médicos, termos GMDN, nomes técnicos, assuntos de peticionamento).

uv tool install anvisa   # or: pipx install anvisa

Credentials come from https://api.anvisa.gov.br/ (login Gov.br → Client ID / Client Secret). Write them to ~/.config/anvisa/credentials.env (CLIENT_ID=..., CLIENT_SECRET=..., chmod 600) or export ANVISA_CLIENT_ID / ANVISA_CLIENT_SECRET.

anvisa fila areas
anvisa fila consulta 167
anvisa udi search --nome cateter
anvisa --format json udi get 377
anvisa lista consulta 2141
anvisa nome-tecnico search --size 50
anvisa assunto lista --busca bioequival
from anvisa import Client

with Client.from_env() as anvisa:
    queue = anvisa.fila.consulta(167)
    page = anvisa.udi.search(nomeComercial="cateter", size=50)

What the library handles for you, because ANVISA's spec doesn't say so: a User-Agent that Cloudflare accepts, token caching and renewal (29-minute tokens, no refresh token), a mirror of the gateway's rate limit (burst 25, 1 request/s) so loops never hit 429, 1-based request pages against 0-based responses, required filter keys, and typed exceptions for the validation errors ANVISA reports as HTTP 500.

Full write-up, spec overlay and recorded fixtures: https://github.com/vasfvitor/anvisa-api

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anvisa-0.3.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

anvisa-0.3.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file anvisa-0.3.0.tar.gz.

File metadata

  • Download URL: anvisa-0.3.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anvisa-0.3.0.tar.gz
Algorithm Hash digest
SHA256 104f91a46c141a41bdaf97923dae81536dfd578f4387bd60a86a20e531aeb9a2
MD5 4a5c5b4c3a6bf9f9a017872438505410
BLAKE2b-256 97798123c20f5bf8e8cca72f6c731bd292fc6fc83edcd101edf6349f64fe3d37

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvisa-0.3.0.tar.gz:

Publisher: release.yml on vasfvitor/anvisa-api

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

File details

Details for the file anvisa-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: anvisa-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anvisa-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5e27cbd9a181e78cd8def1910afde48bc0d9a99e06e9729afc1ebff67ef700b
MD5 38022a5e4262fa01e248268f3078ca60
BLAKE2b-256 8bf523921769d50f971e3a695113eb66435ce2e3bd6d6c94ba0147671199c6d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvisa-0.3.0-py3-none-any.whl:

Publisher: release.yml on vasfvitor/anvisa-api

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

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

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