Minimal Python client for GitHub API.
Project description
gh_util
A minimal Python library for interacting with GitHub's API, using httpx
and Pydantic
.
Usage
from gh_util.functions import fetch_github_issue
async def main():
issue = await fetch_github_issue("prefecthq", "marvin", 723, include_comments=True)
print(f"[{issue.number} {issue.title}]({issue.url})")
print(issue.body)
for comment in issue.user_comments:
print(f"[{comment.user.login}]({comment.user.url}) said:")
print(f"{comment.body}")
if __name__ == "__main__":
import asyncio
asyncio.run(main())
Installation
pip install gh_util
Development
git clone https://github.com/zzstoatzz/gh.git
cd gh
python -m venv gh_util
source gh_util/bin/activate
pip install -e .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gh_util-0.1.0a3.tar.gz
(7.0 kB
view hashes)
Built Distribution
Close
Hashes for gh_util-0.1.0a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17ced8ce09e5c0d957f4085b24588e7593799e3528f71a132554d5e9aad32940 |
|
MD5 | 21f44de21fe63b75239128f635d04f97 |
|
BLAKE2b-256 | d3c007bf95d3e0e0dfdfd7751fd6fa9fe3db0ef04e8a4eaa64ae404ff822c206 |