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

    # Insert a new User object
    conn.query('''
        INSERT User {
            name := <str>$name,
            dob := <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.10.0.tar.gz (743.4 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

edgedb-0.10.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.10.0.tar.gz.

File metadata

  • Download URL: edgedb-0.10.0.tar.gz
  • Upload date:
  • Size: 743.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0.tar.gz
Algorithm Hash digest
SHA256 6a4408a417a05129abb297fa24fa2ca08150856b4532c09bd72427603fff077d
MD5 433ae053d0c3703a3dcd63099ac2f784
BLAKE2b-256 084ff220b5597e216d259952f4ba65514eb4e89ed946d99e6d610fa3b4968a6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.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.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 40a3f2dc0d0ee7921eec54caf0c8b15389c209699ed080e85d26bb3bd48720bc
MD5 b76a351041aba9dbf3a91df25901438f
BLAKE2b-256 f1d8736fab0fcf4166a1fda224e63d157305c6ee867e182159e87d5fae779183

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.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.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 05c34f2c2eb526c1169bb8928bde33329b8a3b887c89f30a7e33b689c76b1660
MD5 b2deae82fbba54664c4f204746600376
BLAKE2b-256 de05d378261de102f31d82442f2f35dec3d5ee57ac8a095e89cb4090567a05c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.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.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8a22db7ac4b53aaaf84d38a1fb031455da0b61d6a54d726b8eac372a7b47c3d4
MD5 dece11a531cb6b8db68480bfd128efaa
BLAKE2b-256 72e1d002d11e1518f774898f57b77f22914245b107ca6a1beb21aba17387caff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.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.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 31bb92e182d696ae4e0406c911fbb24e6d7a90771ec6e28c5251792e1a58f508
MD5 213f1821815d7e5b6aeb4f3e23b37725
BLAKE2b-256 4b77aef1087d0478a4c677a6ac6dc923c15268647141575e53381d3c7d0dcfca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.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.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5e9aa4f7ed009ac65ae6d3e49eb97ba29363ea39d2da5681481cffa3da0c04be
MD5 8c1204a6b5eb3962f9311ac4e6af762d
BLAKE2b-256 5cd88d9a668d4ce1fab128d72ece6850f6bda0c7465eacfce59971b1d6ad966c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.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.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6c4dd0d1f14936c22b1f355e330f7bf99885a2b5c03f466fac7fe3171b4d5a18
MD5 80aa6f157155489b2ece8f3dcdfdb3cc
BLAKE2b-256 0ece74d9e105b3014c4c331a93d1e8e1c73f3c33609fe6eab557057fcb6f8b93

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.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.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 400e5fe6eefda55ad58eb4c526a0cfc60cd07dd70a31ca53597e5ca1761dd9ac
MD5 6d6c33d9f79185626e3afc9811f34b38
BLAKE2b-256 9f0e3916aaa386e10cb128271b96e223c9e72dd5a3e18598f679a3f26dbea0e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.0-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.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 375187dd40bfafa409956a1a0e3bdf2e716f67de56a0fba6df05bac15fc4d992
MD5 6180b77149158b502986b83d4692b22d
BLAKE2b-256 04476468c41adce6dc9a19e313b10bf73cade717b727b47638ffe56396b37746

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.10.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.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for edgedb-0.10.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 866fce3915e899d72da9c462f2a3e92aeaedfc5d06606714afa1e04dab7e5bdd
MD5 843000e54f594c94c9f56dfe20fd7ac3
BLAKE2b-256 9ea3a595126cb26e30582b55523e227adf8c7e056307384d0a22bcf9076258f8

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