INNER CODE UNIT · Python

send

Far-Se/tabame · plugins/api-client/main.py:40

def send(frame):
    sys.stdout.write(json.dumps(frame) + "\n")
    sys.stdout.flush()


def cmd(**kwargs):
    kwargs["type"] = "command"
    send(kwargs)


def log(*a):
    print(*a, file=sys.stderr, flush=True)


def new_id(prefix="id"):
    return f"{prefix}_{uuid.uuid4().hex[:8]}"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…