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

Uploaded Source

Built Distributions

edgedb-0.17.0-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

edgedb-0.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

edgedb-0.17.0-cp39-cp39-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

edgedb-0.17.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m manylinux: glibc 2.5+ x86-64

edgedb-0.17.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.17.0.tar.gz.

File metadata

  • Download URL: edgedb-0.17.0.tar.gz
  • Upload date:
  • Size: 785.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0.tar.gz
Algorithm Hash digest
SHA256 b6e7a63828b5c984cea66ebc9b34afc8bd685357e262cb46d9398c10599b566c
MD5 d76319a6b386e7cfd226623042540e3a
BLAKE2b-256 2a3fc6f0f9df00bd4fd032843c9daf97d041b81b05aefede068280b3a448692e

See more details on using hashes here.

File details

Details for the file edgedb-0.17.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.17.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9abae20a8efbc9240bdf2a000cc57ee40503dc02e9d14c9e260432f1a749cc8d
MD5 fca1df8e4557937517559e2a87a6799c
BLAKE2b-256 0c0b1daf0388bb8e4c5676c92fb564e46c1e421791ebdcdbc1da430df3af1552

See more details on using hashes here.

File details

Details for the file edgedb-0.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1f0d3279c68b6ad6c99148a49c9bc5c1d274fc087398da623d78540f3c140365
MD5 917377d432d98de888e00b12c5dd2183
BLAKE2b-256 66ccd559d2e493762e33586240243a16e746d2b9f456c0bfb903b2b448f3d7e6

See more details on using hashes here.

File details

Details for the file edgedb-0.17.0-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.17.0-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6e98ccbd490518c478a358883092735fcec8e8483dd726d4622b62423b67cfe4
MD5 0b028ee6e0de8a91bb8081b6696d29ef
BLAKE2b-256 68fc85237f4c0220ab3d3ba6d08e0975a0ade24a7d0e7e2e1edd4756af5b08f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.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.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 986570ad2f0117afd534b74f906d0bb39f618826812867279c195b8e7fb34f04
MD5 f73a9fc2d68b29ee66719c06898a822c
BLAKE2b-256 21f7105fc07620455c9d3535bba5b4cffaeeb2cf4a1a27f66b0d7414d197caf0

See more details on using hashes here.

File details

Details for the file edgedb-0.17.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.17.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3cc13b062af5ce74f83092ac1608df67f4c91c09b25d2f42258d2c0c08c06619
MD5 cd4a5bb158d8a2a8e763a62feccf46f5
BLAKE2b-256 dd9f443aa38f2d8b8883a7cd428e44bb3756edf5219d876767f1be34fe700f00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.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.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 de3bdbcd30a2bd24953a052c17c5d6ade18283caacaebd5211c382ba4b13540f
MD5 e8ccad6e142aeafb93e5fd92c19e8c65
BLAKE2b-256 c4af204a471bf6cdfb1a252245953242516e2adc6323b2e6e5ba9b37e9e4eee2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.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.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2232a382d560c6370012801257077bb68d0572008cd7403073ba3a4abd66b372
MD5 f6643388982e41946401099120d6bf98
BLAKE2b-256 b0582cdadd6e41aeda444864a03babc6aa9366782ddd354e32c79309fbb40c26

See more details on using hashes here.

File details

Details for the file edgedb-0.17.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.17.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 352b35ef3e9e0e1f20f36409d53965d77a977d2ca2ce1d5f65e18d8a58bc4ee9
MD5 813389844922e4d6f47d466c45fee14f
BLAKE2b-256 75504cca39f8b149d9c5946616eba2cffb0f0e84532eb1ca63b3fa6a69fa27c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.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.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 1aa42bcea0a67cfb0df0141a3a2326a6498b4b7430e5bb3afec10b8431a9846b
MD5 f60ac20e850c923a1f9cf0646ca38dba
BLAKE2b-256 8b59a243a91c29498fe7ecb23375a70678b4d1b6fc594f966e3c8daea47620ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.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.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 b14534d1c3eb5b2258a019c871209f4fc4a0be4ac4cc83f9c76c67e3ddb032b1
MD5 e42440661eb2ec34e908f588413281cb
BLAKE2b-256 ac4753fea2d3a3f3af908b7976d947ea8cc97cefa4a8f08af1c71a3ad3a6cd74

See more details on using hashes here.

File details

Details for the file edgedb-0.17.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.17.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b1214815cb21d32bc056f7a98ea164711631928a1de863a5fef48c992347e109
MD5 50bea5df6eda2c6f50c1cdca780badc0
BLAKE2b-256 21ef05deea743649bf892b8008f788f3896201dabf49791b13149a5ff09e0076

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.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.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4bbd55781367841f7088abc12d8a9a480052536dba5874e688d109cadeb24a92
MD5 0923c192d196a6df1797317e3bc22a38
BLAKE2b-256 6aa6b9b64530b306e411b802ff646589f7b04229bc4b15296b8d3aae795e3843

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