Metadata-Version: 2.4
Name: skillplus
Version: 0.1.0
Summary: Official Python SDK for SkillPlus
Project-URL: Homepage, https://skillplus.xyz
Project-URL: Documentation, https://docs.skillplus.xyz
Author: SkillPlus
License: MIT
License-File: LICENSE
Keywords: ai,sdk,security,skillplus
Requires-Python: >=3.10
Requires-Dist: httpx>=0.28
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: respx>=0.22; extra == 'dev'
Description-Content-Type: text/markdown

# SkillPlus Python SDK

Official Python SDK for the hosted SkillPlus API.

SkillPlus provides security intelligence for AI skills and agent-facing software, helping developers, teams, and platforms scan, understand, and trust AI skills before installation, approval, or integration.

## Install

```bash
pip install skillplus
```

## Basic usage

```python
from skillplus import SkillPlus

client = SkillPlus(api_key="skp_...")

result = client.query("https://github.com/owner/repo")

if result.status == "found" and result.report:
    print(result.report.rating)  # "safe" | "medium" | "high"
```

### Advanced options

For repositories containing many skills, or to queue a scan automatically when
no report exists yet:

```python
result = client.query(
    "https://github.com/owner/repo",
    skill_path="skills/example",   # pick one skill in a multi-skill repo
    scan_if_missing=True,          # queue a scan if no report exists
)
```

The SDK talks to the official SkillPlus service at `https://skillplus.xyz`.

## Context manager

```python
from skillplus import SkillPlus

with SkillPlus(api_key="skp_...") as client:
    result = client.scan(
        "https://github.com/owner/repo",
        skill_path="skills/example",
    )
    print(result.status)
```

## Methods

| Method | Use case |
|---|---|
| `query(...)` | Check whether SkillPlus already has a report for a skill. |
| `scan(...)` | Request a scan when a report is missing or when a fresh check is needed. |
| `get_report(scan_id)` | Retrieve structured report data for dashboards, registries, or automation. |
| `get_badge(scan_id)` | Fetch the badge SVG for embedding. |
| `get_badge_url(scan_id)` | Generate a badge URL for READMEs, marketplaces, or internal portals. |

## Error handling

```python
from skillplus import SkillPlus, SkillPlusError

client = SkillPlus(api_key="skp_...")

try:
    result = client.query("https://github.com/owner/repo")
except SkillPlusError as error:
    print(error.status_code)
    print(error.message)
```

## Development

```bash
uv sync --extra dev
uv run pytest
uv run python -m build
```
