Python
Learn how to connect to MotherDuck and query your data using Python.
Installation & authentication
How to install DuckDB and connect to MotherDuck
Specify MotherDuck database
Specify MotherDuck database
Loading data into MotherDuck
Load CSV, Parquet, and JSON files into MotherDuck from local, S3, or HTTPS sources using Python.
Query data
Execute SQL queries against MotherDuck using Python with hybrid local and cloud execution.
Postgres endpoint
Connect to MotherDuck from Python using psycopg2 or psycopg3 via the Postgres wire protocol