I believe this means that the uwsgi module is only available for import to
the python interpreter embedded by uwsgi.

On Thu, Dec 7, 2017 at 10:52 AM, Etienne Robillard <[email protected]>
wrote:

> How can I access the "uwsgi" module in Python ?
>
> I have noticed that the uwsgidecorators module do import this module, but
> it cannot be imported from the Python interpreter:
>
> % python
>
> >>> import uwsgi
>
> >>> ImportError: no module named uwsgi
>
> The docs says that "The uWSGI server automagically adds a uwsgi module
> into your Python apps."
>
> What does that mean exactly and how can I access the uwsgi module
> programmatically?
>
>
> Thanks,
>
> Etienne
>
> Le 2017-12-07 à 10:13, Etienne Robillard a écrit :
>
> Hi,
>
> I would like to access the uWSGI stats API from within Django by creating
> a custom WSGI middleware.
>
> Could it be possible to compute the number of requests currently being
> used by uWSGI workers in Python/Django ?
>
> Ideally, i could then retrieve the active connections in use in a standard
> Django view:
>
> def someview(request):
>
>     # retrieve the number of active requests (connections)
>
>     connections = request.environ['uwsgi.requests']
>
>
> What do you think?
>
>
> Etienne
>
>
>
> --
> Etienne [email protected]https://www.isotopesoftware.ca/
>
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to