SDK oficial de OniPin — protocolo /v1 para IAs y apps (Python)
Project description
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/...— verexamples/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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onipin-0.2.4.tar.gz.
File metadata
- Download URL: onipin-0.2.4.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55c4604a0c61a6842e7034dc7a60e3cf80543ef7d49df6f6b052d9775b2a9598
|
|
| MD5 |
e7f57d61b5c63329d119eadc7b9a0be9
|
|
| BLAKE2b-256 |
d32037e3ee6f96449ce8335fbb40ca46841ce35c0a423f37118b140b28e7a510
|
Provenance
The following attestation bundles were made for onipin-0.2.4.tar.gz:
Publisher:
publish-sdk.yml on deivys1224-ctrl/oniping
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onipin-0.2.4.tar.gz -
Subject digest:
55c4604a0c61a6842e7034dc7a60e3cf80543ef7d49df6f6b052d9775b2a9598 - Sigstore transparency entry: 2193350505
- Sigstore integration time:
-
Permalink:
deivys1224-ctrl/oniping@6ac5c079e1302efbac04514d792ce2b32fde712b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/deivys1224-ctrl
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@6ac5c079e1302efbac04514d792ce2b32fde712b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file onipin-0.2.4-py3-none-any.whl.
File metadata
- Download URL: onipin-0.2.4-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2524d3c56541607f841a09ae858ae7f74913832d687cb37f33682d55c1344c1f
|
|
| MD5 |
ab357b33a6a2bb400298e715989bf9e1
|
|
| BLAKE2b-256 |
ee63a2e76b921366bfb28f580ffab4088562f2b2f69faa19db20a4db6c7e4170
|
Provenance
The following attestation bundles were made for onipin-0.2.4-py3-none-any.whl:
Publisher:
publish-sdk.yml on deivys1224-ctrl/oniping
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onipin-0.2.4-py3-none-any.whl -
Subject digest:
2524d3c56541607f841a09ae858ae7f74913832d687cb37f33682d55c1344c1f - Sigstore transparency entry: 2193350510
- Sigstore integration time:
-
Permalink:
deivys1224-ctrl/oniping@6ac5c079e1302efbac04514d792ce2b32fde712b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/deivys1224-ctrl
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@6ac5c079e1302efbac04514d792ce2b32fde712b -
Trigger Event:
workflow_dispatch
-
Statement type: