Skip to main content

onipin (Python)

SDK oficial de OniPin — protocolo onipin/0.2.

Mismo contrato que onipin-js: discover → handshake → chat → poll messages.

PyPI: https://pypi.org/project/onipin/
OpenAPI: https://onnivers.store/v1/openapi.yaml

Instalación

pip install onipin

Solo usa la biblioteca estándar (sin dependencias).

Inicio rápido

from onipin import OniPinClient

oni = OniPinClient(
    pin="onp_tu_pin",
    agent={"name": "MiAgente", "version": "1.0"},
)

oni.handshake("business.chat")
chat = oni.chat("Hola, ¿qué servicios ofrecen?", intent="business.chat")
print(chat.get("reply", {}).get("text") if chat.get("reply") else chat)

# Si reply es null (dueño en modo humano):
# page = oni.poll_messages(timeout_ms=120_000)

API

Método Descripción
ping() Discovery GET /v1/ping/:pin
discover_from_url(url) GET /v1/discover?url=
handshake(intent?, agent?) Handshake 0.2
catalog() Catálogo público
chat(message, …) Chat; guarda conversation_id
messages(…) Poll de mensajes
poll_messages(…) Poll hasta bot/owner o timeout
create_booking(**fields) Reserva
create_order(**fields) Pedido
reset() Nueva conversación local

Integraciones

  • LangChain / LlamaIndex: ver examples/langchain_tool.py (tool HTTP)
  • n8n / Zapier / Power Automate: HTTP Request a https://onnivers.store/v1/... — ver examples/n8n_http.md
  • MCP (Cursor/Claude): https://onnivers.store/mcp (sin Python)

Conformance

# Desde PyPI (venv limpio) contra producción
npm run smoke:sdk:py

# O con el checkout del monorepo
python packages/onipin-py/examples/prod_smoke.py

Licencia

MIT — Empresa Tecnológica de Colombia / OnniVers

Metadata

Release files for onipin 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onipin 0.2.5
File Size Uploaded Provenance
onipin-0.2.5.tar.gz 5.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 10.8 kB

Release files / onipin-0.2.5.tar.gz

Download URL onipin-0.2.5.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0bf37516d6c148358e272914f55d2ddb4a00c2bbca0e3ba24670f39dc4e2f673
BLAKE2b-256 checksum
How to use checksums
d6a4dc2b5cc9aa0d864c0e5de846387a2b6b1f847d3c9a3b1b65fd8d087df085
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 18, 2026.

Transparency log

Release files / onipin-0.2.5-py3-none-any.whl

Download URL onipin-0.2.5-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6887fd3276d3b7ed8245598bfe4060a5dce8cf6895c45b4a05d449b84b3b748
BLAKE2b-256 checksum
How to use checksums
dfc8ce0e9eedf60f6d8ad3931dce96bdb742bc669bbbade453d28ed7a1f3d2c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 18, 2026.

Transparency log

Security for onipin 0.2.5

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 onipin-0.2.5.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 Jul 18, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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