Metadata-Version: 2.4
Name: pyhulax
Version: 0.1.3
Summary: Python API for controlling HG-Fly F09-lite drones via MAVLink
Project-URL: Documentation, https://pyhulax.xenops.ae
Project-URL: Homepage, https://github.com/XENOPSAE/pyhulax
Project-URL: Issues, https://github.com/XENOPSAE/pyhulax/issues
Project-URL: Repository, https://github.com/XENOPSAE/pyhulax
Keywords: drone,hg-fly,hula,mavlink,robotics,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: numpy>=2.0
Requires-Dist: psutil
Requires-Dist: pydantic>=2.0
Requires-Dist: pymavlink
Requires-Dist: pyserial
Requires-Dist: requests
Provides-Extra: all
Requires-Dist: asyncpg>=0.29.0; extra == 'all'
Requires-Dist: av==15.1.0; extra == 'all'
Requires-Dist: flask; extra == 'all'
Requires-Dist: onnxruntime; extra == 'all'
Requires-Dist: opencv-python; extra == 'all'
Provides-Extra: db
Requires-Dist: asyncpg>=0.29.0; extra == 'db'
Provides-Extra: video
Requires-Dist: av==15.1.0; extra == 'video'
Requires-Dist: opencv-python; extra == 'video'
Provides-Extra: vision
Requires-Dist: onnxruntime; extra == 'vision'
Requires-Dist: opencv-python; extra == 'vision'
Provides-Extra: web
Requires-Dist: flask; extra == 'web'
Description-Content-Type: text/markdown

# pyhulax

Python API for controlling the HG-Fly F09-lite / Hula drone over MAVLink.

This branch packages the drone SDK only:

- `pyhulax` public API package
- `pyhulax.core`, `pyhulax.fylo`, `pyhulax.system`, `pyhulax.control`, `pyhulax.logging`
- optional video, vision, web, and database extras

It does not publish the maze solver, dashboard, CLI, or competition assets.

## Install

Base API only:

```bash
pip install pyhulax
```

With optional extras:

```bash
pip install "pyhulax[video]"
pip install "pyhulax[vision]"
pip install "pyhulax[web]"
pip install "pyhulax[db]"
pip install "pyhulax[all]"
```

## Quick Start

```python
from pyhulax import DroneAPI
from pyhulax.core import Direction

with DroneAPI() as drone:
    drone.connect("192.168.100.1")
    drone.takeoff()
    drone.move(Direction.FORWARD, 100)
    battery = drone.get_battery()
    print(f"Battery: {battery}%")
    drone.land()
```

Configured defaults:

```python
from pyhulax import DroneAPI, DroneConfig, MediaConfig, NetworkConfig

config = DroneConfig(
    network=NetworkConfig(
        drone_ip="192.168.100.1",
        tcp_port=8888,
        web_port=5000,
    ),
    media=MediaConfig(
        base_dir="media",
        photo_dir="photos",
    ),
)

drone = DroneAPI(config=config)
drone.connect()  # uses config.network.drone_ip by default
```

The SDK’s default settings are loaded from packaged files in
`pyhulax/config/*.json`. Passing `DroneConfig(...)` only overrides the keys
you explicitly set.

Full SDK docs live in [docs/sdk/README.md](docs/sdk/README.md).
Auto-generated API reference is configured with MkDocs + mkdocstrings in [mkdocs.yml](mkdocs.yml).

## Optional Features

- `video`: RTP decoding, OpenCV display, recording helpers
- `vision`: ONNX-based detection helpers
- `web`: browser streaming helpers
- `db`: async PostgreSQL flight logging

The core API imports cleanly without these extras installed.

## Public API Areas

- connection lifecycle
- takeoff, landing, movement, rotation
- telemetry and obstacle sensing
- manual control
- media listing, download, and delete
- optional video streaming
- optional structured logging

## Local Verification

Run tests from the project venv:

```bash
.venv/bin/python -m pytest -q
```

Build the wheel:

```bash
uv build --wheel
```
