crochet
Use Twisted anywhere!
Decision gist · record as of 2026-08-14
Yes, if you need to use Twisted from blocking code. The package is stable, well-maintained in its dormant state (no active bugs, no vulnerabilities), has low install friction, and solves a real integration problem. The 1140-day gap since the last release reflects that the library "just works" rather than abandonment—monthly downloads remain substantial. Not necessary if you're already writing pure Twisted or pure synchronous code.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later (3.8, 3.9, 3.10, 3.11, or PyPy3).
- Twisted must be installed and compatible.
- Low friction: pure Python wheel with only two runtime dependencies (Twisted and wrapt).
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or closed-source projects.
last release 2023-07-01 (1140 days) · last repo commit 2024-09-03 · 238 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 397,417 downloads/mo, #6,960 on PyPI
Alternatives
Verify before relying
pip install crochet
from crochet import setup, wait_for
from twisted.internet import reactor
setup()
@wait_for(timeout=5.0)
def blocking_call():
d = reactor.callLater(1, lambda: "result")
return d
result = blocking_call()- Whether the package works reliably with Twisted versions released after 2023-07-01.
- Performance characteristics when handling high concurrency or long-running reactor operations.
- Compatibility with modern async/await patterns beyond the basic decorator support mentioned.
What it is and what it does
Crochet bridges the gap between Twisted's event-driven asynchronous model and synchronous blocking code. It manages a Twisted reactor in a background thread, exposing decorators like `@wait_for` and `@run_in_reactor` that let blocking code call into Twisted and wait for results. The package handles reactor startup, shutdown, and integration with Python's standard logging framework automatically.
You use it when you need Twisted's networking or concurrency capabilities inside a blocking framework (Django, Flask, WSGI), when porting blocking code to Twisted incrementally, or when a library needs to expose a blocking API while using Twisted internally. It also supports decorating async/await Twisted functions. The main dependencies are Twisted itself and wrapt for function wrapping.
Use it for
- Use Twisted networking in a Django or Flask web application without rewriting the entire framework.
- Write a library with a blocking API that uses Twisted for async I/O under the hood.
- Gradually port blocking code to Twisted by keeping a backwards-compatible synchronous layer.
- Run Twisted code from threaded parts of a WSGI container or other multi-threaded environment.
- Integrate Twisted's async capabilities into a synchronous test suite or blocking application.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to use Twisted from blocking code.
The package is stable, well-maintained in its dormant state (no active bugs, no vulnerabilities), has low install friction, and solves a real integration problem. The 1140-day gap since the last release reflects that the library "just works" rather than abandonment—monthly downloads remain substantial. Not necessary if you're already writing pure Twisted or pure synchronous code.
Install
crochet on PyPI
Before you install
Low friction: pure Python wheel with only two runtime dependencies (Twisted and wrapt). Maintenance is dormant but stable—the last release was 1140 days ago, yet the package reports about 30,000 downloads per month and the repository remains active with a recent commit on 2024-09-03.
Requires Python 3.8 or later (3.8, 3.9, 3.10, 3.11, or PyPy3). Twisted must be installed and compatible.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or closed-source projects.
Quickstart
pip install crochet
from crochet import setup, wait_for
from twisted.internet import reactor
setup()
@wait_for(timeout=5.0)
def blocking_call():
d = reactor.callLater(1, lambda: "result")
return d
result = blocking_call()
Verify before relying
- Whether the package works reliably with Twisted versions released after 2023-07-01.
- Performance characteristics when handling high concurrency or long-running reactor operations.
- Compatibility with modern async/await patterns beyond the basic decorator support mentioned.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesTwistedwrapt |
| Maintenance | Dormant 1,140 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 397,417 / month, #6,960 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: crochet-2.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “twisted from blocking code”
- crochetCrochet lets you call Twisted asynchronous code from blocking Python…
- scrapydoProvides a blocking API to run Scrapy spiders synchronously, wrapping…
- TwistedTwisted is an event-driven networking framework that provides…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also scrapydo · pytest-twisted · txaio · Twisted · stopit · asgiref · treq · localstack-twisted · synchronicity · spyne