
Research
Malicious Go “crypto” Module Steals Passwords and Deploys Rekoobe Backdoor
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.
psycogreen
Advanced tools
The psycogreen_ package enables psycopg2 to work with coroutine libraries,
using asynchronous calls internally but offering a blocking interface so that
regular code can run unmodified.
Psycopg_ offers coroutines support__ since release 2.2. Because the main
module is a C extension it cannot be monkey-patched to become
coroutine-friendly. Instead it exposes a hook__ that coroutine libraries can
use to install a function integrating with their event scheduler. Psycopg will
call the function whenever it executes a libpq call that may block.
psycogreen is a collection of "wait callbacks" useful to integrate Psycopg
with different coroutine libraries.
.. _psycogreen: https://github.com/psycopg/psycogreen .. _Psycopg: http://initd.org/psycopg/ .. __: http://initd.org/psycopg/docs/advanced.html#support-to-coroutine-libraries .. __: http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.set_wait_callback
pip install psycogreen
psycogreen.eventletEventlet_ currently supports Psycopg out-of-the-box and psycogreen is not
necessary. See the documentation__ for patching instruction.
.. _Eventlet: http://eventlet.net/ .. __: http://eventlet.net/doc/patching.html#monkeypatching-the-standard-library
If for any reason you want to avoid using Eventlet monkeypatching you can use
psycogreen.eventlet.patch_psycopg().
Function psycogreen.eventlet.patch_psycopg()
Enable async processing in Psycopg integrated with the Eventlet events
loop. It is performed by registering eventlet_wait_callback() as
psycopg2 wait callback.
Function psycogreen.eventlet.eventlet_wait_callback(conn)
A wait callback integrating with Eventlet events loop.
An example script showing concurrent usage of psycopg2 with urlopen()
with Eventlet is available in |tests/test_eventlet.py|__.
.. |tests/test_eventlet.py| replace:: tests/test_eventlet.py
.. __: https://github.com/psycopg/psycogreen/blob/master/tests/test_eventlet.py
psycogreen.geventIn order to use psycopg2 asynchronously with gevent_ you can use
psycogreen.gevent.patch_psycopg().
Function psycogreen.gevent.patch_psycopg()
Enable async processing in Psycopg integrated with the gevent events
loop. It is performed by registering gevent_wait_callback() as
psycopg2 wait callback.
Function psycogreen.gevent.gevent_wait_callback(conn)
A wait callback integrating with gevent events loop.
An example script showing concurrent usage of psycopg2 with urlopen()
with gevent is available in |tests/test_gevent.py|__.
.. _gevent: http://www.gevent.org/
.. |tests/test_gevent.py| replace:: tests/test_gevent.py
.. __: https://github.com/psycopg/psycogreen/blob/master/tests/test_gevent.py
Roberto De Ioris is writing uGreen__, a green thread implementation on top of
the uWSGI async platform__.
.. __: http://projects.unbit.it/uwsgi/wiki/uGreen .. __: http://projects.unbit.it/uwsgi/
He has performed some tests using both psycopg2 async support__ and
psycopg2 green support__ and has reported no problem in their stress tests
with both the async styles.
.. __: http://projects.unbit.it/uwsgi/browser/tests/psycopg2_green.py .. __: http://projects.unbit.it/uwsgi/browser/tests/psycogreen_green.py
FAQs
psycopg2 integration with coroutine libraries
We found that psycogreen demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.

Security News
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.