---
title: GitHub
icon: github
description: Set up the GitHub resource in Python.
---

## Dependencies

No additional dependencies - uses `aiohttp` (included).

For credential setup, see the [GitHub Setup](/home/setup/github) guide.

## Configuration

```python
import os
from mirage import Workspace, MountMode
from mirage.resource.github import GitHubConfig, GitHubResource

config = GitHubConfig(token=os.environ["GITHUB_TOKEN"])
resource = GitHubResource(
    config=config, owner="my-org", repo="my-repo", ref="main")
ws = Workspace({"/github": resource}, mode=MountMode.READ)
```

## Config Reference

| Field   | Required | Description                  |
| ------- | -------- | ---------------------------- |
| `token` | Yes      | GitHub Personal Access Token |
