Prefect tasks and subflows for GitHub.
Project description
prefect-github
Welcome!
Prefect tasks and subflows for GitHub.
The tasks within this collection were created by a code generator using the GitHub GraphQL schema.
Getting Started
Python setup
Requires an installation of Python 3.7+.
We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.
These tasks are designed to work with Prefect 2.0. For more information about how to use Prefect, please refer to the Prefect documentation.
Installation
Install prefect-github
with pip
:
pip install prefect-github
Write and run a flow
from prefect import flow
from prefect_github import GitHubCredentials
from prefect_github.repository import query_repository
from prefect_github.mutations import add_star_starrable
@flow()
async def github_add_star_flow():
github_credentials = GitHubCredentials(token)
repository_id_future = await query_repository(
"PrefectHQ",
"Prefect",
github_credentials=github_credentials,
return_fields="id"
)
repository_id = (await repository_id_future.result())["id"]
starrable = await add_star_starrable(
repository_id,
github_credentials
)
return starrable
await github_add_star_flow()
Resources
If you encounter any bugs while using prefect-github
, feel free to open an issue in the prefect-github repository.
If you have any questions or issues while using prefect-github
, you can find help in either the Prefect Discourse forum or the Prefect Slack community.
Development
If you'd like to install a version of prefect-github
for development, clone the repository and perform an editable install with pip
:
git clone https://github.com/PrefectHQ/prefect-github.git
cd prefect-github/
pip install -e ".[dev]"
# Install linting pre-commit hooks
pre-commit install
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
Built Distribution
Hashes for prefect_github-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b236d1ce3e2d5ccdf4914120c08f84a641ce3c27737630e94a7c7f07713ee244 |
|
MD5 | 689de6747731049d90ddeebc5b156fb1 |
|
BLAKE2b-256 | 1c975678bb57126e24965262b2099261cfef7bbe93ffa8220f8ef5028ad10d39 |