From 235f320737e2f204a6350f1edd6b235dea2b0df9 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 10 May 2023 04:33:34 +0000 Subject: automatic import of python-sfn-workflow-client --- .gitignore | 1 + python-sfn-workflow-client.spec | 304 ++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 306 insertions(+) create mode 100644 python-sfn-workflow-client.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..f3a5f9d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/sfn_workflow_client-1.1.1.tar.gz diff --git a/python-sfn-workflow-client.spec b/python-sfn-workflow-client.spec new file mode 100644 index 0000000..f16f737 --- /dev/null +++ b/python-sfn-workflow-client.spec @@ -0,0 +1,304 @@ +%global _empty_manifest_terminate_build 0 +Name: python-sfn-workflow-client +Version: 1.1.1 +Release: 1 +Summary: Enhanced, asyncio-compatible client for AWS Step Functions. +License: BSD-3-Clause +URL: https://github.com/NarrativeScience/sfn-workflow-client +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b3/06/c57c8cbb6f6081ad20272e9ce21e148e787dd1c845195d6c60b5d7845113/sfn_workflow_client-1.1.1.tar.gz +BuildArch: noarch + +Requires: python3-aenum +Requires: python3-arrow +Requires: python3-backoff +Requires: python3-boto3 + +%description +# sfn_workflow_client + +[![CircleCI](https://circleci.com/gh/NarrativeScience/sfn-workflow-client/tree/master.svg?style=shield)](https://circleci.com/gh/NarrativeScience/sfn-workflow-client/tree/master) [![](https://img.shields.io/pypi/v/sfn_workflow_client.svg)](https://pypi.org/pypi/sfn_workflow_client/) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) + +Enhanced, asyncio-compatible client for AWS Step Functions. + +Features: + +- Trigger new executions +- Query for state machine execution status +- Wait for an execution to complete +- Fetch execution history + +Table of Contents: + +- [Installation](#installation) +- [Guide](#guide) +- [Development](#development) + +## Installation + +sfn_workflow_client requires Python 3.6 or above. + +```bash +pip install sfn_workflow_client +``` + +## Guide + +```python +from sfn_workflow_client.enums import ExecutionStatus +from sfn_workflow_client.workflow import Workflow + +# Initialize a workflow client +workflow = Workflow("my-state-machine") +# Fetch all executions +collection = await workflow.executions.fetch() +# Fetch currently running executions +collection = await workflow.executions.fetch(status=ExecutionStatus.running) +# Start a new execution +execution = await workflow.executions.create().start() +# Start a new execution and wait until it completes (useful for tests) +execution = await workflow.executions.start_sync() +# Find an execution by trace ID (for tests) +execution = await workflow.executions.fetch().find_by_trace_id("abc") +# Fetch the event history of an execution +events = await execution.events.fetch() +``` + +## Development + +To develop sfn_workflow_client, install dependencies and enable the pre-commit hook: + +```bash +pip install pre-commit tox +pre-commit install +``` + +To run functional tests, you need to create an AWS IAM role with permissions to: + +- Create/update/delete state machines +- Start/stop executions + +Set the following environment variables: + +- `AWS_ACCOUNT_ID` +- `AWS_ACCESS_KEY_ID` +- `AWS_SECRET_ACCESS_KEY` +- `AWS_DEFAULT_REGION` +- `AWS_IAM_ROLE_ARN` + +To run tests: + +```bash +tox +``` + + +%package -n python3-sfn-workflow-client +Summary: Enhanced, asyncio-compatible client for AWS Step Functions. +Provides: python-sfn-workflow-client +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-sfn-workflow-client +# sfn_workflow_client + +[![CircleCI](https://circleci.com/gh/NarrativeScience/sfn-workflow-client/tree/master.svg?style=shield)](https://circleci.com/gh/NarrativeScience/sfn-workflow-client/tree/master) [![](https://img.shields.io/pypi/v/sfn_workflow_client.svg)](https://pypi.org/pypi/sfn_workflow_client/) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) + +Enhanced, asyncio-compatible client for AWS Step Functions. + +Features: + +- Trigger new executions +- Query for state machine execution status +- Wait for an execution to complete +- Fetch execution history + +Table of Contents: + +- [Installation](#installation) +- [Guide](#guide) +- [Development](#development) + +## Installation + +sfn_workflow_client requires Python 3.6 or above. + +```bash +pip install sfn_workflow_client +``` + +## Guide + +```python +from sfn_workflow_client.enums import ExecutionStatus +from sfn_workflow_client.workflow import Workflow + +# Initialize a workflow client +workflow = Workflow("my-state-machine") +# Fetch all executions +collection = await workflow.executions.fetch() +# Fetch currently running executions +collection = await workflow.executions.fetch(status=ExecutionStatus.running) +# Start a new execution +execution = await workflow.executions.create().start() +# Start a new execution and wait until it completes (useful for tests) +execution = await workflow.executions.start_sync() +# Find an execution by trace ID (for tests) +execution = await workflow.executions.fetch().find_by_trace_id("abc") +# Fetch the event history of an execution +events = await execution.events.fetch() +``` + +## Development + +To develop sfn_workflow_client, install dependencies and enable the pre-commit hook: + +```bash +pip install pre-commit tox +pre-commit install +``` + +To run functional tests, you need to create an AWS IAM role with permissions to: + +- Create/update/delete state machines +- Start/stop executions + +Set the following environment variables: + +- `AWS_ACCOUNT_ID` +- `AWS_ACCESS_KEY_ID` +- `AWS_SECRET_ACCESS_KEY` +- `AWS_DEFAULT_REGION` +- `AWS_IAM_ROLE_ARN` + +To run tests: + +```bash +tox +``` + + +%package help +Summary: Development documents and examples for sfn-workflow-client +Provides: python3-sfn-workflow-client-doc +%description help +# sfn_workflow_client + +[![CircleCI](https://circleci.com/gh/NarrativeScience/sfn-workflow-client/tree/master.svg?style=shield)](https://circleci.com/gh/NarrativeScience/sfn-workflow-client/tree/master) [![](https://img.shields.io/pypi/v/sfn_workflow_client.svg)](https://pypi.org/pypi/sfn_workflow_client/) [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) + +Enhanced, asyncio-compatible client for AWS Step Functions. + +Features: + +- Trigger new executions +- Query for state machine execution status +- Wait for an execution to complete +- Fetch execution history + +Table of Contents: + +- [Installation](#installation) +- [Guide](#guide) +- [Development](#development) + +## Installation + +sfn_workflow_client requires Python 3.6 or above. + +```bash +pip install sfn_workflow_client +``` + +## Guide + +```python +from sfn_workflow_client.enums import ExecutionStatus +from sfn_workflow_client.workflow import Workflow + +# Initialize a workflow client +workflow = Workflow("my-state-machine") +# Fetch all executions +collection = await workflow.executions.fetch() +# Fetch currently running executions +collection = await workflow.executions.fetch(status=ExecutionStatus.running) +# Start a new execution +execution = await workflow.executions.create().start() +# Start a new execution and wait until it completes (useful for tests) +execution = await workflow.executions.start_sync() +# Find an execution by trace ID (for tests) +execution = await workflow.executions.fetch().find_by_trace_id("abc") +# Fetch the event history of an execution +events = await execution.events.fetch() +``` + +## Development + +To develop sfn_workflow_client, install dependencies and enable the pre-commit hook: + +```bash +pip install pre-commit tox +pre-commit install +``` + +To run functional tests, you need to create an AWS IAM role with permissions to: + +- Create/update/delete state machines +- Start/stop executions + +Set the following environment variables: + +- `AWS_ACCOUNT_ID` +- `AWS_ACCESS_KEY_ID` +- `AWS_SECRET_ACCESS_KEY` +- `AWS_DEFAULT_REGION` +- `AWS_IAM_ROLE_ARN` + +To run tests: + +```bash +tox +``` + + +%prep +%autosetup -n sfn-workflow-client-1.1.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-sfn-workflow-client -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot - 1.1.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..66e6f51 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +a0a68a7aa3ceed8f4fa62180adbb1843 sfn_workflow_client-1.1.1.tar.gz -- cgit v1.2.3