On Sat, Oct 31, 2015 at 12:02 AM, Daniel Kraus <[email protected]> wrote:

> Hi!
>
> On 31 October 2015 at 00:32, Dorian Hoxha <[email protected]> wrote:
>
>> Really cool. But I think you're missing the import uwsgidecorators?
>>
>
> uwsgidecorators is already (officially?) available on pypi:
> https://pypi.python.org/pypi/uwsgidecorators/
> Not sure if bundling the uwsgidecorators package is a good idea, my module
> is really only a stub and
> only useful for documentation, it has no effect otherwise.
>
> I see that the uwsgidecorators package has no docstrings, maybe someone
> should make a pull request
> for that if you meant that.
>
>
> BTW: If someone `pip install uwsgi-stub` I think I had a packaging bug
> that made `import uwsgi` only
> available when you installed in edit mode from source. That should be
> fixed now.
>

Possibly of interest, the goal behind this activity:

https://github.com/unbit/uwsgi/pull/852

is to allow a uwsgi.py module (or package, eg. uwsgi/decorators.py) to be
shipped by default. In this hypothetical future, uwsgi.py would be capable
of bootstrapping the uWSGI server into an existing python process (albeit
probably should happen pretty early :-).

The idea is to have a new setup.py (what is more-or-less setup.cpyext.py
right now) invoke uwsgiconfig.py to generate a static lib, say uwsgi.a,
then link that with a generated cffi module _uwsgi.c to produce a proper
_uwsgi.so python module.

This provides a convenient solution to your problem (always importable) and
would also allow starting the server. The nice thing about this is you can
generate all of your settings from dynamic python and then point uWSGI to
live/prepared references (vs. another exec).

This feature makes uWSGI integrate more cleanly with python as a
real/normal module and simultaneously obsoletes the aging `pyuwsgi` plugin.
I don't know as much about other languages but probably the idea could be
copied to the ruby/php/perl/etc plugins.

-- 

C Anthony
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to