The most popular PostgreSQL adapter for Python

Joined October 2010
100 Photos and videos
Did you know that you can customise the objects returned by a query? 👀 By default Psycopg returns a Python tuple for every Postgres row, but which object it uses is actually under your control. For more flexibility, 'row_factory' and 'psycopg.rows' are your friends! 😊
3
97
Back from @PGConfdev, full of ideas! 🤗 Great to share our work on Python/Postgres communication and imagine how the protocol could evolve: lots of work ahead! 💪 If you'd like to, please consider supporting Psycopg 💛 Link in comments! #pgconfdev #PostgreSQL #Python #Psycopg
1
1
186
We're going to Vancouver! 🇨🇦 Our maintainer Daniele Varrazzo will be giving a talk at @PGConfdev about libpq and how to get more out of PostgreSQL. Come say hi! 👋 #pgconfdev #PostgreSQL #Python #Psycopg #libpq #OpenSource #PythonDeveloper #PostgreSQLCommunity #DevConference
1
94
The Psycopg website has a new look! Check it out: psycopg.org
3
182
We have a new logo! What do you think? More updates coming soon...
1
13
336
1 Sep 2025
Shall we meet in Naples? We will be at PGDay Napoli to talk about Psycopg 3 and in the upcoming 3.3, with Python 3.14 and PostgreSQL 18 support. After that, get the chance to visit a picturesque city and have the best pizza of your life! 2025.pgdaynapoli.org/
174
29 Dec 2022
I hope to not be committing any crime by declaring that you can find us as @psycopg@fosstodon.org Whether we will keep on using this space or not depends on the quality of the interaction and the toxicity of the different networks. #python #postgresql #freesoftware
9
1,178
23 Dec 2022
Very annoying... psycopg 3 threads stumble on each other, but can't figure out what is hogging the GIL (above: 1 thread benchmark, below, 4 threads, circled: GIL acquisition). How to debug it? #Python #Debugging
2
9
2,430
23 Dec 2022
Tried to convert setup.cfg to pyproject.toml, and it's a pretty poor result: likely it won't be merged. I hate how useful info are forced to irrelevant places, such as the urls after the filename of the readme. I wish this format was ditched and build-system moved to setup.cfg.
1
8
1,057
22 Dec 2022
It is impossible to configure the postgresql.conf of the @GitHub @GitHubAction @PostgreSQL service. For instance, impossible to enable two-phase commit. Prove me wrong. docs.github.com/en/actions/u…

3
10
1,737
22 Dec 2022
Hints: - @GitHubActions services don't support passing ARGS to docker run (which would be passed to the server) - You can't override the ENTRYPOINT with a script from the repo, because the service starts before actions/checkout Checkmate, AFAICS github.com/psycopg/psycopg/c…
5
357
20 Dec 2022
Just released psycopg 3.1.7, but we couldn't build M1 binary packages as @Scaleway has no hardware availalble. So we made it compatible with psycopg-binary 3.1.6 (we could, this time, because only changes are in Python code). psycopg.org/psycopg3/docs/ne…

1
1
6
1,001
20 Dec 2022
There could be a few lessons to learn here. One is to look into other provides (checking if @MacStadium has availability for Free-Software projects). We will also refactor the metadata to allow more flexibility in Psycopg 3.2.
1
297
16 Dec 2022
Let's take a look how it is down there. Nice default avatar, it looks a bit like me.
1
2
13
2,241
16 Dec 2022
Retweeting @pauloxnet tweet to say thank you for your work bringing everyone together, and because it contains a nice list of people to thank. Great job, people! 💜
The Django @psycopg branch has been merged 🎉 I opened the issue 13 months ago and many developers worked on the PR started by @dvarrazzo 👏 Thanks @fapolloner @MariuszFelisiak Simon Charette, Tim Graham, @AdamChainz, @carltongibson and @David_Smith86 🙏 code.djangoproject.com/ticke…
1
3
527
15 Dec 2022
Oops... didn't even close the shell where 3.1.5 was released that we had a reason to release 3.1.6 😩 In 3.1.5 we broke cursor.copy() when row_factory is specified... and copy() doesn't even use row factories 😅 Relevant tests added, of course. #TDD psycopg.org/psycopg3/docs/ne…
9
15 Dec 2022
This was an amazing piece of work! Thank you very much @djangoproject for welcoming Psycopg 3!
Django 4.2 supports @psycopg 3 📢💥 Thanks to Daniele Varrazzo, @fapolloner, and Simon Charette for their humongous work 🌟🌟🌟 github.com/django/django/pul… #psycopg3 #postgresql #django
1
7