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%20the%20community-on%20spectrum-blueviolet

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 -> local_date;
        }
    ''')

    # Insert a new User object
    conn.fetchall('''
        INSERT User {
            name := <str>$name,
            dob := <local_date>$dob
        }
    ''', name='Bob', dob=datetime.date(1984, 3, 1))

    # Select User objects.
    user_set = conn.fetchall(
        '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.7.2a1.tar.gz (736.6 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

edgedb-0.7.2a1-cp38-cp38-manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.8

edgedb-0.7.2a1-cp38-cp38-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

edgedb-0.7.2a1-cp37-cp37m-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.7m

edgedb-0.7.2a1-cp37-cp37m-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

edgedb-0.7.2a1-cp36-cp36m-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.6m

edgedb-0.7.2a1-cp36-cp36m-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

File details

Details for the file edgedb-0.7.2a1.tar.gz.

File metadata

  • Download URL: edgedb-0.7.2a1.tar.gz
  • Upload date:
  • Size: 736.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1.tar.gz
Algorithm Hash digest
SHA256 153a636fd5f01f2000e2e974f439936b9a41574c7f9dff8f148762c95cb62a9d
MD5 9dc76a62ef8da3afa01e09229e0664b5
BLAKE2b-256 983dc36fcda3e47384f99d31c9e0210b2b0db013019eba2af5f1a6d480e9f545

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-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.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 18bcc82ec4411afeb87d0b2190d15a5f4bbab5f37edfc609b3c58ac0b19018e5
MD5 e8e36bb9b0fd1ad9c2e3df61cc3bb548
BLAKE2b-256 a0349b5f08222db49d26e43d5a1621cc6d30bee45a89854cb5e9545b516ff08e

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ced88a030c89d6edcde52fdaea88f99576894e278bd461f8d834cb2ca375bd0d
MD5 60daf034dd233d1cdcc322f17edcd0a7
BLAKE2b-256 4414bea76856376c215c7ffc48a21f2990852df2db35003f52610e9e600182b8

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-cp38-cp38-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.8, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5578b3f69e562b74ed0a204a053207cf4336ce36498174d7c9172977ea71c988
MD5 311d30f4104d97629a091a8a3a97bb6e
BLAKE2b-256 fc1b2ec6b499b7a5808f1620f5a4166f162658c4a6c3667e91bb1c4fe586ac55

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-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.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 0eb4e7f44ffb82ef18f7a4b33c1a361158a03b9852e5eb2b62dd331284c09203
MD5 597085311c3b1f0f78ac075662f054bc
BLAKE2b-256 c127a525087d31bc2b9e3632d703c1c440426c4313a84fb5753cccbcb63e3bc8

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 39478d78813bb77c881500cd0af555b932b8d659fc3b3b57ee723f3bedd1e271
MD5 2c7fe6528fa90f7bec5897dd55058827
BLAKE2b-256 3d4071e9558c26114dc3ceb7a8b33a83ef3e3a5dc7a89ba55fe2416c41a7597c

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 226bf84f58089212f67f79adee752c29017225857efd5bf629fd497a42637905
MD5 2e24792fba0ccc7d98297769db83ea8d
BLAKE2b-256 90311440684cdb7a986d0ed050022094bf4133f23af34ce3ffdf843b05d1d015

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-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.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 4c9dce56b1f97955a8b02e6b5a9025293d238d974487d1b7a6e814f7c130c3fb
MD5 5bd808ce4130546b6eff280925644b9e
BLAKE2b-256 ffe137abb6cefbad1839f0e3ada691f93b67720a00b6579d702ec5589e6e548b

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 452054ff0a13eb0fafa647047a764d19c8968838974ab0226fde075001fbe2f7
MD5 fc89e39947837360c7f54c0867303005
BLAKE2b-256 8743a392965687cf861f5f72f4123f1d6b41909d0ca3c568e630d6da34f4ebef

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a1-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a1-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f7660bf619f311160a440b49b43939e815277d23bf883e68642b94ae3cfc3eb9
MD5 a545db2649fe1ab0a886b91165d6ee75
BLAKE2b-256 494b7a80b7c543ecd2e1dd76d2d2b83b46d8ac3efec3d5f3b02d25242e813c56

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