Skip to main content

ApiConsultor

PyPI CI

Consultor offline de APIs Python y documentación local. Indexa docstrings y ficheros (.txt, .md, .rst, .zip) en SQLite y responde con un LLM local vía Ollama (qwen3:8b + bge-m3), citando las fuentes. Prefiere abstenerse a inventar: no responde sobre símbolos que no existen y, con un umbral calibrado (api eval), tampoco cuando lo recuperado está lejos de la pregunta. Las preguntas en español se traducen para buscar en docstrings en inglés.

Instalación

Requisitos: Python 3.12+, uv y Ollama en marcha.

uv tool install api-consultor
api setup        # descarga los modelos y ofrece indexar la biblioteca estándar

Actualizar: uv tool upgrade api-consultor y, si el CHANGELOG lo indica, api setup (nuevo Modelfile) o reindexar.

Uso

api index requests rich           # paquetes del entorno de la herramienta
api index pygame -p .venv         # ... o de un entorno virtual de tu proyecto
api index --stdlib                # biblioteca estándar
api index-docs [CARPETA]          # documentación local
api ask                           # entra en chat interactivo
api ask -s requests "..."         # pregunta solo sobre una fuente (repetible)
api ask -d "..."                  # --debug: traducción, candidatos y distancias
api eval evals/stdlib.toml        # mide la recuperación y la abstención
api sources                       # qué hay indexado (--update, --remove, --relocate)

api --help y api COMANDO --help describen todas las opciones.

Configuración

api config muestra los valores efectivos, las rutas de datos y, si no existe, ofrece crear un config.toml comentado. Solo hace falta indicar lo que cambies:

[models]      # chat, embed, embed_dim
[paths]       # db, docs
[retrieval]   # k, candidates, max_per_symbol, max_distance, translate
[display]     # width
[links]       # url, p. ej. "vscode://file/{path}:{line}"

Documentación avanzada

  • Uso detallado: todos los comandos, entornos --python, estados de las fuentes.
  • Configuración: rutas, opciones de config.toml, enlaces a editores, Modelfile.
  • Cómo funciona: indexado, recuperación híbrida, citas, integridad del índice y limitaciones.
  • Evaluar la recuperación: api eval, métricas, abstención y formato de los casos.
  • Desarrollo: calidad, CI y publicación en PyPI.

Desarrollo

git clone https://github.com/isidro-rodriguez/api-consultor
cd api-consultor
uv sync && uv run pre-commit install
uv run pytest            # ruff, ty y pytest también corren en pre-commit / pre-push

Las versiones se publican en PyPI al subir una etiqueta vX.Y.Z. Detalles en AGENTS.md y CHANGELOG.md.

Metadata

Release files for api-consultor 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 api-consultor 0.5.0
File Size Uploaded Provenance
api_consultor-0.5.0.tar.gz 164.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 239.3 kB

Release files / api_consultor-0.5.0.tar.gz

Download URL api_consultor-0.5.0.tar.gz
Size 164.7 kB
Tags Source
SHA-256 checksum
How to use checksums
68f8abe3418f72fab14824a9ebb74e42340f19d80fdc2b1a6d453bc2d889028b
BLAKE2b-256 checksum
How to use checksums
38db73a4f6a67364f982cd62d8df5a14a1b1ada0e20fa920eae0313f1e1bfa98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL api_consultor-0.5.0-py3-none-any.whl
Size 74.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b5fa884207c229c9b9adff0b64424d48250738f52218f6c365bb18e627b0649
BLAKE2b-256 checksum
How to use checksums
6c1105b086c78774a1ba3b018269774120553a82b2ba4d81d0dfc269f07feb30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

Security for api-consultor 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 api_consultor-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 22, 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