Registry / web-framework / pyuwsgi

pyuwsgi

JSON →
library2.0.30.post1pypypi✓ verified 24d ago

pyuwsgi is the official Python package providing the uWSGI server, a fast, self-healing, and developer-friendly application server for web applications. It serves as a glue layer between Python web applications (WSGI) and various protocols like HTTP, SCGI, and FastCGI. The current stable version is 2.0.30.post1, and it generally follows the release cadence of the underlying uWSGI C core.

pip install pyuwsgi
INSTALL
IMPORT
SIG · PYUWSGI
P
pyuwsgi
web-frameworkpythonv2.0.30.post1
Install
1.6s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.30.post1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

uwsgidecorators
import uwsgidecorators
import uwsgidecorators

This quickstart demonstrates how to create a simple WSGI application and run it using the `uwsgi` executable provided by the `pyuwsgi` package. The server listens on HTTP port 8000 and serves the 'application' callable from `app.py`.

import os def application(environ, start_response): # A minimal WSGI application status = '200 OK' headers = [('Content-type', 'text/plain')] start_response(status, headers) return [b"Hello from uWSGI!"] # To run this, save it as `app.py` and then run: # uwsgi --http :8000 --wsgi-file app.py --callable application # Or, if `uwsgi` executable isn't in your PATH: # python -m uwsgi --http :8000 --wsgi-file app.py --callable application
uwsgi --version
Debug
Known issues
gotchapyuwsgi provides the uWSGI server *executable*, not a Python library to import for server management. Attempting to `import uwsgi` to start or manage the server from your application code will not work as expected; the `uwsgi` module is for applications *already running within* a uWSGI instance to interact with the server environment (e.g., `uwsgi.log()`, `uwsgi.cache_get()`).
fix
Run uWSGI as a command-line executable (e.g., `uwsgi --ini myapp.ini` or `python -m uwsgi ...`) and point it to your WSGI application.
affects: All
gotchaInstallation via `pip install pyuwsgi` often requires C compilers (like `gcc`) and Python development headers (e.g., `python3-dev` on Debian/Ubuntu, `build-essential`, or Xcode Command Line Tools on macOS) to be present on the system, as `pyuwsgi` is a C extension. Without these, `pip` might fail to compile and install the package.
fix
Ensure you have the necessary build tools and Python development libraries installed for your operating system before running `pip install`.
affects: All
gotchauWSGI offers a vast array of configuration options, typically managed via `.ini` files. While command-line arguments are suitable for simple cases, production deployments almost universally use `.ini` files for clarity, reusability, and advanced features (e.g., multiple processes, logging, master/worker management).
fix
Familiarize yourself with uWSGI's configuration options and consider using `.ini` files for deployment (e.g., `uwsgi --ini myapp.ini`).
affects: All
gotchaFor robust production environments, it's highly recommended to run uWSGI behind a reverse proxy server like Nginx or Caddy. The reverse proxy can handle static file serving, SSL/TLS termination, request buffering, and load balancing more efficiently and securely than uWSGI directly.
fix
Deploy uWSGI behind a dedicated reverse proxy server to offload network-facing tasks and enhance performance/security.
affects: All
Upgrade
Version history
2.0.30.post1latest on PyPI · released Feb 24, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
pyuwsgi — pip install pyuwsgi · libregistry