Metadata-Version: 2.4
Name: luma-skill-hub-client
Version: 0.1.1
Summary: Python client for a self-hosted Luma Skill Hub registry
License-Expression: Apache-2.0
Project-URL: Repository, https://github.com/Songhonglei/luma-skill
Project-URL: Documentation, https://github.com/Songhonglei/luma-skill/blob/main/skill-hub/README.md
Project-URL: Issues, https://github.com/Songhonglei/luma-skill/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests<3,>=2.32.5
Dynamic: license-file

# Luma Skill Hub Python client

A small Python client for a running [Luma Skill Hub registry](https://github.com/Songhonglei/luma-skill/blob/main/skill-hub/README.md). It can search, inspect, resolve, download and submit skill packages. The registry server and Web UI are deployed separately with Docker Compose.

## Install

Use Python 3.10 or later. Install from [PyPI](https://pypi.org/project/luma-skill-hub-client/).

```sh
python3 -m pip install --upgrade luma-skill-hub-client
```

To try the current source, run `python3 -m pip install .` from the `skill-hub/examples/python` directory. For either installation, configure your registry:

```sh
export SKILLHUB_URL=https://skills.example.com
```

Point `SKILLHUB_URL` to your instance and set `SKILLHUB_TOKEN` for authenticated calls. The client uses the environment token only for the configured URL, including its path prefix. For another instance, pass its own `base_url` and `token` to `SkillHubClient`. Create tokens in the console with the capabilities your task requires.

```python
from skillhub_client import SkillHubClient

client = SkillHubClient()
results = client.search(keyword="notes", size=5)
match = results["items"][0]
version = client.resolve(match["namespace"], match["slug"])["version"]
package = client.download(match["namespace"], match["slug"], version=version)
```

Use `client.publish("./my-skill.zip", "global")` with an authorized `skill:submit` token. The result describes the submitted version and its status. Follow the registry's scan and review progress until the version is available. The [example script in the repository](https://github.com/Songhonglei/luma-skill/blob/main/skill-hub/examples/python/example_usage.py) demonstrates both operations.

## Prepare a PyPI release

The distribution is `luma-skill-hub-client` and the import is `skillhub_client`. For a future release, build and validate a source distribution and wheel from this directory.

```sh
python3 -m pip install build twine
python3 -m build
python3 -m twine check --strict dist/*
```

Install the wheel in a fresh virtual environment and repeat the read workflow against a test registry. Before uploading a new version, use a dedicated publisher for this distribution. Configure TestPyPI separately if using it to rehearse the upload. [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/)

The client derives from the upstream Python example documented in the [source attribution](https://github.com/Songhonglei/luma-skill/blob/main/skill-hub/UPSTREAM.md). Its Apache-2.0 license is included in the source distribution and wheel.
