Skip to main content

Tasks queue implementation in python.

Project description

Opus

Opus is a Python package for efficient task execution, designed to handle parallel and distributed workloads seamlessly. Whether you need to execute tasks asynchronously, schedule workflows, or manage dependencies, Opus provides a simple yet powerful interface.

Features

  • Asynchronous Task Execution: Run tasks concurrently using Python's async capabilities.
  • Parallel Processing: Utilize multi-threading and multi-processing for performance.
  • Simple API: Easy-to-use interface for defining and executing tasks.

Installation

You can install Opus using pip:

pip install opus

Quick Start

Define and Execute a Task

from opus import Task

# Define a simple task
def my_task(name):
    print(f"Hello, {name}!")

# Create and execute the task
task = Task(my_task, args=("World",))
task.run()

Using Async Tasks

import asyncio
from opus import AsyncTask

async def async_task(name):
    await asyncio.sleep(1)
    print(f"Async Hello, {name}!")

# Run an async task
task = AsyncTask(async_task, args=("Async World",))
asyncio.run(task.run())

Contributing

Contributions is welcomed! Please open an issue or submit a pull request on GitHub.

License

Opus is licensed under the MIT License.


For more details, visit our 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

opus45-0.0.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

opus45-0.0.0-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file opus45-0.0.0.tar.gz.

File metadata

  • Download URL: opus45-0.0.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for opus45-0.0.0.tar.gz
Algorithm Hash digest
SHA256 d456a2e7ef54e76d2fa3859678f23085c0afaa277169b165a0f98aac5bce08c7
MD5 dd257de5f33e467ff5b5a32712ce5c0b
BLAKE2b-256 14dbf1403d8ffeb07fb8901f43e390886034a5a98cdcad1d89ca734a2af8f1c6

See more details on using hashes here.

File details

Details for the file opus45-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: opus45-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for opus45-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b32d71a8845143b3e4b824c359209dca6a9a99a5ae19344fd2a63a1f231133f6
MD5 c45b303a1a5a6aca0d35f0dd113844ac
BLAKE2b-256 101b1a16f08e72336fd1a32705166755b46aa95b0a91e45212936a1a434566ee

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