Metadata-Version: 2.4
Name: pyhulaX
Version: 0.1.0
Summary: Python API for controlling HG-Fly F09-lite drones via MAVLink
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pymavlink
Requires-Dist: numpy>=2.0
Requires-Dist: psutil
Requires-Dist: pyserial
Requires-Dist: pydantic>=2.0
Requires-Dist: requests
Provides-Extra: db
Requires-Dist: asyncpg>=0.29.0; extra == "db"
Provides-Extra: video
Requires-Dist: opencv-python; extra == "video"
Requires-Dist: av==15.1.0; extra == "video"
Provides-Extra: vision
Requires-Dist: opencv-python; extra == "vision"
Requires-Dist: onnxruntime; extra == "vision"
Provides-Extra: web
Requires-Dist: flask; extra == "web"
Provides-Extra: all
Requires-Dist: asyncpg>=0.29.0; extra == "all"
Requires-Dist: opencv-python; extra == "all"
Requires-Dist: av==15.1.0; extra == "all"
Requires-Dist: onnxruntime; extra == "all"
Requires-Dist: flask; extra == "all"

# pyhulaX

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

This branch packages the drone SDK only:

- `droneapi` public API package
- `pypack.core`, `pypack.fylo`, `pypack.system`, `pypack.control`, `pypack.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 droneapi import DroneAPI
from pypack.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 droneapi 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
`pypack/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
```
