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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

edgedb-0.9.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.9.0.tar.gz.

File metadata

  • Download URL: edgedb-0.9.0.tar.gz
  • Upload date:
  • Size: 742.7 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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0.tar.gz
Algorithm Hash digest
SHA256 4d38b77dfaf852744c4748fdcb8e76b9bafe4ddead09eb4a89512e8babeb0761
MD5 16cf8a4508f3f781b77fd851eaa7c4ce
BLAKE2b-256 68d17ebf8b39598f761c8c346afa0bfba6daaee48dec8f81233b24693864d8bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 449a35b8ee515ea622502fe88eb621ab2cbe05da01dd7df05affcda19e2f7236
MD5 922661024ab51a84b884f3d63cb70950
BLAKE2b-256 fa1357c1a1a994813733438237e83c53f6cedc40bace9594987e834cac97a0ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dfbd96f79e525eca247f8618297e218ea87a4ff3d21db5771af93a3d921813bf
MD5 28a6e85bbed898e01fa8212956ed6889
BLAKE2b-256 7dbd6f9a1a3b08149e3693ed6f495fdf5e1d0589571ddaf00b121b7e13b28feb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 170b49005c38c5f4455a22b572568db6aa4e78a6bf780f4b4fe75ee00d1f7f7b
MD5 37230fdd572baa1edb78eb89cd4dc423
BLAKE2b-256 972c5b09f333285b418aee237dac376cb4ef1c9e1a4e45378e5c3906ab0e992d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4824e8cb0361fd6558a09cd5f4d5493052c53af3ead34fb853922631c90ab954
MD5 495227fb7a19dd98d884df48fc8ce266
BLAKE2b-256 f27d12f8f7b7c18f41035f320c2d3b3f3df599085bfe2ee9f77a9a89394b31cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c3db73e3394114db8ed273e677e7c8a6b7786278c9aa456e18397a8d70779734
MD5 bc7793642511036567f24099fee2c3fe
BLAKE2b-256 dd3151adc217a391e045284c56e6b3145df0a0a7f3e0cf1182a69a5d91345709

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 1c86df5e174973ca44b53fc1ed5e73c34cccb0c1c23d5886384f30f83b7363cc
MD5 fd8a1c39ea0c1eb6a1106374e61eed0f
BLAKE2b-256 fbc90e153e17b1e5ed7e8b4d769a7fc33eeac331d0495f786437002e4db87d9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 7d5afb2b02a72809f9decb3b3d84a7b6b0a80b6f945b22f6a36ce042b126f73b
MD5 1a735a67f356ad3847e70b490fb270c4
BLAKE2b-256 f0b1aeeb7d34b5ea0d9ad51befe1bdf57dbb1d27245fef15762ef5d881c9a03f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1295ff53a8520daceabce1d1b6802bfebff842ccda4e60b4655cb93c1743f9fc
MD5 248bc17157ed62d141e8ceff9a920ec3
BLAKE2b-256 7ddeab704c21ec4b30302dbbecc6251d0fe6c8e961604f8bb5e9ab73dc139a8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.9.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.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

File hashes

Hashes for edgedb-0.9.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f3a9310eb33a0e090101efafb42cc190f15b6674db6bbcff35fe952eb6e4aa6e
MD5 b8656e32ea8ff58668ddac6fb048334a
BLAKE2b-256 997c7316e122c8e63632b967ae8dd4d9c3fb14a32a9430b40ec96c624195ad80

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