Skip to main content

EdgeDB Python driver

Project description

https://github.com/edgedb/edgedb-python/workflows/Tests/badge.svg?event=push&branch=master https://img.shields.io/pypi/v/edgedb.svg https://img.shields.io/badge/join-github%20discussions-green

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.

Documentation

The project documentation can be found here.

Installation

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

$ pip install edgedb

Basic Usage

import datetime
import edgedb

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

    # Insert a new User object
    conn.query('''
        INSERT User {
            name := <str>$name,
            dob := <cal::local_date>$dob
        }
    ''', name='Bob', dob=datetime.date(1984, 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 := datetime.date(1984, 3, 1)}}

    # Close the connection.
    conn.close()

if __name__ == '__main__':
    main()

Development

Instructions for installing EdgeDB and edgedb-python locally can be found at edgedb.com/docs/internals/dev/.

To run the test suite, run $ python setup.py test.

License

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edgedb-0.16.0.tar.gz (784.5 kB view details)

Uploaded Source

Built Distributions

edgedb-0.16.0-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

edgedb-0.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

edgedb-0.16.0-cp39-cp39-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

edgedb-0.16.0-cp38-cp38-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

edgedb-0.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

edgedb-0.16.0-cp38-cp38-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

edgedb-0.16.0-cp37-cp37m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7m Windows x86-64

edgedb-0.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

edgedb-0.16.0-cp37-cp37m-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

edgedb-0.16.0-cp36-cp36m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.6m Windows x86-64

edgedb-0.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.5+ x86-64

edgedb-0.16.0-cp36-cp36m-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.6m macOS 10.14+ x86-64

File details

Details for the file edgedb-0.16.0.tar.gz.

File metadata

  • Download URL: edgedb-0.16.0.tar.gz
  • Upload date:
  • Size: 784.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0.tar.gz
Algorithm Hash digest
SHA256 76cc109290016403fcf405b4a21f91f429cf613294a8afb7b65daad7c0fa325e
MD5 4c5c8162506baddcf72d5f98ad6923ef
BLAKE2b-256 67b2a42e180e8b72852f501fe661a3ab6314df08e7e0ee96f1625469f44a612a

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.16.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7e82510e57639a736b73c80257036f45916c642682471de60e03732d27e49746
MD5 fa510c51a03d61589b58e0a31521decd
BLAKE2b-256 531f9e0b3049569093afab3e7a90b4c0af65d8f12b943793872bcc079afbda6b

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d89f0cd814e701da534e136a86ac0e53bb1538f3f9557d824be7e3a38370af7c
MD5 18929e801891e0dde6c4b7a06cb94f7a
BLAKE2b-256 ab442e310a139456b2c956c040002b56cd7b6c11584d94c27e156657239132fb

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.16.0-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 ce6405a921c51b9800a914dd742dabe25dbd4bcc883fd4f85e0983cb176866f1
MD5 399f3be86de1c3a66a7e34dfff8e7587
BLAKE2b-256 52936426dcdc3654f81ef5e2826ab752ad62b6a21e96c1d8a882843d280ef164

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.16.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 822cfc92c42834b8dacdb94b3dbfac1ac681e98d68aa3920baa9c937ccf29155
MD5 5b25189ebc7686ad56281fc133c326fa
BLAKE2b-256 1418202d1d2fb7ca5ff800bf898326492635706544ae56d8989f2709fc48d277

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 239654b23523565bb3fa71f38098315eb93e6de11ddd04d09598023835d5d4e0
MD5 693c1d6111022fbd8c63763ce0466bd2
BLAKE2b-256 f4664e91ae9123317af14a5768209f417817480073a0e6aae43432a13ad223fa

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.16.0-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9cce5aa2a41ea25d1f573c21e0636d0b37f221d51cd36f6b91b7c3ee85cb7fb9
MD5 aa21d0094c2bb39cb4646b6eb06aac6c
BLAKE2b-256 5f5c5b3548abe1c4ac3f6ae5c3e0b45d95fd0773c849d0941bc5b9322a840e4c

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.16.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 bd95addf498d519b7c512c8d2d48e1172f5fe81d290b358ca3ce0abb92de354d
MD5 88f5a1b7bfc9dafcbbad572c3a56f8d9
BLAKE2b-256 71f0026595c39f4371ca07a75eaac5c5031dfc21beee048102e81961a15c81b8

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 747e50c56d983deab3d707fadb4eb755f33b60cbd2d884c5c2efa2eaddf4ba86
MD5 1debd29e76be43542c91446553af9548
BLAKE2b-256 4cb575f0963893f985926fb106e536c28498c6705e0fe7ee1d7f4499f58bf1de

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.16.0-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 af51dd5c03856eca6dda41aef856f47085dfc93a0cef8bd94a6296ff82ecaeb2
MD5 853010e04f371f4c9d17acc3db48b42a
BLAKE2b-256 5da5ba477031e956d0c9d66767b49c9a570e089922dd754eeb588f4f31364440

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.16.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2bd74c40a257bea27126204459532710e473c53c6d998339845418f6188e8967
MD5 8cce95dcbaee9f68d51e6fc0353780fc
BLAKE2b-256 68d5359c03d07f8879a3fb398204c899165efa5a77fc50b9b1c18ebcfd0244b1

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 52c337146fc251dd1034fe2440a6d4cc83c7d026f74e3049b91a649d9306f60f
MD5 a45087e0283bddf781c768344a970345
BLAKE2b-256 a623831f8b0bea14c072f285b1fa9dff8a575766cced7b981ca71963d2450297

See more details on using hashes here.

File details

Details for the file edgedb-0.16.0-cp36-cp36m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.16.0-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.16.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6fd1aa71446f8c81000d032fac105fe893681167af8371e3297923b64fa2e3f4
MD5 0d2436881226f6945c4cab205ee22278
BLAKE2b-256 5948499ac6959a3c5f71a35bfe76e29837bc7a3de9cc3912fa59e8b6c0f204d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page