Skip to main content

A comprehensive Python library for controlling FlashForge 3D printers

Project description

🖨️ FlashForge Python API

A comprehensive Python library for controlling FlashForge 3D printers.

✨ Features

  • 🎮 Full Printer Control: Movement, temperature, speed, LED, filtration, camera control
  • 📋 Job Management: Start, pause, resume, cancel prints, file upload and management
  • 📊 Real-time Monitoring: Live status, temperature, progress, and machine state tracking
  • 🔍 Network Discovery: Automatic printer discovery via UDP broadcast
  • 🔄 Dual Communication: HTTP API (modern) + TCP G-code (legacy) support
  • 🛡️ Type Safety: Full type hints and Pydantic models for robust development
  • ⚡ Async Support: Native async/await support for all operations
  • 🖼️ Advanced Features: Thumbnail extraction, endstop monitoring, print progress tracking

🚀 Quick Start

💡 The "new" HTTP API requires LAN-mode, and a check code for authentication. This video shows how to set up LAN-mode, and get the code.

from flashforge import FlashForgeClient, FlashForgePrinterDiscovery

# Find printers on the network
discovery = FlashForgePrinterDiscovery()
printers = await discovery.discover_printers_async()

# Connect to your printer
client = FlashForgeClient(
    host="192.168.1.100",  # Your printer's IP
    serial="ABCD1234",     # Your printer's serial
    check_code="12345678"  # Your printer's check code
)

# Basic operations
await client.info.get_machine_status()  # Get printer status
await client.temp_control.set_bed_temp(60)  # Set bed temperature
await client.control.home_xyz()  # Home all axes

📦 Installation & Setup

# Clone the repository
git clone https://github.com/your-username/flashforge-python-api.git
cd flashforge-python-api

# Setup & Install
uv sync                    # Install core dependencies
uv sync --all-extras      # Install with all optional dependencies

🔧 Requirements

  • 🐍 Python: 3.8+ (recommended: 3.11+)
  • 🖨️ Printer: FlashForge with network connectivity
  • 🌐 Network: Printer and computer on same network for discovery
  • 🔑 Credentials: Printer serial number and check code

🎯 Supported Models

✅ Tested with:

  • FlashForge Adventurer 5M Series
  • FlashForge Adventurer 4

💫 Should work with:

  • FlashForge printers with network connectivity
  • Printers supporting HTTP API (new) and/or TCP G-code (legacy)

💡 Note: Some features (camera control, filtration) are model-specific and will be automatically detected.

🌟 Related Projects

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

flashforge_python_api-1.0.0.tar.gz (79.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flashforge_python_api-1.0.0-py3-none-any.whl (64.8 kB view details)

Uploaded Python 3

File details

Details for the file flashforge_python_api-1.0.0.tar.gz.

File metadata

File hashes

Hashes for flashforge_python_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 33c8138e07d8ecd722862ebacb97b1595d01bbc49a2e4e825875bd3c612dfebc
MD5 f307c0f1df3bc10e22951c64258c8bf7
BLAKE2b-256 f6ed51d4f32252e64dc86528fd61a8be2ce5f5b528d16a476e9e7d0fb3bf2f07

See more details on using hashes here.

File details

Details for the file flashforge_python_api-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flashforge_python_api-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53f5bd6455a42ac431ce79fbaeb5c43c9709ceb3c5b65b55c52564d754111a4e
MD5 0ca0906a28b5e2e5ae1b226abe0a915f
BLAKE2b-256 38ba2cb5b6505784f3aa8c2133d21da5f4515f487e86db29598f87884651a1d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page