Skip to main content

anvisa

Python client and CLI for ANVISA's official Consultas Externas API (fila de análise, UDI de dispositivos médicos, termos GMDN, 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 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.1.0.tar.gz (14.4 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.1.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for anvisa-0.1.0.tar.gz
Algorithm Hash digest
SHA256 064fa42f1096b77afeb8cbc430d273d7f0c1153b5e9eb30596e0cae8dff0c2f6
MD5 3407b00056cd47da5b8c7ec5adfcf394
BLAKE2b-256 b81eaa0d990121bc431230719d8ae4559d7896a11c64d1da6ac7af141d06638c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: anvisa-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f17e0753db194ddf464c1a81792b90d70382c7eb2c6cee803434ad7f867f182c
MD5 3ef9a1967069af8720f7243292585069
BLAKE2b-256 4950bf3620ee2a214806bb2b10ce14b86e61f3e627017c474251c2ef4d590918

See more details on using hashes here.

Provenance

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

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

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