Skip to main content

BatchWizard: Manage OpenAI batch processing jobs with ease

Project description

BatchWizard

BatchWizard is a powerful CLI tool for managing OpenAI batch processing jobs with ease. It provides functionalities to upload files, create batch jobs, check their status, and download the results. The tool uses asynchronous processing to efficiently handle multiple jobs concurrently.

Table of Contents

Installation

You can install BatchWizard using pipx for an isolated environment or directly via pip.

Using pipx (recommended)

pipx install batchwizard

Using pip

pip install batchwizard

Ensure you have pipx or pip installed on your system. For pipx, you can follow the installation instructions here.

Usage

BatchWizard provides a command-line interface (CLI) for managing batch jobs. Here are some example commands:

Process Batch Jobs

To process a directory containing input files:

batchwizard process <input_directory> [--output-directory OUTPUT_DIR] [--max-concurrent-jobs NUM] [--check-interval SECONDS]

List Recent Jobs

To list recent batch jobs:

batchwizard list-jobs [--limit NUM] [--all]

Cancel a Job

To cancel a specific batch job:

batchwizard cancel <job_id>

Download Job Results

To download results for a completed batch job:

batchwizard download <job_id> [--output-file FILE_PATH]

Configuration

Setting up the OpenAI API Key

To set the OpenAI API key:

batchwizard configure --set-key YOUR_API_KEY

Show Current Configuration

To show the current configuration:

batchwizard configure --show

Reset Configuration

To reset the configuration to default values:

batchwizard configure --reset

Commands

BatchWizard supports the following commands:

  • process: Process batch jobs from input files in the specified directory.
  • configure: Manage BatchWizard configuration.
  • list-jobs: List recent batch jobs.
  • cancel: Cancel a specific batch job.
  • download: Download results for a completed batch job.

For detailed information on each command, use the --help option:

batchwizard <command> --help

Features

  • Asynchronous Processing: Efficiently handle multiple batch jobs concurrently.
  • Rich UI: Display progress and job status using a rich, interactive interface.
  • Flexible Configuration: Easily manage API keys and other settings.
  • Job Management: List, cancel, and download results for batch jobs.
  • Error Handling: Robust error handling and informative error messages.

Contributing

We welcome contributions to BatchWizard! To contribute, follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature-name.
  3. Make your changes and commit them: git commit -m 'Add some feature'.
  4. Push to the branch: git push origin feature/your-feature-name.
  5. Open a pull request.

Running Tests

To run tests, use pytest:

pytest --cov=batchwizard tests/

Ensure your code passes all tests and meets the coding standards before opening a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or feedback, feel free to open an issue on the GitHub repository.

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

batchwizard-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

batchwizard-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file batchwizard-0.1.0.tar.gz.

File metadata

  • Download URL: batchwizard-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for batchwizard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9de13b0bfd060e9e02a7c02d048a31930e7b5cc868f3397d54e73b5f067bd103
MD5 1c6b3c58d7290c706e95af0afcdade96
BLAKE2b-256 9833fe45aaf10a45ce3bd0d2c51ab0c24e96804aea1b07a01e84622ca47b52a3

See more details on using hashes here.

File details

Details for the file batchwizard-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: batchwizard-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for batchwizard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 057dd2ec549300fb5d029453417a71fe753c679cde08c2d38d15049c0f4a1bee
MD5 3a88402662d2e66450cb368ce0a9fd86
BLAKE2b-256 c18c44dd7c31ff55701053acf77530ddcf73648fb2d40592cd19d69e422a3835

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page