Skip to content

uWSGI API - Python decorators - with fallback for running outside uwsgi

License

Notifications You must be signed in to change notification settings

devopsconsulting/uwsgidecorators-fallback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 run the asynchronous stuff synchronously.

Beats import errors right?

this module provides fallbacks for the following uwsgi decorators:

spool
lock
cron
timer
postfork

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, postfork

After that just use as intended, outside of uwsgi you get alternatives that either do nothing or run the function synchronously.

About

uWSGI API - Python decorators - with fallback for running outside uwsgi

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages