Skip to main content

toybox-api — Python Client for ToyBox 3D Printers

Async Python client for ToyBox 3D printers via the make.toys Meteor DDP protocol.

Used by the Home Assistant integration.

Features

  • Meteor DDP WebSocket client (no REST — make.toys is DDP-only)
  • Authentication via Meteor accounts
  • Real-time printer state via DDP subscriptions (printerStates collection)
  • Print job tracking via toyPrints collection
  • Time remaining / elapsed / progress calculations matching make.toys web app logic

Installation

pip install toybox-api

Usage

import asyncio
from toybox_api import ToyBoxClient

async def main():
    async with ToyBoxClient() as client:
        await client.connect()
        await client.authenticate("email@example.com", "password")
        await client.subscribe_to_printer_data(["printer_id"])

        data = await client.get_all_data()
        print(f"Printer: {data.printer.display_name}")
        print(f"Online: {data.printer.is_online}")
        print(f"State: {data.print_state}")

        if data.current_request:
            print(f"Printing: {data.current_request.print_name}")
            print(f"Remaining: {data.current_request.remaining_seconds}s")

asyncio.run(main())

Data Model

Class Source Description
PrinterStatus printerStates collection Online state, model, hardware ID, firmware
PrintRequest toyPrints collection Active/completed prints with timing data
ToyBoxData Coordinator container Combines printer + current/last print request

Status

🟡 Beta — Implements real Meteor DDP protocol. Needs live testing with active prints.

Project Structure

ha-toybox/
├── toybox_api/
│   ├── __init__.py
│   ├── client.py        # DDP WebSocket client
│   ├── models.py        # PrinterStatus, PrintRequest, ToyBoxData
│   ├── exceptions.py    # ToyBoxError hierarchy
│   └── const.py         # DDP URLs, subscription/method names
├── pyproject.toml
├── LICENSE
└── README.md

License

MIT

Metadata

Release files for toybox-3d-api 0.2.1

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

Source distribution (sdist)

Source distribution for toybox-3d-api 0.2.1
File Size Uploaded Provenance
toybox_3d_api-0.2.1.tar.gz 16.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for toybox-3d-api 0.2.1
File Interpreter ABI Platform
toybox_3d_api-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.2 kB

Release files / toybox_3d_api-0.2.1.tar.gz

Download URL toybox_3d_api-0.2.1.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ea316c09110e88e40986a51f417048c7ebc31b0de7986ac4c4a006c649aa67af
BLAKE2b-256 checksum
How to use checksums
d00f10b7ac010fece467adf761aef925dc8d762eec04cedf4d71526a5f081fd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / toybox_3d_api-0.2.1-py3-none-any.whl

Download URL toybox_3d_api-0.2.1-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13d6b2c66b5c7aa05cd520283f245292ed95f7615ef37c3ab46519a54c368b18
BLAKE2b-256 checksum
How to use checksums
d778a577d4ead974faccefb907db77831ff5cf6bb852d4d7e9feb09bb5232ffd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for toybox-3d-api 0.2.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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