Name | prefect-github JSON |
Version |
0.2.3
JSON |
| download |
home_page | None |
Summary | Prefect integrations interacting with GitHub |
upload_time | 2024-04-25 19:22:18 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | Apache License 2.0 |
keywords |
prefect
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# prefect-github
<p align="center">
<a href="https://pypi.python.org/pypi/prefect-github/" alt="PyPI version">
<img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-github?color=26272B&labelColor=090422"></a>
<a href="https://pepy.tech/badge/prefect-github/" alt="Downloads">
<img src="https://img.shields.io/pypi/dm/prefect-github?color=26272B&labelColor=090422" /></a>
</p>
## Welcome!
Prefect integrations interacting with 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.8 or newer.
We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.
These tasks are designed to work with Prefect 2. For more information about how to use Prefect, please refer to the [Prefect documentation](https://docs.prefect.io/).
### Installation
Install `prefect-github` with `pip`:
```bash
pip install prefect-github
```
Then, register to [view the block](https://docs.prefect.io/ui/blocks/) on Prefect Cloud:
```bash
prefect block register -m prefect_github
```
Note, to use the `load` method on Blocks, you must already have a block document [saved through code](https://orion-docs.prefect.io/concepts/blocks/#saving-blocks) or saved through the UI.
### Write and run a flow
```python
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()
def github_add_star_flow():
github_credentials = GitHubCredentials.load("github-token")
repository_id = query_repository(
"PrefectHQ",
"Prefect",
github_credentials=github_credentials,
return_fields="id"
)["id"]
starrable = add_star_starrable(
repository_id,
github_credentials
)
return starrable
github_add_star_flow()
```
## Resources
If you encounter any bugs while using `prefect-github`, feel free to open an issue in the [prefect-github](https://github.com/PrefectHQ/prefect-github) repository.
If you have any questions or issues while using `prefect-github`, you can find help in the [Prefect Slack community](https://prefect.io/slack).
Feel free to ⭐️ or watch [`prefect-github`](https://github.com/PrefectHQ/prefect-github) for updates too!
## Development
If you'd like to install a version of `prefect-github` for development, clone the repository and perform an editable install with `pip`:
```bash
git clone https://github.com/PrefectHQ/prefect-github.git
cd prefect-github/
pip install -e ".[dev]"
# Install linting pre-commit hooks
pre-commit install
```
Raw data
{
"_id": null,
"home_page": null,
"name": "prefect-github",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "prefect",
"author": null,
"author_email": "\"Prefect Technologies, Inc.\" <help@prefect.io>",
"download_url": "https://files.pythonhosted.org/packages/44/e3/43e276cd41d7c4bb5276366c8163c88b2e716e9615762d8bfac69367277e/prefect_github-0.2.3.tar.gz",
"platform": null,
"description": "# prefect-github\n \n<p align=\"center\">\n <a href=\"https://pypi.python.org/pypi/prefect-github/\" alt=\"PyPI version\">\n <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/prefect-github?color=26272B&labelColor=090422\"></a>\n <a href=\"https://pepy.tech/badge/prefect-github/\" alt=\"Downloads\">\n <img src=\"https://img.shields.io/pypi/dm/prefect-github?color=26272B&labelColor=090422\" /></a>\n</p>\n\n## Welcome!\n\nPrefect integrations interacting with GitHub.\n\nThe tasks within this collection were created by a code generator using the GitHub GraphQL schema.\n\n## Getting Started\n\n### Python setup\n\nRequires an installation of Python 3.8 or newer.\n\nWe recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.\n\nThese tasks are designed to work with Prefect 2. For more information about how to use Prefect, please refer to the [Prefect documentation](https://docs.prefect.io/).\n\n### Installation\n\nInstall `prefect-github` with `pip`:\n\n```bash\npip install prefect-github\n```\n\nThen, register to [view the block](https://docs.prefect.io/ui/blocks/) on Prefect Cloud:\n\n```bash\nprefect block register -m prefect_github\n```\n\nNote, to use the `load` method on Blocks, you must already have a block document [saved through code](https://orion-docs.prefect.io/concepts/blocks/#saving-blocks) or saved through the UI.\n\n### Write and run a flow\n\n```python\nfrom prefect import flow\nfrom prefect_github import GitHubCredentials\nfrom prefect_github.repository import query_repository\nfrom prefect_github.mutations import add_star_starrable\n\n\n@flow()\ndef github_add_star_flow():\n github_credentials = GitHubCredentials.load(\"github-token\")\n repository_id = query_repository(\n \"PrefectHQ\",\n \"Prefect\",\n github_credentials=github_credentials,\n return_fields=\"id\"\n )[\"id\"]\n starrable = add_star_starrable(\n repository_id,\n github_credentials\n )\n return starrable\n\n\ngithub_add_star_flow()\n```\n\n## Resources\n\nIf you encounter any bugs while using `prefect-github`, feel free to open an issue in the [prefect-github](https://github.com/PrefectHQ/prefect-github) repository.\n\nIf you have any questions or issues while using `prefect-github`, you can find help in the [Prefect Slack community](https://prefect.io/slack).\n\nFeel free to \u2b50\ufe0f or watch [`prefect-github`](https://github.com/PrefectHQ/prefect-github) for updates too!\n\n## Development\n\nIf you'd like to install a version of `prefect-github` for development, clone the repository and perform an editable install with `pip`:\n\n```bash\ngit clone https://github.com/PrefectHQ/prefect-github.git\n\ncd prefect-github/\n\npip install -e \".[dev]\"\n\n# Install linting pre-commit hooks\npre-commit install\n```\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Prefect integrations interacting with GitHub",
"version": "0.2.3",
"project_urls": {
"Homepage": "https://github.com/PrefectHQ/prefect/tree/main/src/integrations/prefect-github"
},
"split_keywords": [
"prefect"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "21bbb42cd0fcfb55ff50ddb8568813ede3639f65a89e079db0b6f530321cfefc",
"md5": "278368d42b5839670ca4feb7787253c5",
"sha256": "0b0046905668eae2a3404b88f88167cd7a9a341d34fca9687925d4559e957b95"
},
"downloads": -1,
"filename": "prefect_github-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "278368d42b5839670ca4feb7787253c5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 362621,
"upload_time": "2024-04-25T19:22:15",
"upload_time_iso_8601": "2024-04-25T19:22:15.751547Z",
"url": "https://files.pythonhosted.org/packages/21/bb/b42cd0fcfb55ff50ddb8568813ede3639f65a89e079db0b6f530321cfefc/prefect_github-0.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "44e343e276cd41d7c4bb5276366c8163c88b2e716e9615762d8bfac69367277e",
"md5": "6e58e9f136d5fba379236aa6f0ca145a",
"sha256": "eda38954dc87bcf8cd79634a0e05bd285fb5d6e69d7f252b97ab4c35ac7e9ec3"
},
"downloads": -1,
"filename": "prefect_github-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "6e58e9f136d5fba379236aa6f0ca145a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 333411,
"upload_time": "2024-04-25T19:22:18",
"upload_time_iso_8601": "2024-04-25T19:22:18.026634Z",
"url": "https://files.pythonhosted.org/packages/44/e3/43e276cd41d7c4bb5276366c8163c88b2e716e9615762d8bfac69367277e/prefect_github-0.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-25 19:22:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PrefectHQ",
"github_project": "prefect",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"circle": true,
"requirements": [],
"lcname": "prefect-github"
}