Registry / web-framework / uwsgidecorators

uwsgidecorators

JSON →
library1.1.0pypypiunverified

A standalone package providing decorators compatible with uWSGI, allowing easy integration of uWSGI features like cron, timer, signal, lock, and spooler without the full uwsgi module. Current version 1.1.0 appears to be stable with infrequent releases.

pip install uwsgidecorators
INSTALL
IMPORT
SIG · UWSGIDECORATORS
U
uwsgidecorators
web-frameworkpythonv1.1.0
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · 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 · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

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

timer
from uwsgidecorators import timer
from uwsgidecorators import timer
cron
from uwsgidecorators import cron
spooler
from uwsgidecorators import spooler

A simple timer decorator that runs in a mule every 10 seconds.

from uwsgidecorators import timer import os # This will only work if the process is managed by uWSGI with --enable-threads @timer(10, target='mule') def mytask(): print('Task executed in mule') if not os.environ.get('UWSGI_ORIGINAL_PROC_NAME'): print('This example requires uWSGI runtime. Install uWSGI and run under emperor/emperor.')
Debug
Known issues
breakingThe package is a standalone extraction from older uWSGI releases. Mixing with an installed uwsgi module (pypi package 'uwsgi') can cause import conflicts or segfaults due to symbol duplication. Prefer using either the full uwsgi package (which includes its own decorators) or this standalone package, not both.
fix
Uninstall uwsgi if you only need decorators: pip uninstall uwsgi && pip install uwsgidecorators
affects: all
gotchaThe decorators only function when the process is actually running under uWSGI (i.e., inside a uWSGI worker, mule, or spooler). Using them in a standalone Python script will either silently do nothing or raise an AttributeError due to missing uwsgi C bindings.
fix
Check uwsgi availability in code: if hasattr(uwsgidecorators, 'uwsgi'): # safe to use decorators
affects: all
deprecatedThe filelock, rlock, and sema decorators rely on uWSGI's internal locking mechanisms that may be removed in future uWSGI versions. Use with caution.
fix
Prefer Python's threading.Lock or multiprocessing.Lock if not within uWSGI's async environment.
affects: >=1.0.0
Upgrade
Version history
1.1.0latest on PyPI · released Nov 5, 2014
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
uwsgidecorators — pip install uwsgidecorators · libregistry