Metadata-Version: 2.4
Name: swarmauri_tool_githubloader
Version: 0.9.0.dev49
Summary: Load YAML-defined components directly from GitHub repositories.
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: swarmauri,sdk,standards,tool,githubloader,tooling
Author: Jacob Stewart
Author-email: jacob@swarmauri.com
Requires-Python: >=3.10,<3.13
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Dist: requests (>=2.32.3)
Requires-Dist: swarmauri_base
Requires-Dist: swarmauri_core
Requires-Dist: swarmauri_standard
Description-Content-Type: text/markdown

![Swarmauri Logo](https://github.com/swarmauri/swarmauri-sdk/blob/3d4d1cfa949399d7019ae9d8f296afba773dfb7f/assets/swarmauri.brand.theme.svg)

<p align="center">
    <a href="https://pypi.org/project/swarmauri_tool_githubloader/">
        <img src="https://img.shields.io/pypi/dm/swarmauri_tool_githubloader" alt="PyPI - Downloads"/></a>
    <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_tool_githubloader/">
        <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_tool_githubloader.svg"/></a>
    <a href="https://pypi.org/project/swarmauri_tool_githubloader/">
        <img src="https://img.shields.io/pypi/pyversions/swarmauri_tool_githubloader" alt="PyPI - Python Version"/></a>
    <a href="https://pypi.org/project/swarmauri_tool_githubloader/">
        <img src="https://img.shields.io/pypi/l/swarmauri_tool_githubloader" alt="PyPI - License"/></a>
    <a href="https://pypi.org/project/swarmauri_tool_githubloader/">
        <img src="https://img.shields.io/pypi/v/swarmauri_tool_githubloader?label=swarmauri_tool_githubloader&color=green" alt="PyPI - swarmauri_tool_githubloader"/></a>
</p>

---

# Swarmauri Tool GithubLoader

Load YAML-defined components directly from GitHub repositories.

## Installation

```bash
pip install swarmauri_tool_githubloader
```

## Usage

```python
from swarmauri_tool_githubloader import GithubLoadedTool

# Load a tool from GitHub
tool = GithubLoadedTool(
    owner="myorg",
    repo="myrepo",
    path="tools/addition.yaml",
)

# Use like any other tool
result = tool(x=1, y=2)
```

### Options

Customize how the loader fetches your component:

- **branch** – Branch to read from (defaults to `"master"`).
- **commit_ref** – Specific commit SHA; overrides `branch` when provided.
- **token** – GitHub token for private repositories.
- **use_cache** – Set to `False` to reload the component on every call.

### Advanced examples

Fetch from a branch and pin a commit:

```python
tool = GithubLoadedTool(
    owner="myorg",
    repo="myrepo",
    path="tools/addition.yaml",
    branch="develop",
    commit_ref="0123456789abcdef",
)
```

Load from a private repository with caching disabled:

```python
import os

tool = GithubLoadedTool(
    owner="myorg",
    repo="private-repo",
    path="tools/addition.yaml",
    token=os.environ["GITHUB_TOKEN"],
    use_cache=False,
)
```

## Want to help?

If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.

