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.7 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():
    client = edgedb.create_client()
    # Create a User object type
    client.execute('''
        CREATE TYPE User {
            CREATE REQUIRED PROPERTY name -> str;
            CREATE PROPERTY dob -> cal::local_date;
        }
    ''')

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

    # Select User objects.
    user_set = client.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 client.
    client.close()

if __name__ == '__main__':
    main()

Development

Instructions for installing EdgeDB and edgedb-python locally can be found at edgedb.com/docs/reference/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-1.0.0.tar.gz (917.4 kB view details)

Uploaded Source

Built Distributions

edgedb-1.0.0-cp310-cp310-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

edgedb-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

edgedb-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

edgedb-1.0.0-cp39-cp39-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9 Windows x86-64

edgedb-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

edgedb-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

edgedb-1.0.0-cp38-cp38-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.8 Windows x86-64

edgedb-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

edgedb-1.0.0-cp38-cp38-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

edgedb-1.0.0-cp37-cp37m-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7m Windows x86-64

edgedb-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

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

edgedb-1.0.0-cp37-cp37m-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: edgedb-1.0.0.tar.gz
  • Upload date:
  • Size: 917.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for edgedb-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bcbb27c2c6c4ad136317f36789306bf74f7d7a0c84aba40e40c32d812abb37c5
MD5 68f959f9655d6351eb510d119e15e235
BLAKE2b-256 f249b0cea710aef1fcf20b180ffab530921fe2897f52d7921631a191bd43dd18

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: edgedb-1.0.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for edgedb-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d09c1c4858cc906e877657ecd0b175fd00ba10991b4f349afe5ace05af1ee2eb
MD5 8eda4726e92c1d0b161233ec15385e4f
BLAKE2b-256 52cb2f7f501456d5fa2cd6f1e67ca43640d01e0745d1cfe69339da8c8ffc327c

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60733ec06013f319a0700e74a2d4614bcbd0a0d46cabbdbeb77f5f9f9db60000
MD5 5adc118f9266cb1683b0ad56ceb47827
BLAKE2b-256 2ef0dc2dab2a78657107241c19b8c39c5fca79e5a7747b214a2356f3508562db

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 34cd765c926023af4c48187abb3bd6d98331f11c7e681729d5ed2e88d7081a87
MD5 e724035d1c20217fab1a2a9378b1c498
BLAKE2b-256 d0ebd26c0482ee3ab127ffa19c297cb2aedd95fde9e8c8cca0f334adcd37fbf4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-1.0.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for edgedb-1.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2ce08c9fc2193ae2f934b900aa90a7848f5c859eb722f3d22e15afd76c167dc4
MD5 62f5e5752ba785543b4a33a24d24afc7
BLAKE2b-256 a83caa6281e4dcf10f09a2f5c52aea17aa6ddf6452d0d1880157052dec674add

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 65ba922d536acf84fe9298ac9425fde81068c6d8b47abb1770bb2cd54d2f1382
MD5 5ae9001520b1fbf6ea6ef5714b4b7532
BLAKE2b-256 23c23d9403c0a4bbabdc3a528af6678b54d1cf0d456044867de7d57b937f89dd

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5218d1f816678531891875e587cbb49d7a30c6b4c08d88fcc61b7492fd20ad6a
MD5 f103eeffdbe36436591d492b1b617beb
BLAKE2b-256 1311a9ceeef3f9a34a82ea4bb2c0c3ae5ff8c0e2584ef169587a977b7d70603c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-1.0.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for edgedb-1.0.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0cf1af4ac5bf583a478917ce520cc836dcd03aaee069c5e24bc4740b014ea385
MD5 09eb7c603a3130112395ad1d4e345de5
BLAKE2b-256 b20b899d96981933eb48e92e464cdee12f2b442edc4366e1674b0e6b60a5488c

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 622873517e42dad271da740eb14b450b52058521ce6c6af902bc9b505479720d
MD5 ca7d16eaaefbf1799cbd423539cb7503
BLAKE2b-256 85d8f0b8f8fd52112d14e5ddea121213908e2a80e561e7506c19c477e4278f05

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.0.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 41cb465246dea538f929c178ab16cfb48390ad21846e1db84a9f8049688f4d12
MD5 aa74c3420977d2fc25d0e1d5194b1b20
BLAKE2b-256 4f5d2400a664e9ebfac9ec482430c08fdb16ca62c26ca8974ae0b27abe30a32c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-1.0.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for edgedb-1.0.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 900f9b4dc9684ff937909f90ffde855ef51f3b06223f8d9aa5ccabf62117b6bf
MD5 1c5d617aab55ed85cefabf79649b898b
BLAKE2b-256 f100407749baa1cd8cf2b59f03ced60e91b1704fefb7fb6dfa02c271c64ff510

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 284323f850d6a71bb5d215ed894c0cda6ab68ac209b025033c9a6108ff788ab9
MD5 6d9d1fcdfe35db2479eb9e7407d66428
BLAKE2b-256 d09a9f32e7558e83ddffb68e2655c2743a0e89e80835c45116997ebb41a5b1b3

See more details on using hashes here.

File details

Details for the file edgedb-1.0.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.0.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 50c1a6e958e5575b6937c01b8f77f97c9150c255088eec0cab9c2313978831fe
MD5 3179078b5da3593926ca4d98f63c73f5
BLAKE2b-256 89ec23905d854acf2cc5dc09c678d9b83c63859fde5e5a14d4ba5659cea40f71

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