A workflow automation tool
Project description
Buffalo
Buffalo is a simple and easy-to-use workflow management library for managing various work tasks in projects. The library provides a Python API interface that can be easily integrated into your applications.
Installation
pip install buffalo-workflow
Usage
Buffalo provides a simple API for creating and managing workflows:
from buffalo import Buffalo, Work
# Initialize Buffalo, specify the project root directory and template path
buffalo = Buffalo("/path/to/projects", "/path/to/template.yml")
# Create a project
project = buffalo.create_project("my_project", "My Project")
# Get a job
project_folder_name, work = buffalo.get_a_job("Task Name")
# Update job status
buffalo.update_work_status(project_folder_name, work, Work.IN_PROGRESS)
# Complete job
buffalo.update_work_status(project_folder_name, work, Work.DONE)
Environment Variables
Buffalo will prioritize using the user-provided template file. It will only use the built-in example template when the user template doesn't exist:
# Provide your own template file path
buffalo = Buffalo("/path/to/projects", "/path/to/your_own_template.yml")
# If your template doesn't exist, Buffalo will use the built-in template
Custom Workflow Templates
A core feature of Buffalo is allowing users to define their own workflows. You can create your own template file in the following format:
workflow:
works:
- name: "Your First Step"
status: not_started
output_file: "output1.md"
comment: "Description for the first step"
- name: "Your Second Step"
status: not_started
output_file: "output2.md"
comment: "Description for the second step"
# You can add more steps...
Getting the Example Template File
If you need to reference the built-in example template, you can use:
from buffalo import get_template_path
template_path = get_template_path()
print(f"Example template file path: {template_path}")
Advanced Usage
Buffalo is designed for easy integration with your project workflow management:
- Create multiple projects with different workflows
- Track the status of each work item through the workflow lifecycle
- Automatically save project state after each status update
- Load existing projects when Buffalo is reinitialized
Project details
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 buffalo_workflow-0.1.3.tar.gz.
File metadata
- Download URL: buffalo_workflow-0.1.3.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51f77a0efbd59cc2be4f43cd0fe11817849655c989bb6e686aa9283a703a9dfe
|
|
| MD5 |
f3cbe92e9f15588d559261891bcf6a0a
|
|
| BLAKE2b-256 |
07e61b837c1790f2775e635b36fa80fc70b7b46f42abf8ff36212840afebf15c
|
File details
Details for the file buffalo_workflow-0.1.3-py3-none-any.whl.
File metadata
- Download URL: buffalo_workflow-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b7d61101d7500b9441e6a9e2755d476c528aa3cd453800724f49313861729dd
|
|
| MD5 |
4a2bcdd8a453afe61339fcbcf14cc8a2
|
|
| BLAKE2b-256 |
9a88b89c11a3a05bab81a49454ca3af27281b26e8fd9ba898724c5514c1e2cbd
|