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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

edgedb-0.12.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.12.0-cp37-cp37m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

edgedb-0.12.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.12.0-cp36-cp36m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

edgedb-0.12.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.12.0.tar.gz.

File metadata

  • Download URL: edgedb-0.12.0.tar.gz
  • Upload date:
  • Size: 752.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0.tar.gz
Algorithm Hash digest
SHA256 8decea7d9beb57c72d61d6a7efabbb3e9f7725ba86ff5ac8c38668ec9e702fb0
MD5 df815fe46de5944bfbef15fe710f5d70
BLAKE2b-256 73395ecc268d55b38840316a3a6ede0a39db35dc80e47265a97bb52c650f9824

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 efbcac642c0bd1205e8a5b9f5f246380052d2a2bab66886a5aaf412b479e3acd
MD5 87b9fd5e3e956923a1b34ab1309145b0
BLAKE2b-256 5a5afe86b693949f8c471401c49e56a47d01e6ada616066301b529fe9802efd1

See more details on using hashes here.

File details

Details for the file edgedb-0.12.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.12.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0ce373e69996d2a73d74a5a6935a3d662b05ab1f38e537dab75eb2ddf932350e
MD5 3488e6ef431822ed6583278012937b0b
BLAKE2b-256 1a3d5c370d42f6ec2b37968f78cfc05880925f7e58464b099962896cb7333edc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 49a27b3ec731b65dd9438b5db104920593ded12ec1947148ef46b597c9c1b0a5
MD5 58a9c981d548e1375bf2668863cc6d3c
BLAKE2b-256 8234d4c1f1004321032443ba1f33dec6d2da395f37efc19c33840994616175fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9912239c367b37bec81802eca06703d6d74b17f06e6702b76cf2246dbb7f7c68
MD5 de6eb2663fa131fcbcdf0cff633ff288
BLAKE2b-256 ba7ec1b7bf561df1929c0b5709a87337f273d41edae853e61d6e9d792693377d

See more details on using hashes here.

File details

Details for the file edgedb-0.12.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.12.0-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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 34630b2b305dae04956283e47c15c2c77e3eaf163d1c18d89a4cdf74eaa99d01
MD5 4b4e5cbbf59f7a156bdfd83fbc581400
BLAKE2b-256 51c59e46f40139cf38783cebf429c0c31e77afa8b2eb33bffbc2fc793b82989b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d1739b5aa1bd73dd000dfde4f11010d64b0be22018c6920b056cffa3b94f8561
MD5 0ff4bf1b9faf9c69e7b19d3d39476329
BLAKE2b-256 cdda982f2d9a57ac7d3e77462b53d99da92a59c06053186c7cc0f5802cfa70d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 a476d4ee5a813df9ae233c917bec4e20cbd1bdbf920ced98ed226a7f1779ece0
MD5 ce8b523e161747d99d6b16d11220ed72
BLAKE2b-256 8316cd1a2b6fd2978fdb1e4288cbda2305ac4330d8cda9d856f9910fa12926d1

See more details on using hashes here.

File details

Details for the file edgedb-0.12.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.12.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6a5d31f5574dbd57b1c3f45333b67c84bfdaa23c97b184252950f8f7eb439768
MD5 a77d4e6a00bad7326b8e0fe3219a3a9e
BLAKE2b-256 2e88db0233d283980f6405518075f3fab27baf82432c1e26cd3557f6198246b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 285654d2cb82015e027b43ecf7537962a3a943bf73462d51d0c338a662600796
MD5 d2fd2ecb0cf2eddda3c19a229a542d46
BLAKE2b-256 6d1dbadf30d2e0a26fcd7ccc3a069815dedf34e9dee4c8dc2ed75f737559029f

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