Awesome Open Source
Awesome Open Source

The Python driver for EdgeDB

.. image:: :target:

.. image:: :target:

.. image:: :target:

edgedb-python is the official EdgeDB driver for Python. It provides both blocking IO and asyncio implementations.

The library requires Python 3.6 or later.


The project documentation can be found here <>_.


The library is available on PyPI. Use pip to install it::

$ pip install edgedb

Basic Usage

.. code-block:: python

import datetime
import edgedb

def main():
    # Establish a connection to an existing database named "test"
    # as an "edgedb" user.
    conn = edgedb.connect('edgedb://[email protected]/test')
    # Create a User object type
        CREATE TYPE User {
            CREATE REQUIRED PROPERTY name -> str;
            CREATE PROPERTY dob -> cal::local_date;

    # Insert a new User object
        INSERT User {
            name := <str>$name,
            dob := <cal::local_date>$dob
    ''', name='Bob',, 3, 1))

    # Select User objects.
    user_set = conn.query(
        'SELECT User {name, dob} FILTER .name = <str>$name', name='Bob')
    # *user_set* now contains
    # Set{Object{name := 'Bob', dob :=, 3, 1)}}

    # Close the connection.

if __name__ == '__main__':


Instructions for installing EdgeDB and edgedb-python locally can be found at <>_.

To run the test suite, run $ python test.


edgedb-python is developed and distributed under the Apache 2.0 license.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (48,368
python3 (1,401
asyncio (242
asynchronous (222
high-performance (179

Find Open Source By Browsing 7,000 Topics Across 59 Categories