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.17.2.tar.gz (785.1 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.9 Windows x86-64

edgedb-0.17.2-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.17.2-cp39-cp39-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

edgedb-0.17.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

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

Uploaded CPython 3.8 macOS 10.14+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

edgedb-0.17.2-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.17.2-cp37-cp37m-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

edgedb-0.17.2-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.17.2-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.17.2.tar.gz.

File metadata

  • Download URL: edgedb-0.17.2.tar.gz
  • Upload date:
  • Size: 785.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2.tar.gz
Algorithm Hash digest
SHA256 968435b5e1581457c3565a80a694b1b08ea9f7d04dbbc3ffde1d99008eccaa2e
MD5 3e22394f54212f6763b757da8f31d45f
BLAKE2b-256 078be6cbdc3d108a2619f8ccdedeb0a904796eef802d72fce22dfb1fa9e88819

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.2-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.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3ec1670926e04a52b813d505f4f9018fad1e25aee6024e15a9678f0e1f2b291a
MD5 7218bdeaf3a65f69ad20e175357b0e07
BLAKE2b-256 caf1e062e826441e4c07a855253980e19fce272abb07d24a95351972142c5732

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for edgedb-0.17.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 65c5011d33eb7b44cfd89c79a74e2d109a3b321b23d185e89c32bf0f3f5cd564
MD5 1345f2dad51bcece079900853ca21a09
BLAKE2b-256 792b6f673dc2d333abe4595c7d718fad3ba8cfe51ad9f844444d9744670a0523

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.2-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.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9652d5dcd52001bdf49c0ac94cecbf82fe56dc1de363f83646fff601f2b70bed
MD5 663d8b5b4f7f337532b4aebbaf521d43
BLAKE2b-256 154abd345df74a0b21b02862c8a331a676583c613137080b78f4326261cee3a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.2-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.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 76d642717cdf8e37451677e56d78d5cf3023e0ec167bb2bdd17b9fcce808ab15
MD5 a6da89002173216751d87d9a4ccf3cb8
BLAKE2b-256 72aa342fb69ad1bdb2e42dd8099853e97c2127a1be42c396d48643f67369e5fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for edgedb-0.17.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7642eeb3c2d85464b7f14f1c5c8022244436e7d0524f48d5d1f6342e13502df1
MD5 e7f63f6e08bc6828df961b3ddfaf2a86
BLAKE2b-256 8b7e062a4719c88e7bcc81cf571c33913cf7fabf6c53d7ebd20f7af4edbc2349

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.2-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.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2de249fa815e59d568b6cf561f56a1c6f280d09cb6318bcf6c557302e1499d5c
MD5 4a32b67fd2c224383e8edc8cd133c428
BLAKE2b-256 9ca7ed5a6ebff59d83661f0861b795c5a04f32ccad874e2809184499ae481d5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.2-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.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7bf150b329f26f4d94f0a111ead13029ff78a5cb2c660d0151f89ebb6e3bba48
MD5 77867c9ab56a90e40e9ad59f0f20f2b3
BLAKE2b-256 3d7995b35501a638a1c28b85074f6d2b571e24a604d80e7ed4bf4edd6ab1048a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for edgedb-0.17.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 308accdb67139069d7a5d467d06ee48a03e6d2b9c1bfc5f9cbcce4e20c18c135
MD5 5b94eac059541fce5606afefbc681606
BLAKE2b-256 aa76215bcb41bff4e62cc85daaad00226361fc9d1de9018ef4f5c5ac8495ff90

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.2-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.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6724226b5a39411e7cc795e4f75c90dd0a98cd47b8ad07089ca23075f24e9f91
MD5 2ee56fd8945f7136d58abd01fdddcac3
BLAKE2b-256 2b6f59efcb83633972202f8f4ffbfe66980de700849bb781fec0188d03a3d040

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.2-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.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 556769281ba5513c7bb020a5be55bb269ab4ea1d471a52c39cfd13c97a7edfce
MD5 68bf39b3532426d9297e48bf4a1435f8
BLAKE2b-256 cfde4d3a4ce7005ae659654c175bb3df1c813765bdc0116f9332d2c43f79d3f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for edgedb-0.17.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dd5136fb49daa2991957272adaab83acb9f8480e73181be84001920f13be5164
MD5 e655ce6f7f42b181cc4810e8872afad9
BLAKE2b-256 dc0ced5855b2296f9fe80e74d55788527da333dd71da6922e7e798a27fd3bacc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.2-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.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.2-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 910c7356918fae7830fc74305e4b70eb4a30b4dd8e9e582f500a1fda3560e816
MD5 a6f650b17696760b7d7cda00f105fa87
BLAKE2b-256 a1413d0483972172f83af3b9715bd7d309a9e815f12dd64be210d93cdd7c073b

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