Asynchronous Python client for the GitHub API
Project description
AIOGitHubAPI
Asynchronous Python client for the GitHub API
This is not a full client for the API (Have you seen it, it's huge), and will probably never be. Things are added when needed.
Install
python3 -m pip install -U aiogithubapi
Example
"""Example usage of AIOGitHubAPI"""
import asyncio
from aiogithubapi import GitHub
async def example():
"""Example usage of AIOGitHubAPI."""
async with GitHub() as github:
repository = await github.get_repo("ludeeus/aiogithubapi")
print("Repository description:", repository.full_name)
print("Repository description:", repository.description)
asyncio.get_event_loop().run_until_complete(example())
Add Data Objects
Currently this will only work properly on single GET responses, if the sample response is a list, just use the first dict in the list
- Find the response you want from https://docs.github.com/en/rest/reference
- Find the URL directly to the correct section (like https://docs.github.com/en/rest/reference/issues#get-a-label)
- Expand the "Default response" section, and copy the contents to
generate/input.json
- Run
python generate/genreate.py && black .
- You will be asked for the URL, laste the link you found in step 2.
- You will be asked for the main class name, use something that make sense.
Examples:
issues#get-a-label
Would beIssuesLabel
projects#get-a-project-card
Would beProjectCard
pulls#get-a-pull-request
Would bePullRequest
repos#get-a-branch
Would beReposBranch
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
aiogithubapi-1.1.1.tar.gz
(15.4 kB
view hashes)
Built Distribution
Close
Hashes for aiogithubapi-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbcb74876bde41d81a49758c00bb50cd95973ad80f17f24247a03717306b96bf |
|
MD5 | 6e456d77a8ca77a369ee8c69741df2c2 |
|
BLAKE2b-256 | b02d2429f3717cb55f920ac901450d7ab1f5f495342f458d20ad9516b78d8f74 |