Skip to main content

A lightweight async task framework using thread pools

Project description

ark-framework

ark-framework provides a simple asynchronous task decorator that allows lightweight parallelism using Python threads. It includes support for thread pools, named task queues, and graceful task completion.

Features

  • @asynco: Decorator to run any function in a separate thread or pool
  • Asynco: Singleton manager for custom thread pools

Usage

from ark import asynco, Asynco

@asynco(pool_name="my_pool")
def background_task(x):
    print(f"Running task {x}")

Asynco.create_pool("my_pool", size=5)

for i in range(10):
    background_task(i)

Asynco.complete_all_task("my_pool")

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

ark_framework-0.0.4.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

ark_framework-0.0.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file ark_framework-0.0.4.tar.gz.

File metadata

  • Download URL: ark_framework-0.0.4.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for ark_framework-0.0.4.tar.gz
Algorithm Hash digest
SHA256 a74162f0582ada94f1546f9fc01c612ce588758eea28e1f479b102416dbd1eab
MD5 4828b2aca767a8894604608813314d30
BLAKE2b-256 b0903bff4b2b61b48063858a2178486f270c4afefd52db3683b2ee6267b35e27

See more details on using hashes here.

File details

Details for the file ark_framework-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: ark_framework-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for ark_framework-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6662a06adc1d628f4a758a39d180c94876ea1042b5c0fa9fbb2e23e13ba8a45c
MD5 0535aa865861fc979cdfb526fc4c9634
BLAKE2b-256 6d57eb57fd75edd3eedc6f705f40303c3d3d2b961ce0c71ac1885801435c5d98

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