Metadata-Version: 2.4
Name: flashforge-python-api
Version: 1.0.0
Summary: A comprehensive Python library for controlling FlashForge 3D printers
Project-URL: Homepage, https://github.com/GhostTypes/ff-5mp-api-py
Project-URL: Documentation, https://github.com/GhostTypes/ff-5mp-api-py#readme
Project-URL: Repository, https://github.com/GhostTypes/ff-5mp-api-py.git
Project-URL: Issues, https://github.com/GhostTypes/ff-5mp-api-py/issues
Author-email: GhostTypes <notghosttypes@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: 3d-printer,api,async,control,flashforge,python
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Requires-Python: >=3.8
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: netifaces>=0.11.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: requests>=2.31.0
Provides-Extra: all
Requires-Dist: black>=23.0.0; extra == 'all'
Requires-Dist: mypy>=1.0.0; extra == 'all'
Requires-Dist: pillow>=10.0.0; extra == 'all'
Requires-Dist: pre-commit>=3.0.0; extra == 'all'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'all'
Requires-Dist: pytest-cov>=4.0.0; extra == 'all'
Requires-Dist: pytest>=7.0.0; extra == 'all'
Requires-Dist: ruff>=0.1.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: imaging
Requires-Dist: pillow>=10.0.0; extra == 'imaging'
Description-Content-Type: text/markdown

# 🖨️ 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](https://www.youtube.com/watch?v=krdEGccZuKo) video shows how to set up LAN-mode, and get the code.

```python
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

```bash
# 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
- **💻 C# API (Windows)**: [ff-5mp-api](https://github.com/GhostTypes/ff-5mp-api)
- **🌐 TypeScript API (Cross-Platform)**: [ff-5mp-api-ts](https://github.com/GhostTypes/ff-5mp-api-ts)
- **🎨 FlashForgeUI (Electron, Cross-Platform)**: [FlashForgeUI-Electron](https://github.com/Parallel-7/FlashForgeUI-Electron)

