Top "Psycopg2" questions

Psycopg is a PostgreSQL adapter for Python programming language.

sqlalchemy.exc.ArgumentError: Can't load plugin: sqlalchemy.dialects:driver

I am trying to run alembic migration and when I run alembic revision --autogenerate -m "Added initial tables" It fails …

python sqlalchemy psycopg2 alembic
How do I check if a json key exists in Postgres?

Let's say I have a json that looks like this: some_json = {'key_a': {'nested_key': 'a'}, 'key_b': {'nested_…

json postgresql psycopg2
"Failed building wheel for psycopg2" - MacOSX using virtualenv and pip

I'm attempting to make a website with a few others for the first time, and have run into a weird …

python django postgresql virtualenv psycopg2
Parameterized queries with psycopg2 / Python DB-API and PostgreSQL

What's the best way to make psycopg2 pass parameterized queries to PostgreSQL? I don't want to write my own escpaing …

python postgresql psycopg2
Could not translate host name "db" to address using Postgres, Docker Compose and Psycopg2

In one folder I have 3 files: base.py, Dockerfile and docker-compose.yml. base.py: import psycopg2 conn = psycopg2.connect("dbname=…

python postgresql docker docker-compose psycopg2
DictCursor doesn't seem to work under psycopg2

I haven't worked with psycopg2 before but I'm trying to change the cursor factory to DictCursor so that fetchall or …

python postgresql dictionary psycopg2
How do I install psycopg2 for Python 3.x?

Just started Python a few days ago and I'm using PyCharm to develop a web application with Django. I have …

python django python-3.x pycharm psycopg2
copy data from csv to postgresql using python

I am on windows 7 64 bit. I have a csv file 'data.csv'. I want to import data to a postgresql …

python postgresql psycopg2 postgresql-copy
psycopg2 insert python dictionary as json

I want to insert a python dictionary as a json into my postgresql database (via python and psycopg2). I have: …

python postgresql dictionary psycopg2
How to insert 'NULL' values into PostgreSQL database using Python?

Is there a good practice for entering NULL key values to a PostgreSQL database when a variable is None in …

python postgresql null psycopg2 nonetype