# prefect-spark-on-k8s-operator
<p align="center">
<!--- Insert a cover image here -->
<!--- <br> -->
<a href="https://pypi.python.org/pypi/prefect-spark-on-k8s-operator/" alt="PyPI version">
<img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-spark-on-k8s-operator?color=0052FF&labelColor=090422"></a>
<a href="https://github.com/tardunge/prefect-spark-on-k8s-operator/" alt="Stars">
<img src="https://img.shields.io/github/stars/tardunge/prefect-spark-on-k8s-operator?color=0052FF&labelColor=090422" /></a>
<a href="https://pypistats.org/packages/prefect-spark-on-k8s-operator/" alt="Downloads">
<img src="https://img.shields.io/pypi/dm/prefect-spark-on-k8s-operator?color=0052FF&labelColor=090422" /></a>
<a href="https://github.com/tardunge/prefect-spark-on-k8s-operator/pulse" alt="Activity">
<img src="https://img.shields.io/github/commit-activity/m/tardunge/prefect-spark-on-k8s-operator?color=0052FF&labelColor=090422" /></a>
<br>
<a href="https://prefect-community.slack.com" alt="Slack">
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack" /></a>
<a href="https://discourse.prefect.io/" alt="Discourse">
<img src="https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse" /></a>
</p>
Visit the full docs [here](https://tardunge.github.io/prefect-spark-on-k8s-operator) to see additional examples and the API reference.
Prefect integrations for orchestrating and monitoring apache spark jobs on kubernetes using spark-on-k8s-operator.
## Welcome!
`prefect-spark-on-k8s-operator` is a collection of Prefect flows enabling orchestration, observation and management of `SparkApplication` custom kubernetes resources defined according to spark-on-k8s-operator CRD v1Beta2 API Spec.
Jump to [examples](#example-usage).
## Resources
For more tips on how to use tasks and flows in a Collection, check out [Using Collections](https://docs.prefect.io/collections/usage/)!
### Installation
You need to configure the kubernetes credentials as per `prefect-kubernetes` documentation.<br />
Install `prefect-spark-on-k8s-operator` with `pip`:
```bash
pip install prefect-spark-on-k8s-operator
```
Requires an installation of Python 3.7+.
We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.
These flows are designed to work with Prefect 2.0. For more information about how to use Prefect, please refer to the [Prefect documentation](https://docs.prefect.io/).
### Example Usage
#### Specify and run a SparkApplication from a yaml file
```python
import asyncio
from prefect_kubernetes.credentials import KubernetesCredentials
from prefect_spark_on_k8s_operator import (
SparkApplication,
run_spark_application, # this is a flow
)
app = SparkApplication.from_yaml_file(
credentials=KubernetesCredentials.load("k8s-creds"),
manifest_path="path/to/spark_application.yaml",
)
if __name__ == "__main__":
# run the flow
asyncio.run(run_spark_application(app))
```
## Feedback
If you encounter any bugs while using `prefect-spark-on-k8s-operator`, feel free to open an issue in the [prefect-spark-on-k8s-operator](https://github.com/tardunge/prefect-spark-on-k8s-operator) repository.
If you have any questions or issues while using `prefect-spark-on-k8s-operator`, you can find help in either the [Prefect Discourse forum](https://discourse.prefect.io/) or the [Prefect Slack community](https://prefect.io/slack).
Feel free to star or watch [`prefect-spark-on-k8s-operator`](https://github.com/tardunge/prefect-spark-on-k8s-operator) for updates too!
## Contributing
If you'd like to help contribute to fix an issue or add a feature to `prefect-spark-on-k8s-operator`, please [propose changes through a pull request from a fork of the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).
Here are the steps:
1. [Fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository)
2. [Clone the forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository)
3. Install the repository and its dependencies:
```
pip install -e ".[dev]"
```
4. Make desired changes
5. Add tests
6. Insert an entry to [CHANGELOG.md](https://github.com/tardunge/prefect-spark-on-k8s-operator/blob/main/CHANGELOG.md)
7. Install `pre-commit` to perform quality checks prior to commit:
```
pre-commit install
```
8. `git commit`, `git push`, and create a pull request
Raw data
{
"_id": null,
"home_page": "https://github.com/tardunge/prefect-spark-on-k8s-operator",
"name": "prefect-spark-on-k8s-operator",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "prefect",
"author": "Manoj Babu Katragadda",
"author_email": "manojbabuiit@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3f/e8/77a80dad269781afa7b8b8d5db99e75286eb84c43de46a2a15acb3cdfd83/prefect-spark-on-k8s-operator-0.1.1.tar.gz",
"platform": null,
"description": "# prefect-spark-on-k8s-operator\n\n<p align=\"center\">\n <!--- Insert a cover image here -->\n <!--- <br> -->\n <a href=\"https://pypi.python.org/pypi/prefect-spark-on-k8s-operator/\" alt=\"PyPI version\">\n <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/prefect-spark-on-k8s-operator?color=0052FF&labelColor=090422\"></a>\n <a href=\"https://github.com/tardunge/prefect-spark-on-k8s-operator/\" alt=\"Stars\">\n <img src=\"https://img.shields.io/github/stars/tardunge/prefect-spark-on-k8s-operator?color=0052FF&labelColor=090422\" /></a>\n <a href=\"https://pypistats.org/packages/prefect-spark-on-k8s-operator/\" alt=\"Downloads\">\n <img src=\"https://img.shields.io/pypi/dm/prefect-spark-on-k8s-operator?color=0052FF&labelColor=090422\" /></a>\n <a href=\"https://github.com/tardunge/prefect-spark-on-k8s-operator/pulse\" alt=\"Activity\">\n <img src=\"https://img.shields.io/github/commit-activity/m/tardunge/prefect-spark-on-k8s-operator?color=0052FF&labelColor=090422\" /></a>\n <br>\n <a href=\"https://prefect-community.slack.com\" alt=\"Slack\">\n <img src=\"https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack\" /></a>\n <a href=\"https://discourse.prefect.io/\" alt=\"Discourse\">\n <img src=\"https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse\" /></a>\n</p>\n\nVisit the full docs [here](https://tardunge.github.io/prefect-spark-on-k8s-operator) to see additional examples and the API reference.\n\nPrefect integrations for orchestrating and monitoring apache spark jobs on kubernetes using spark-on-k8s-operator.\n\n## Welcome!\n\n`prefect-spark-on-k8s-operator` is a collection of Prefect flows enabling orchestration, observation and management of `SparkApplication` custom kubernetes resources defined according to spark-on-k8s-operator CRD v1Beta2 API Spec.\n\nJump to [examples](#example-usage).\n\n\n## Resources\n\nFor more tips on how to use tasks and flows in a Collection, check out [Using Collections](https://docs.prefect.io/collections/usage/)!\n\n### Installation\n\nYou need to configure the kubernetes credentials as per `prefect-kubernetes` documentation.<br />\nInstall `prefect-spark-on-k8s-operator` with `pip`:\n\n```bash\npip install prefect-spark-on-k8s-operator\n```\n\nRequires an installation of Python 3.7+.\n\nWe recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.\n\nThese flows are designed to work with Prefect 2.0. For more information about how to use Prefect, please refer to the [Prefect documentation](https://docs.prefect.io/).\n\n### Example Usage\n\n#### Specify and run a SparkApplication from a yaml file\n\n```python\nimport asyncio\n\nfrom prefect_kubernetes.credentials import KubernetesCredentials\nfrom prefect_spark_on_k8s_operator import (\n SparkApplication,\n run_spark_application, # this is a flow\n)\n\napp = SparkApplication.from_yaml_file(\n credentials=KubernetesCredentials.load(\"k8s-creds\"),\n manifest_path=\"path/to/spark_application.yaml\",\n)\n\n\nif __name__ == \"__main__\":\n # run the flow\n asyncio.run(run_spark_application(app))\n```\n\n## Feedback\n\nIf you encounter any bugs while using `prefect-spark-on-k8s-operator`, feel free to open an issue in the [prefect-spark-on-k8s-operator](https://github.com/tardunge/prefect-spark-on-k8s-operator) repository.\n\nIf you have any questions or issues while using `prefect-spark-on-k8s-operator`, you can find help in either the [Prefect Discourse forum](https://discourse.prefect.io/) or the [Prefect Slack community](https://prefect.io/slack).\n\nFeel free to star or watch [`prefect-spark-on-k8s-operator`](https://github.com/tardunge/prefect-spark-on-k8s-operator) for updates too!\n\n## Contributing\n\nIf you'd like to help contribute to fix an issue or add a feature to `prefect-spark-on-k8s-operator`, please [propose changes through a pull request from a fork of the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).\n\nHere are the steps:\n\n1. [Fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository)\n2. [Clone the forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository)\n3. Install the repository and its dependencies:\n```\npip install -e \".[dev]\"\n```\n4. Make desired changes\n5. Add tests\n6. Insert an entry to [CHANGELOG.md](https://github.com/tardunge/prefect-spark-on-k8s-operator/blob/main/CHANGELOG.md)\n7. Install `pre-commit` to perform quality checks prior to commit:\n```\npre-commit install\n```\n8. `git commit`, `git push`, and create a pull request\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Prefect integrations for orchestrating and monitoring apache spark jobs on kubernetes using spark-on-k8s-operator.",
"version": "0.1.1",
"split_keywords": [
"prefect"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "80cc344d01f724a72ea23de2ba5e7ee79a3c66587d1da0f3032b1df6bc3350cf",
"md5": "4e5f1e36b2353bc98557e578998a8287",
"sha256": "a9c42ac58fc74d0887eb3ea1b1b131c6b161ffc82bfba5cd4154ddcb63eab27a"
},
"downloads": -1,
"filename": "prefect_spark_on_k8s_operator-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e5f1e36b2353bc98557e578998a8287",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 14995,
"upload_time": "2023-04-02T05:57:56",
"upload_time_iso_8601": "2023-04-02T05:57:56.513996Z",
"url": "https://files.pythonhosted.org/packages/80/cc/344d01f724a72ea23de2ba5e7ee79a3c66587d1da0f3032b1df6bc3350cf/prefect_spark_on_k8s_operator-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3fe877a80dad269781afa7b8b8d5db99e75286eb84c43de46a2a15acb3cdfd83",
"md5": "8fc6cf319acd72bb4c0302115e13e7a9",
"sha256": "a071160687431b9bb6bc0827bab2186d01895fdf42f5a6533906e7224cd4d2d0"
},
"downloads": -1,
"filename": "prefect-spark-on-k8s-operator-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "8fc6cf319acd72bb4c0302115e13e7a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 31799,
"upload_time": "2023-04-02T05:57:58",
"upload_time_iso_8601": "2023-04-02T05:57:58.240833Z",
"url": "https://files.pythonhosted.org/packages/3f/e8/77a80dad269781afa7b8b8d5db99e75286eb84c43de46a2a15acb3cdfd83/prefect-spark-on-k8s-operator-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-02 05:57:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "tardunge",
"github_project": "prefect-spark-on-k8s-operator",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "prefect-spark-on-k8s-operator"
}