$npx skillfedfor your agent

Flask-Threads

A helper library to work with threads within Flask applications.

With conditionsPyPI Application FrameworksReleased May 2025999.5K downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — flask_threads-0.2.0-py3-none-any.whl
v0.2.0 · released 2025-05-20 · 1 runtime deps: Flask

Yes, with conditions. Install if you need to run background threads in Flask and must access application context from those threads. The package solves a real Flask threading problem with low install friction and no known vulnerabilities. However, verify the license before production use, and be aware that adoption is limited (29 stars), so community support and edge-case testing are minimal.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction install with a single runtime dependency on Flask.
  • The package is actively maintained with a recent release in May 2025 and regular commits; however, the small repository size (29 stars) suggests limited real-world adoption and testing.

License · maintenance · safety

(unclear) — License status is unclear—no SPDX identifier or raw license text is declared in the package metadata. Before using in production or proprietary code, verify the actual license by checking the repository directly.

last release 2025-05-20 (451 days) · last repo commit 2026-07-04 · 29 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 999,453 downloads/mo, #4,540 on PyPI

Verify before relying

pip install Flask-Threads

from flask import Flask, g

app = Flask(__name__)

@app.route('/task')
def run_task():
    g.data = 'value'
    return 'done'
  • Whether the package works with all modern Flask versions or has specific version constraints.
  • Real-world performance and thread safety characteristics under concurrent load.
  • Whether the thread pool executor properly handles exceptions and cleanup in all scenarios.
  • Specific API and usage patterns beyond the description excerpt provided.
Same gist for agents: .md · .json

What it is and what it does

Flask-Threads solves a core problem when running background work in Flask: the application context is thread-local, so spawning a new thread normally causes an exception when that thread tries to access flask.g or other context-bound objects. This library wraps threading and concurrent.futures modules to carry the Flask application context into background threads, letting you safely read and write context data from worker threads.

The package provides helper classes that capture the current Flask context and push it into worker threads before execution. It depends only on Flask and is straightforward to integrate into existing Flask applications for background task patterns.

Use it for

  • Run background tasks (logging, cleanup, notifications) from a request handler while accessing request-specific data stored in flask.g.
  • Submit multiple worker tasks to a thread pool from within a Flask route, each task able to read application or request context.
  • Offload long-running work to a background thread without losing access to database sessions or user context stored in flask.g.
  • Implement worker patterns where context-aware cleanup or finalization must happen in a separate thread.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, with conditions.

Install if you need to run background threads in Flask and must access application context from those threads. The package solves a real Flask threading problem with low install friction and no known vulnerabilities. However, verify the license before production use, and be aware that adoption is limited (29 stars), so community support and edge-case testing are minimal.

Install

flask-threads on PyPI

Before you install

Low friction install with a single runtime dependency on Flask. The package is actively maintained with a recent release in May 2025 and regular commits; however, the small repository size (29 stars) suggests limited real-world adoption and testing.

License in practice

License status is unclear—no SPDX identifier or raw license text is declared in the package metadata. Before using in production or proprietary code, verify the actual license by checking the repository directly.

Quickstart

pip install Flask-Threads

from flask import Flask, g

app = Flask(__name__)

@app.route('/task')
def run_task():
    g.data = 'value'
    return 'done'

Verify before relying

  • Whether the package works with all modern Flask versions or has specific version constraints.
  • Real-world performance and thread safety characteristics under concurrent load.
  • Whether the thread pool executor properly handles exceptions and cleanup in all scenarios.
  • Specific API and usage patterns beyond the description excerpt provided.

Package facts

LicenseNot declared unclear
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
Flask
MaintenanceActively maintained 451 days since the last release
Last repo commit
First released
Downloads999,453 / month, #4,540 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: flask_threads-0.2.0-py3-none-any.whl

Tags

Capabilities
flask background threadsflask application context threadingflask thread pool executorflask concurrent futuresflask thread local contextflask threaded workers
Topics
flask-extensionthreadingcontext-management

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 › “flask background threads”

  • Flask-ThreadsProvides thread and thread pool helpers that preserve Flask…
  • Flask-ExecutorFlask-Executor wraps Python's concurrent.futures module to provide a…
  • crochetCrochet lets you call Twisted asynchronous code from blocking Python…

Give your agent the search over MCP, or paste the wish link into any chat.

More Application Frameworks packages

fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
textual Worth it
PyPI · Application Frameworks · released Jun 2026

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.

MITpure Python
443.6Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
mcp Worth it
PyPI · Application Frameworks · released Jul 2026

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.

MITpure Python · 3.10+
319.3Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

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.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo

See also Flask-Executor · zthreading · xlocal · requests-futures · futures · Pebble · kthread · threaded · opencensus-context · threadloop