Metadata-Version: 2.5
Name: dikolab-horde-plugin-python
Version: 0.0.2
Summary: The default horde plugin — scaffolds, lints, tests, builds, and publishes Python packages.
Project-URL: Homepage, https://diko316.gitlab.io/dikolab-horde/
Project-URL: Documentation, https://diko316.gitlab.io/dikolab-horde/
Project-URL: Funding, https://paypal.me/dikolab
Author-email: Diko TechSlave <diko316@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: build,horde,monorepo,packaging,plugin,uv
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Build Tools
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: dikolab-horde-common>=0.0.2
Requires-Dist: dikolab-horde-sdk>=0.0.2
Description-Content-Type: text/markdown

<img src="https://diko316.gitlab.io/dikolab-horde/assets/horde-logo.png" alt="horde" width="140">

# dikolab-horde-plugin-python

**The horde plugin for Python packages in a uv workspace** — scaffolding,
linting, testing, building and publishing them.

You do not normally install it yourself. `horde use python` puts it in the
workspace venv and registers it in `horde.toml`, and a plugin missing from
`horde.toml` is invisible to horde however it got there. It is not a library you
import: it ships a console script horde spawns as a worker and drives over
JSON-RPC.

> **Status: alpha.** `0.0.2` implements all ten commands and is exercised end to
> end against a real horde. The interfaces may still move.

## Prerequisites

- Python 3.11 or newer, and [horde](https://pypi.org/project/dikolab-horde/)
- `uv`, `ruff`, `mypy` and `pytest` on your `PATH`

All four are checked by `horde use python`, which refuses if any is missing.
Horde never installs a toolchain.

## Getting started

```sh
horde use python
```

```
installed python
registered [plugin.python] in horde.toml
```

Set the workspace root up once, then make a package:

```sh
horde python configure
horde python create toolkit --type lib --publishable
```

```
created lib toolkit in python/toolkit
```

```
python/toolkit/
├── horde-package.toml     horde's file — name, handler, depends_on
├── pyproject.toml
├── src/toolkit_shared/    classes/ constants/ functions/ types/
├── tests/
└── docs/release-notes/0.1.0.md
```

Then build and check it:

```sh
horde python build toolkit
horde python lint toolkit
```

```
built toolkit into dist/wheels/toolkit
ruff, mypy passed
```

## Commands

The ten horde routes. Leave the package name off and the command applies to
every Python package in the workspace.

| Command | Runs | Example |
|---|---|---|
| `configure` | writes the uv workspace root and `.python-version` | `horde python configure` |
| `create` | scaffolds a package | `horde python create api --type app` |
| `list` | this plugin's packages | `horde python list` |
| `bump` | raises the version | `horde python bump toolkit --minor` |
| `lint` | `ruff check`, then `mypy` | `horde python lint toolkit` |
| `test` | `pytest` | `horde python test` |
| `build` | a wheel into `dist/wheels/` | `horde python build toolkit` |
| `run` | the package's entry point | `horde python run api` |
| `publish` | uploads to PyPI — **only with `-y`** | `horde python publish toolkit -y` |
| `delete` | removes a package | `horde python delete toolkit` |

`lint` stops at the first failing tool rather than running both and reporting
twice. `build` resolves dependencies first, so a package that depends on a Rust
crate builds the crate too.

`publish` uploads nothing without `-y`; in a non-interactive run the dry form
exits `3`, which means *checked, deliberately did nothing*.

**Package layout, the uv workspace, and publishing in detail:**
https://diko316.gitlab.io/dikolab-horde/dikolab-horde-plugin-python/manual/

## Documentation

- [Manual](https://diko316.gitlab.io/dikolab-horde/dikolab-horde-plugin-python/manual/) — getting started, commands, package layout
- [The Python plugin](https://diko316.gitlab.io/dikolab-horde/plugins/python/) — what it manages, and how
- [Release notes](https://diko316.gitlab.io/dikolab-horde/dikolab-horde-plugin-python/release-notes/)
- [Writing your own plugin](https://diko316.gitlab.io/dikolab-horde/authoring/)

## Support

If horde saves you time, you can support its development:
https://paypal.me/dikolab

---

© 2025–2026 dikolab. Released under the MIT License.
