Placeholder package scaffold for BusinessOgre
Project description
BusinessOgre
Business Ogre is a business abstraction layer that neatens workflows in your code, forces self-documentation, and simplifies interaction with stakeholders.
If you are new, start with docs/Installation.md and then docs/Quick Start.md.
Example usage of Workflow and WorkflowBlock classes:
The key to using business ogre is defining the code blocks. These are classes that inherit from the WorkflowBlock class, and add some cool functionality.
Standard import style used in this project:
import business_ogre as ogr
# Define some example WorkflowBlocks
class MakeTextUppercase(ogr.WorkflowBlock):
input_type = (str,) # Required for validation
output_type = (str,) # Required for validation
# This is the actual action that is happening in your block.
def action(self, input_data: str) -> str:
return input_data.upper()
# Creating one more:
class AddExclamation(ogr.WorkflowBlock):
input_type = (str,)
output_type = (str,)
def action(self, input_data: str) -> str:
return input_data + '!'
Next you need to instantiate the blocks:
# Instantiating each block:
make_uppercase_step = MakeTextUppercase('Uppercase')
add_exclamation_step = AddExclamation('Add Exclamation')
Now that the blocks are instantiated, you can create pipelines using the >> operator.
# Using the >> operator joins the blocks into a workflow
excited_workflow = MakeTextUppercase('Uppercase') >> AddExclamation('Add Exclamation')
You can treat excited_workflow like you would a function.
# excited_workflow is callable, inputs will consecutively pass through the blocks:
excited_workflow('A piece of test text')
>>> 'A PIECE OF TEST TEXT!'
str(excited_workflow)
>>> "Workflow(steps='Uppercase >> Add Exclamation')"
Here is how you check that all the blocks match up:
# Check that the output type of each step matches the input type of the next step.
# Raises an error if there is a mismatch, otherwise returns True.
excited_workflow.validate()
>>> True
Because the flows are callable, they can easily be passed to frontend code that requires a single, neat callable.
For prompt patterns that help generate cleaner workflow files with coding assistants, see:
docs/Prompt Strategies/Workflow Build Prompts.mddocs/Prompt Strategies/Usable Business File Prompts.md
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file business_ogre-0.0.5.tar.gz.
File metadata
- Download URL: business_ogre-0.0.5.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d58772c70adf84799c29127fc5572b0aa53242f036cb55d050e48024142db0e9
|
|
| MD5 |
71be3811fe8ef994a978756474f59cb4
|
|
| BLAKE2b-256 |
7896053b14ab45f505de0b5aa97a17720ec1c64e77fea054f188a6a89df5f6f3
|
Provenance
The following attestation bundles were made for business_ogre-0.0.5.tar.gz:
Publisher:
publish-pypi.yml on pjachim/BusinessOgre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
business_ogre-0.0.5.tar.gz -
Subject digest:
d58772c70adf84799c29127fc5572b0aa53242f036cb55d050e48024142db0e9 - Sigstore transparency entry: 1469083263
- Sigstore integration time:
-
Permalink:
pjachim/BusinessOgre@66e0279702bb47c29d9fc3cb872c99f22892444f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pjachim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@66e0279702bb47c29d9fc3cb872c99f22892444f -
Trigger Event:
push
-
Statement type:
File details
Details for the file business_ogre-0.0.5-py3-none-any.whl.
File metadata
- Download URL: business_ogre-0.0.5-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5891b05c262f54b09fc0a453db4173ff8e3a0b6e9bfb525ee16b206218739f63
|
|
| MD5 |
e4d333d3190e27727494d89968b28daa
|
|
| BLAKE2b-256 |
130e36a0d0afed89c18981894874f98394e188757c058f8ddcabce16418b333f
|
Provenance
The following attestation bundles were made for business_ogre-0.0.5-py3-none-any.whl:
Publisher:
publish-pypi.yml on pjachim/BusinessOgre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
business_ogre-0.0.5-py3-none-any.whl -
Subject digest:
5891b05c262f54b09fc0a453db4173ff8e3a0b6e9bfb525ee16b206218739f63 - Sigstore transparency entry: 1469083493
- Sigstore integration time:
-
Permalink:
pjachim/BusinessOgre@66e0279702bb47c29d9fc3cb872c99f22892444f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pjachim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@66e0279702bb47c29d9fc3cb872c99f22892444f -
Trigger Event:
push
-
Statement type: