Metadata-Version: 2.4
Name: luma-skill-hub-client
Version: 0.1.0
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 from source

From the `skill-hub/examples/python` directory, use Python 3.10 or later.

```sh
python3 -m pip install .
export SKILLHUB_URL=https://skills.example.com
```

Point `SKILLHUB_URL` to your actual instance. Set `SKILLHUB_TOKEN` for authenticated calls. Create tokens from the console and select the capabilities required for your task.

```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 candidate is `luma-skill-hub-client`. The import remains `skillhub_client`. 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 a first upload, confirm control of the distribution name and configure a dedicated publisher. 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.
