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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

edgedb-0.7.0-cp38-cp38-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.8

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

Uploaded CPython 3.7m Windows x86-64

edgedb-0.7.0-cp37-cp37m-manylinux1_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.7m

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

Uploaded CPython 3.6m Windows x86-64

edgedb-0.7.0-cp36-cp36m-manylinux1_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.6m

edgedb-0.7.0-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.0.tar.gz.

File metadata

  • Download URL: edgedb-0.7.0.tar.gz
  • Upload date:
  • Size: 717.8 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.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0.tar.gz
Algorithm Hash digest
SHA256 e6ad253aa786ab935917fa0e816eca552a8d8755a7003637d55e79d60656fbbe
MD5 c66dfeec1cd6721e269de049868d0806
BLAKE2b-256 32b9b928fc27071af2081f90016e076a3f0d1083694a1fe84814f4a892a9eee7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for edgedb-0.7.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e2c919158caf9ee97bd525b8d1a0db9cd2951e9181ccd075fe98fa8aff1bdf65
MD5 908e9f1c78c9e6f0ef73c31e62a99034
BLAKE2b-256 04b470fd58b68459d0dbd1fc4f051bcf3ae18b3179b00f63a2c92d6cee4f6298

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.8 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.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b765a9539c18e87b08a2a27c1909129985a3a915331bebc55e4b13334f72c887
MD5 e2caf6647e485225956382845c7a5462
BLAKE2b-256 4c795598cac298aae78b3050b50d1d815f16116c02c13c1dc8ce53b47983be74

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0-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.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4f08b5beb039b4a8c2273fdaf84183b92244328e306badcbc042bf00fda72624
MD5 fe14a533a9b26e82166d519a01aa99ff
BLAKE2b-256 217cf049d64fc4b84fa09b19b957e38431e52243cacdfbbf47646cb24df94bb9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for edgedb-0.7.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 733d32260ba0e132650f5e5882d50977e4e5e87050ad037cc21e5b057aec1787
MD5 bf5aa995b2526593e3c2f4045be292d3
BLAKE2b-256 9616a45b46c50c3bfb4519fc3115dff453daf6419177daab0f8c50100a4795c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.7 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.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 52debb94d42045130cdba58c3a72ed81410632558c2661f68b6f400ea2a17e78
MD5 dabad9908c6d26e78d142fa6dd9313b5
BLAKE2b-256 0c63f8fc88fcc654244db58927ded60662dfa65ab0dc5fb458905d098f155ef1

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0-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.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2d44430e0904ab0d3c585e61bae9a9b034293dd59634c006fe2058b2106c5952
MD5 287173e1a0b8aa5a834a3f62ff7e03e5
BLAKE2b-256 e4b7486d8840803df39a9d2ff9845d8d780c3f85a499757f84befbf00097aa94

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for edgedb-0.7.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 6dce86eb967b3e18bf8232092c60019310eef051bc999145efdb2d3c20aae95d
MD5 3ad4dc8075ed4667bbd600bcd635b4c3
BLAKE2b-256 4bc01110817b6ba5c643a8aae4357b3df57e26418cc35e21ea38d91d1ea85215

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.7 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.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2566a4ea2d388091b3d0fa82544fa6f389d3918dc4549441251a48e58cefdc50
MD5 6732d200b579c140870208d234024ca3
BLAKE2b-256 699d88a17e581402b50693e9ea93befc87b36bd66c40cf174c443a25eeb471ae

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0-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.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5435e4149dec462056c8ab10f9d94c43c1a361b5d9231878063f4adda4962c9d
MD5 b62aad4141373602b04f32da551da58d
BLAKE2b-256 5a06466d4d599ebc010cff1bd23e8b5fc8152f2a381b26abfff0031a15e23900

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