Metadata-Version: 2.3
Name: mflux-web
Version: 0.0.1a1
Summary: Web integration for mflux with a standalone Python API
Author: Anthony Wu
Author-email: Anthony Wu <462072+anthonywu@users.noreply.github.com>
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 :: 3.15
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# mflux-web

Install (once published):

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

Both entry points resolve to the same module object:

```python
import mflux.web
import mflux_web

assert mflux.web is mflux_web
```

`mflux_web` owns the implementation and works without installing or importing
`mflux`. Importing `mflux.web` registers it as an alias of `mflux_web`, sharing
all public symbols and module state. Either import order works, and the greeting
prints once per process. Submodules are not automatically aliased; use
`mflux.web.<plugin>` for third-party plugins. 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.
The `mflux.web` alias adds plugin directories discovered by `pkgutil.extend_path`
to the shared package 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.0.1a1"]

[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.11–3.15.

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