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 query 167
anvisa udi search --nome cateter
anvisa --format json udi get 377
anvisa lista query 2141
anvisa nome-tecnico search --size 50
anvisa assunto list --busca bioequival
from anvisa import Client

with Client() as anvisa:  # credentials from the environment or ~/.config/anvisa/credentials.env
    queue = anvisa.fila.query(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.

Open data, no credentials: pip install 'anvisa[dados]' adds anvisa dados build, which turns ANVISA's alimentos CSVs from dados.anvisa.gov.br (Windows-1252, unescaped quotes) into typed, sorted Parquet plus a manifest.json.

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

Metadata

Release files for anvisa 0.5.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 anvisa 0.5.0
File Size Uploaded Provenance
anvisa-0.5.0.tar.gz 39.4 kB With provenance Details

Built distribution (wheel)

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

Total release size: 85.4 kB

Release files / anvisa-0.5.0.tar.gz

Download URL anvisa-0.5.0.tar.gz
Size 39.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5e1592b0892f9e0998880917c3d947817ce0ce82d3c3b0ec0cfe920a8ebc999f
BLAKE2b-256 checksum
How to use checksums
93124d15746d0106d8f976ca0ba62764a99095f4498c2308ff78c0503ae8f848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / anvisa-0.5.0-py3-none-any.whl

Download URL anvisa-0.5.0-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac2b3a77b01a89521bba8c1280fb849de39f2ef595dd0a4010fd07623d1e89ac
BLAKE2b-256 checksum
How to use checksums
a6a7ee344c2c22edf83fec095c19602b76d2e308554b73c6272a3c1acb100f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Security for anvisa 0.5.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for anvisa-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

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.

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