Metadata-Version: 2.3
Name: mflux-web
Version: 0.1.0
Summary: Web integration for mflux with a standalone Python API
Author: Anthony Wu
Author-email: Anthony Wu <462072+anthonywu@users.noreply.github.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# mflux-web

Install (once published):

```sh
pip install mflux-web
```

Both entry points expose the same public API:

```python
import mflux.web
import mflux_web

assert mflux.web.__version__ == mflux_web.__version__
```

`mflux_web` owns the implementation and works without installing or importing
`mflux`. `mflux.web` is a thin facade; explicitly re-export new public symbols
there as the API grows. The two packages are not identical module objects, and
submodules are not automatically aliased. This initial scaffold has no web server
or application API yet.

## Namespace ownership

This distribution owns `mflux/web/__init__.py` and `mflux_web/`. It deliberately
does **not** ship `mflux/__init__.py` or require the inference distribution.
`mflux.web` uses `pkgutil.extend_path` so other distributions can contribute
subpackages even from separate import paths.

A plugin distribution can ship:

```text
src/
└── mflux/
    └── web/
        └── anythingelse/
            └── __init__.py
```

With this uv build configuration:

```toml
[project]
name = "mflux-web-anythingelse"
version = "0.1.0"
dependencies = ["mflux-web>=0.1.0"]

[build-system]
requires = ["uv_build>=0.12.15,<0.13.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = "mflux.web.anythingelse"
```

Consumers can then use `import mflux.web.anythingelse`. Plugins must not ship
`mflux/__init__.py` or `mflux/web/__init__.py`; each owns a unique child name.

## Integration with the mflux parent

The existing mflux project has a regular `mflux/__init__.py`. Normal wheel
installations into the same site-packages directory coexist with this package.
For separate editable installs or other split-path layouts, add this to the
**mflux project's** existing `src/mflux/__init__.py`, retaining its current setup:

```python
from pkgutil import extend_path

__path__ = extend_path(__path__, __name__)
```

Without that parent change, an installed regular mflux package can hide an
editable mflux-web checkout. Setting `namespace = true` in build configuration
does not change Python's runtime import behavior. This repository does not
modify or replace the parent initializer.

## Development

Use uv-managed Python 3.14 for development; the library supports Python 3.10+.

```sh
uv sync
uv build
uv run python -m unittest discover -s tests -v
```

The tests build the distributions in a temporary directory and check their
contents and imports in isolated subprocesses, including third-party namespace
contributions and regular-parent coexistence.
