Skip to main content

Native threading for Python using C++ and pybind11

Project description

Smuxent

v0.0.1 Smuxent is a lightweight native threading module for Python, backed by C++ and pybind11.
It allows you to easily launch background threads in Python using true native threads — with cooperative control and ID tracking.

This project was built for fun, learning, and utility. If you're using this, thanks! Feedback and suggestions are welcome though not sure where that'd be.

Currently supports: Python 3.12.2 on Windows (x64 and x86)


What It Does

  • Run Python functions in detached threads
  • Track threads by ID
  • Kill individual threads or all running threads
  • Track thread IDs and check if they are alive
  • Automatically loads the correct native extension based on system architecture

Example

from Smuxent import hello_thread, basic_thread

hello_thread(3)  # prints "Hello, Thread!" three times on another thread

def my_func():
    print("Running on another thread")

thread_id = basic_thread(my_func)  # runs my_func() on another thread, returning the thread ID

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

smuxent-0.0.2a0.tar.gz (149.0 kB view details)

Uploaded Source

Built Distribution

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

smuxent-0.0.2a0-py3-none-any.whl (148.4 kB view details)

Uploaded Python 3

File details

Details for the file smuxent-0.0.2a0.tar.gz.

File metadata

  • Download URL: smuxent-0.0.2a0.tar.gz
  • Upload date:
  • Size: 149.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for smuxent-0.0.2a0.tar.gz
Algorithm Hash digest
SHA256 1fd0f4db55ca34d6704fe275acefc02a24dc73364f165772598b41f5d1866ca7
MD5 ef9993db138010a512c6ecc0c56c6e4b
BLAKE2b-256 d90e2ad846d18f8ac0882c227bd7b6e76eed9a96c79d66eea4b24e80e9d1e609

See more details on using hashes here.

File details

Details for the file smuxent-0.0.2a0-py3-none-any.whl.

File metadata

  • Download URL: smuxent-0.0.2a0-py3-none-any.whl
  • Upload date:
  • Size: 148.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for smuxent-0.0.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 29986280b63a7007861c2fc8fd18ec1d857ccf43630af65d2cede4b3e46581e9
MD5 42286df7537ff22971478b363e633e4d
BLAKE2b-256 f07f4932c505e3824a072a01b5b92bea1c0d56f6315951b71520e0780e174a2c

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