uWSGI API - Python decorators - with fallback for running outside uwsgi
Project description
uWSGI API - Python decorators - with fallback for running outside uwsgi
Uwsgi offers a nice pyhton api in the form of decorators. It’s a shame that you can nolonger run your code outside of uwsgi. This package implements fallbacks for the uwsgi decorators, that either do nothing, or run the asynchronous stuff synchronously.
Beats import errors right?
this module provides fallbacks for the following uwsgi decorators:
spool lock cron timer
usage, just import the decorators from uwsgidecoratorsfallback instead of uwsgidecorators and your code will nolonger import error outside of uwsgi:
from uwsgidecoratorsfallback import spool, lock, cron, timer
After that just use as intended, outside of uwsgi you get alternatives that either do nothing or run the function synchronously.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file uwsgidecorators-fallback-0.0.3.tar.gz
.
File metadata
- Download URL: uwsgidecorators-fallback-0.0.3.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba904edadeaba538c3d0c90a82639944ea4dfbb2fcea088ae0640e8bd51a2cfe |
|
MD5 | 09f2c900a3905841e8cc509dd37189cd |
|
BLAKE2b-256 | 26eb2bbe5b0a8180b4b4c5a3aa3d2d97d2d2f70b69bf0acb70825981b77f9dd0 |