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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.8 macOS 10.13+ x86-64

edgedb-0.7.0a3-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

edgedb-0.7.0a3-cp37-cp37m-macosx_10_13_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

edgedb-0.7.0a3-cp36-cp36m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

edgedb-0.7.0a3-cp36-cp36m-macosx_10_13_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

File details

Details for the file edgedb-0.7.0a3.tar.gz.

File metadata

  • Download URL: edgedb-0.7.0a3.tar.gz
  • Upload date:
  • Size: 670.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3.tar.gz
Algorithm Hash digest
SHA256 cd3336bb9a96191550b565bcaf354b4c23c6cb94b50e55c54da838ede8690200
MD5 7b5b07a9bce7919afe81823400bfafa9
BLAKE2b-256 fc526ae3bcf10f022a0aec987ba13e5d7926099018728426298b87ca6edff3f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 31afe3150712e1c6042505b088b4bdce9a82b2c53cb58ce889db39a04252f61f
MD5 76056aa508f04d78b193fcd8e7a71832
BLAKE2b-256 febf84fb2e06e6d2d9fe9e0969f6026daf829c857e67e6fbad8dfa5163215206

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.6 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a8293a9daaf662d9e360554e8fafe17d0fb468b9e4263338f612c771d4deffca
MD5 d60d0fc56545d8d8b9402743672effb1
BLAKE2b-256 9a3bd73cbe4fad5ec0bff307fa0af742ceca0aff57812ba4f44f70684dd1c709

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp38-cp38-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.2 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b191a9e3d807c3c05ba80872dd6c84df8bd548449696d9a6cef786c337246205
MD5 4d0c220ae548b63db4c8aae6536210f0
BLAKE2b-256 ef2ca8fe268d8bc2d1b33d8f6015b55e32e9bddbcfc9c1445264570e8780117f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.1 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f38b7760bdeaf19a04b4a6ab1581e49e084f0eb329dcc7c49efbe76cebbb46db
MD5 523f54f01cadfe080b155354eaa34745
BLAKE2b-256 f9fd8842fbc2ef0da1fd2f5f5ab2a212d95d702f34a54393fb8af04d3dbfb814

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.5 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 12a1463297b084039f4b42973e9937822f917efc25b769434443f2e571e95f1a
MD5 439fe8f6945252a55d24d7c980c1bd41
BLAKE2b-256 fea10e01c0ac4d15becc70157f035bceae001160940776187987e9f359b07ba6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.2 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2ca33775e1ea22d5960e600f9bedc78e1fad5b56ac13a16b819ef8a07b58ed7b
MD5 b6960fe20841fac98f8510f30d98ab13
BLAKE2b-256 1d4462ba581f4ed1a2d64aae1f6206e68d882120565506722ded3fa442b4938d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.1 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 3238eb8628948121c6ba995824a9bdccc7d678193938b1bd80ba34ebe21f4fac
MD5 01e663cf71e7b9d91d1f2e6a18f89fac
BLAKE2b-256 9823639588b4d35071e1eb18d3ca0da8938cb2c0d03af33498711703cdcff18c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.5 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8366937a631f80d26a2e924a1a037b494e9e769d00a4fb6980c06933b8a46c81
MD5 2df93b15e741d40e5c0f02f1b2cfae23
BLAKE2b-256 2c04ab528e65e992421b0a501f3a743628b434af84864d1d7011e002615f0247

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a3-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.2 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/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for edgedb-0.7.0a3-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 76674f580e786513b4c3043d6be5812c03350c80f20901d80dc549b418b98f80
MD5 86b5cc3aa993bcc65969a28882d13e24
BLAKE2b-256 411e1605cda11793cb852a04922817d1a1d2776c537ebe93bff41bab68f49e2d

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