Skip to main content

meteor-ia — SDK oficial de Python para Meteor

Infraestructura agéntica como servicio. Ejecutá tus Mets, gestioná el CRM, integraciones MCP y más, por código.

Server-side only: tu API key met_* es secreta. Nunca la expongas en el browser.

Instalación

pip install meteor-ia

Sin dependencias de runtime (solo la stdlib).

Antes de anunciar una versión

Después de publicar, verificá el artefacto desde PyPI —no el código del workspace— antes de anunciarlo:

npm run python-sdk:published-check

El chequeo instala exactamente la versión declarada en un directorio temporal y comprueba que importa, que su versión coincide y que expone la superficie mínima del cliente. Si PyPI todavía sirve una versión anterior, falla de forma explícita.

Uso

import os
from meteor_ia import Met

met = Met(os.environ["MET_API_KEY"], workspace_id=7)

# Ejecutar un Met y esperar el resultado
run = met.runs.create("Resume los leads de hoy", met="ventas")
print(run["output"])
print(run["energy"])  # breakdown de Energía del run

# Streaming de eventos
for event, data in met.runs.stream("Hola"):
    print(event, data)

# CRM
for contact in met.contacts.iterate():
    print(contact["id"], contact.get("name"))

Manejo de errores

from meteor_ia import MetRateLimitError, MetAuthError

try:
    met.runs.create("...")
except MetRateLimitError as e:
    print("esperá", e.retry_after, "segundos")
except MetAuthError:
    print("key inválida")

Jerarquía: MetErrorMetAuthError (401), MetInvalidRequestError (400/403/404/409), MetRateLimitError (429, con retry_after), MetAgentError (el Met falló), MetApiError (5xx).

Webhooks salientes (Meteor → tu servidor)

Verificá la firma HMAC de cada entrega antes de procesarla:

from meteor_ia import construct_event, MetSignatureVerificationError

# En tu handler HTTP (Flask/FastAPI/…):
try:
    event = construct_event(raw_body, signature_header, os.environ["MET_WEBHOOK_SECRET"])
except MetSignatureVerificationError:
    return ("bad signature", 400)

if event["type"] == "run.completed":
    ...

Partners

Con una key de partner (partner:*):

met.partner.clients.list()
met.partner.commissions.list(status="PAID")
met.partner.payouts.summary()

Auto-paginación

Los endpoints de lista devuelven { "data": [...], "has_more": bool }. Usá .iterate() para recorrer todo transparentemente (cursor opaco starting_after).

Reintentos

429 y 5xx se reintentan con backoff exponencial (default 2 intentos, respeta Retry-After). Los POST llevan Idempotency-Key automático para no duplicar.

Release files for meteor-ia 0.2.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 meteor-ia 0.2.0
File Size Uploaded
meteor_ia-0.2.0.tar.gz 35.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for meteor-ia 0.2.0
File Interpreter ABI Platform
meteor_ia-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 64.6 kB

Release files / meteor_ia-0.2.0.tar.gz

Download URL meteor_ia-0.2.0.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6f09d261b75e6eaa7d130a585933f94ea7f860d99655f56ecca63fba0c42dee6
BLAKE2b-256 checksum
How to use checksums
3ead2f5d88756025b514938a394e3b70b96a3ea5e4a5fb1b4228728b37af3167
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / meteor_ia-0.2.0-py3-none-any.whl

Download URL meteor_ia-0.2.0-py3-none-any.whl
Size 29.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
266d78a2c43c42bb46af9791f2b940f96ff3391d72116d89e764597d8d42d9b2
BLAKE2b-256 checksum
How to use checksums
c8900c49de5032bd304c3a326d1464bc393fd019c19bc6e0cf68047e41cd94bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

0.0.0

2 release 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