Py is a Python library to access the REST API. This library enables you to manage resources such as repositories, user profiles, and organizations in your Python applications.
pip install Py
from import
# Authentication is defined via .Auth
from import Auth
# using an access token
auth = Auth.Token("access_token")
# First create a instance:
# Public Web
g = (auth=auth)
# Enterprise with custom hostname
g = (base_url="https://{hostname}/api/v3", auth=auth)
# Then play with your objects:
for repo in g.get_user().get_repos():
print(repo.name)
# To close connections after use
g.close()
More information can be found on the Py documentation site.
Long-term discussion and bug reports are maintained via Issues. Code review is done via Pull Requests.
For more information read CONTRIBUTING.md.
We're actively seeking maintainers that will triage issues and pull requests and cut releases. If you work on a project that leverages Py and have a vested interest in keeping the code alive and well, send an email to someone in the MAINTAINERS file.