prefect-streamline


Nameprefect-streamline JSON
Version 1.1.1 PyPI version JSON
download
home_page
SummaryPrefect_Streamline is an opinionated extension that provides helpers to deploy and test Prefect flows quickly and easily.
upload_time2023-03-26 21:14:18
maintainer
docs_urlNone
authorFabien Arcellier
requires_python>=3.8,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## prefect streamline

prefect_streamline is an opinionated extension that provides helpers to deploy and test Prefect flows quickly and easily.

With its deployment and testing features, you can easily ensure the quality and reliability of your workflows before deploying them.

<!-- TOC start -->
- [Getting started](#getting-started)
- [Usage](#usage)
  * [Deploy flows using decorator](#deploy-flows-using-decorator)
  * [Accelerate flow testing using native python invocation](#accelerate-flow-testing-using-native-python-invocation)
- [Latest version](#latest-version)
- [Developper guideline](#developper-guideline)
  * [Install development environment](#install-development-environment)
  * [update the locked dependencies](#update-the-locked-dependencies)
  * [Run the continuous integration process](#run-the-continuous-integration-process)
- [Contributors](#contributors)
- [License](#license)
<!-- TOC end -->

## Getting started

```bash
pip install prefect_streamline
```

## Usage

### Deploy flows using decorator

``prefect_streamline`` allows you to configure the deployment of flows with a decorator.
Vous pouvez définir plusieurs déploiements pour un même flow.

*myapp/flow.py*
```python
from prefect import flow
from prefect_streamline import deploybook

@deploybook.register(interval=90, name="hello2")
@deploybook.register(cron="*/3 * * * *")
@deploybook.register(name="manual")
@flow(name="main.myflow")
def myflow() -> int:
    return 43
```

the prefect-streamline cli browses all the subfolders of your application.

```bash
# deploy all the flows register into myapp/flow.py
prefect-streamline deploy myapp/flow.py

# search all flow records in all myapp modules.
prefect-streamline deploy --discover src/myapp
```

### Accelerate flow testing using native python invocation

```python
from prefect_streamline import flowtest

def test_test_flow_should_handle_the_logger():
    with flowtest.use_native_runner():
        assert flowtest.fn(myflow)() == 12
```

```python

@flow()
def myflow() -> int:
    logger = get_run_logger()
    return 12
```

## Latest version

You can find the latest version to ...

```bash
git clone https://github.com/FabienArcellier/prefect_streamline.git
```

## Developper guideline

```
poetry shell
```

### Install development environment

Use make to instanciate a python virtual environment in ./venv and install the
python dependencies.

```bash
poetry install
```

### update the locked dependencies

```bash
poetry update
```

### Run the continuous integration process

Before commit or send a pull request, you have to execute the continuous integration process.

```bash
poetry run alfred ci
```

## Contributors

* Fabien Arcellier

## License

MIT License

Copyright (c) 2018-2022 Fabien Arcellier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "prefect-streamline",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Fabien Arcellier",
    "author_email": "fabien.arcellier@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/19/14/f5e8dea912f67a7c96609a8f34fe7bda3a04066542dc13a7cbf655690800/prefect_streamline-1.1.1.tar.gz",
    "platform": null,
    "description": "## prefect streamline\n\nprefect_streamline is an opinionated extension that provides helpers to deploy and test Prefect flows quickly and easily.\n\nWith its deployment and testing features, you can easily ensure the quality and reliability of your workflows before deploying them.\n\n<!-- TOC start -->\n- [Getting started](#getting-started)\n- [Usage](#usage)\n  * [Deploy flows using decorator](#deploy-flows-using-decorator)\n  * [Accelerate flow testing using native python invocation](#accelerate-flow-testing-using-native-python-invocation)\n- [Latest version](#latest-version)\n- [Developper guideline](#developper-guideline)\n  * [Install development environment](#install-development-environment)\n  * [update the locked dependencies](#update-the-locked-dependencies)\n  * [Run the continuous integration process](#run-the-continuous-integration-process)\n- [Contributors](#contributors)\n- [License](#license)\n<!-- TOC end -->\n\n## Getting started\n\n```bash\npip install prefect_streamline\n```\n\n## Usage\n\n### Deploy flows using decorator\n\n``prefect_streamline`` allows you to configure the deployment of flows with a decorator.\nVous pouvez d\u00e9finir plusieurs d\u00e9ploiements pour un m\u00eame flow.\n\n*myapp/flow.py*\n```python\nfrom prefect import flow\nfrom prefect_streamline import deploybook\n\n@deploybook.register(interval=90, name=\"hello2\")\n@deploybook.register(cron=\"*/3 * * * *\")\n@deploybook.register(name=\"manual\")\n@flow(name=\"main.myflow\")\ndef myflow() -> int:\n    return 43\n```\n\nthe prefect-streamline cli browses all the subfolders of your application.\n\n```bash\n# deploy all the flows register into myapp/flow.py\nprefect-streamline deploy myapp/flow.py\n\n# search all flow records in all myapp modules.\nprefect-streamline deploy --discover src/myapp\n```\n\n### Accelerate flow testing using native python invocation\n\n```python\nfrom prefect_streamline import flowtest\n\ndef test_test_flow_should_handle_the_logger():\n    with flowtest.use_native_runner():\n        assert flowtest.fn(myflow)() == 12\n```\n\n```python\n\n@flow()\ndef myflow() -> int:\n    logger = get_run_logger()\n    return 12\n```\n\n## Latest version\n\nYou can find the latest version to ...\n\n```bash\ngit clone https://github.com/FabienArcellier/prefect_streamline.git\n```\n\n## Developper guideline\n\n```\npoetry shell\n```\n\n### Install development environment\n\nUse make to instanciate a python virtual environment in ./venv and install the\npython dependencies.\n\n```bash\npoetry install\n```\n\n### update the locked dependencies\n\n```bash\npoetry update\n```\n\n### Run the continuous integration process\n\nBefore commit or send a pull request, you have to execute the continuous integration process.\n\n```bash\npoetry run alfred ci\n```\n\n## Contributors\n\n* Fabien Arcellier\n\n## License\n\nMIT License\n\nCopyright (c) 2018-2022 Fabien Arcellier\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Prefect_Streamline is an opinionated extension that provides helpers to deploy and test Prefect flows quickly and easily.",
    "version": "1.1.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02d060a8a8ea0dc5a41b4ab1df507762ccc35691aa0c6c7a256cd83b65e21064",
                "md5": "b9ce781c1873ff0b48ee84259b6ffa5a",
                "sha256": "97b66ac565999e07ca7c5ef90486edcb3e1ecb84918f53e0947b547983490501"
            },
            "downloads": -1,
            "filename": "prefect_streamline-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b9ce781c1873ff0b48ee84259b6ffa5a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 9588,
            "upload_time": "2023-03-26T21:14:16",
            "upload_time_iso_8601": "2023-03-26T21:14:16.392864Z",
            "url": "https://files.pythonhosted.org/packages/02/d0/60a8a8ea0dc5a41b4ab1df507762ccc35691aa0c6c7a256cd83b65e21064/prefect_streamline-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1914f5e8dea912f67a7c96609a8f34fe7bda3a04066542dc13a7cbf655690800",
                "md5": "6a7c13e7402c4d7decb5f02edf858a07",
                "sha256": "d94e62aad187922a351e9c96d03b8092a2c2815f6040880827f2b22f345d6fde"
            },
            "downloads": -1,
            "filename": "prefect_streamline-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6a7c13e7402c4d7decb5f02edf858a07",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 7899,
            "upload_time": "2023-03-26T21:14:18",
            "upload_time_iso_8601": "2023-03-26T21:14:18.280474Z",
            "url": "https://files.pythonhosted.org/packages/19/14/f5e8dea912f67a7c96609a8f34fe7bda3a04066542dc13a7cbf655690800/prefect_streamline-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-26 21:14:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "prefect-streamline"
}
        
Elapsed time: 0.06366s