1
Instalación en Pip
A diferencia de usar APIs lentas de HTTP (como Flask/FastAPI requests normales) que tardan mucho en serializar JSON, Python descargará nuestra librería de bindings UniFFI pre-generada en C para hablar directamente con The Core System.
pip install protocol-orzatty
💡 Cero Complicaciones: Python es un lenguaje como una tortuga sabia (fácil, pero algo lenta para redes). Con este `pip install` le acabas de poner turbinas de avión a la tortuga.
2
Recibir Datos (Ejemplo: Un Modelo IA)
El modelo de IA necesita quedarse dormido pero despertar súper rápido si recibe un comando. Con el SDK de Python, esto se hace en un par de líneas con Python Síncrono (o Asíncrono con hilos).
from po import PoClient
# El 'None' le dice al SDK que él es el Servidor (escuchará peticiones)
# El "4433" es la puerta del servidor.
servidor_ai = PoClient("4433", None)
print(f"El Agente tiene el Nodo Criptográfico Creado")
# Nos quedamos esperando...
while True:
datos_crudos = servidor_ai.recv()
if datos_crudos:
# bytes() transforma el array de números en un texto ASCII
comando = bytes(datos_crudos).decode()
print(f"La IA recibió la instrucción: {comando}")
💡 Para que lo entiendas súper fácil: Piensa que tu programa de IA se sienta en una mecedora a tomar café con la puerta abierta (`servidor_ai.recv()`). No gasta energía de la computadora mientras espera. En el microsegundo en que entra el paquete, salta de la mecedora y trabaja.
3
El Cliente Envía Prompts a la IA
Para que el maestro le mande cosas a la IA, o envíe datos entre tus apps:
from po import PoClient
# El puerto 0 ("0") significa "usa cualquier puerta de salida"
# "127.0.0.1:4433" es la dirección destino de la IA
controlador = PoClient("0", "127.0.0.1:4433")
# En Python las cadenas deben ser Bytes, se usa una 'b' minúscula antes de las comillas.
controlador.send(b"Activar Procedimiento Sylor")
print("Se ha enviado de forma blindada")
controlador.close()
💡 Para que lo entiendas súper fácil: La `b` en `b"Hola"` significa "Binario". Estás tomando la palabra "Hola" y transformándola al instante en lenguaje de Matrix (Ceros y Unos) para que viaje por el Protocolo Orzatty más fácilmente.
1
Installation with Pip
Instead of using slow HTTP APIs (like normal Flask requests) that take forever to serialize JSON, Python will download our pre-generated UniFFI C bindings library to talk directly to The Core System.
pip install protocol-orzatty
💡 Zero Complications: Python is like a wise turtle (easy, but slow for networking). With this `pip install` you just strapped jet engines to the turtle.
2
Receiving Data (Example: An AI Model)
The AI model needs to hibernate but wake up super fast if it receives a command. With the Python SDK, this is done in a couple of lines using Synchronous Python (or Async with threads).
from po import PoClient
# 'None' tells the SDK that it is the Server (will listen)
# "4433" is the server door.
ai_server = PoClient("4433", None)
print(f"The Agent Cryptographic Node is Created")
# We wait...
while True:
raw_data = ai_server.recv()
if raw_data:
# bytes() transforms the array of numbers to ASCII text
command = bytes(raw_data).decode()
print(f"AI received the instruction: {command}")
💡 To make it super easy to understand: Think of your AI program sitting in a rocking chair drinking coffee with the door open (`ai_server.recv()`). It doesn't use computer power while waiting. The microsecond a packet enters, it jumps out of the chair and works.
3
Client Sends Prompts to the AI
For the master to send things to the AI, or send data between your apps:
from po import PoClient
# Port 0 ("0") means "use any exit door available"
# "127.0.0.1:4433" is the destination AI
controller = PoClient("0", "127.0.0.1:4433")
# Put a 'b' before quotes to send as Binary
controller.send(b"Activate Sylor Procedure")
print("Sent safely and armored")
controller.close()
💡 To make it super easy to understand: The `b` in `b"Hello"` means "Binary". You are taking the word "Hello" and instantly transforming it into Matrix language (Zeros and Ones) so it travels via Protocol Orzatty more easily.