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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

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

File metadata

  • Download URL: edgedb-0.7.0a6.tar.gz
  • Upload date:
  • Size: 711.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6.tar.gz
Algorithm Hash digest
SHA256 365d97581325cd653b2c903774795149dd9738d105b1def887ece741511f55d9
MD5 21c733a85b6d89ae3add6a97b194c617
BLAKE2b-256 e5177a673c122c3cedcec339bc86fa8d2aa9906fefcdd0123f8c412d25c35fbe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6252ca66374ca8940ed4a84f9b9402e66056cee92eab5d398de2f4a5aff3ab73
MD5 769a98b156efeddf6fb41555b472035b
BLAKE2b-256 26854c4ec81d8e687ae8897e2447077f10448b2705a1c923925fdea4aec25fce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c8bbea63adeec77528dbe56d1a3cebcf2fe14f81d28f5469731db63e4c0aaa00
MD5 b0165ea61a1f33181e9d3c46fc308d67
BLAKE2b-256 93317aff311a57218a600d24b187f399c557d1bf9f84a8f78b4854b182bccfa1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 cfe25ee2417a6b001c3e15073bf5922b4f760ebe3c3ff0f568ae14829218ed60
MD5 65a63067dfa581c0dc9cb0919803c87c
BLAKE2b-256 27922322871ac446dc02b945e3a2b73fe3f712f872314ba401c4f02428a5b552

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ef77ecc834654e6845f7767627a223da3c8f00682f906f6f0bd5838e0862e274
MD5 5045cf9b68ca5bc33778dfdadfca132a
BLAKE2b-256 f2381e6ec85691017235e73facc9c8ca670d4d8ddc71f8d17ff53bf6d4977463

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e4570d27f9e2ebd29c6dbe21f1332452c6723b6e4dd05d1472f3cae68eb8c99c
MD5 526ec33a231afa6bbf49f745199c41ca
BLAKE2b-256 e72e8550f3ff6f5ca5f5ebb9f8de6bc2e9f7fa86da62264959cf1647dfa9fe57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6a74f3c79c948ccbd7ee52471c03e118520791c687fdac34779d2e96736d3246
MD5 13f4f52c52e27ecab65f7c15d8baebcb
BLAKE2b-256 874e4b8b948b00bd886616d5b41c12ecd08641ac879fecb623d5542f0a750937

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 6171ebc23e2d25b83f191b1bc3b21b95f0116b22d56b505f4b4fff30b98f3c44
MD5 9b1dbfc9a03813b8721a2e2ac6282620
BLAKE2b-256 99ce31a4dcf240242f47f4ade1da450c4d7f82fe640020601b571b9b7855ceb0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0c9c08001cf40f1a879cc282132b8ab4d0e2e81b5146d2cb301b8eb8f673d86f
MD5 fb6c120adb04c2d80e58e7c46fa823c7
BLAKE2b-256 46033cea66e975c56000ae6b47dad7f0e9aabf3e8fb5f37e1a3c5b883a99b7af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.0a6-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/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.0a6-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2fb8289c2ae00511c39706595d5428781585bda6ebb8095b3559e01c38a06a2a
MD5 0e2980acda3703d450a6ae6cf247bab7
BLAKE2b-256 ecd62f3f4111e206b05d0bca77247b545aeec6005d4aa888e11336f3fade19fe

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