
Product
Socket Brings Supply Chain Security to skills.sh
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.
pythread
Advanced tools
A Python library providing a user-friendly interface for managing both synchronous and asynchronous threads.
A Python library providing a user-friendly interface for managing both synchronous and asynchronous threads.
pythread is a dual-threading Python library crafted to streamline the creation and management of threads in Python applications. It offers two distinct managers:
With pythread, starting, stopping, and supervising the life cycle of threads and async tasks becomes effortless, enhancing the readability and resilience of your code.
To get started with pythread, run:
pip install pythread
Facilitates the creation of synchronous threads for running functions with specific delays.
# Initialize the SyncThreadManager
manager = SyncThreadManager()
# Function to run in a separate thread
def print_message(message):
print(f"Thread message: {message}")
# Start a new thread with a specific action and delay
thread = manager.start_thread(name='PrinterThread', func=print_message, delay=1,
message='Hello from SyncThread!'
)
# Stop the thread using its name
manager.stop_thread('PrinterThread')
# Stop the thread using the thread object
manager.stop_thread(thread)
Enables the execution of async coroutines concurrently.
import asyncio
from pythread import AsyncThreadManager
# Initialize the AsyncThreadManager
manager = AsyncThreadManager()
# Example coroutine function
async def async_print_message(message):
print(f"Async message: {message}")
# Start and run an async task
loop = asyncio.get_event_loop()
task = loop.run_until_complete(manager.start_task(name='AsyncPrinter', coro_func=async_print_message, message='Hello from AsyncThread!'))
# Stop the task using its name
loop.run_until_complete(manager.stop_task('AsyncPrinter'))
# Stop the task using the task object
loop.run_until_complete(manager.stop_task(task))
FAQs
A Python library providing a user-friendly interface for managing both synchronous and asynchronous threads.
We found that pythread demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.