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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

edgedb-0.11.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.11.0.tar.gz.

File metadata

  • Download URL: edgedb-0.11.0.tar.gz
  • Upload date:
  • Size: 743.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0.tar.gz
Algorithm Hash digest
SHA256 8c61fa5b48244a5599552c8268bc576fb87a6ccca78936bbff26041020655d71
MD5 2c503f05be1bb115739b1872d720099f
BLAKE2b-256 b6852ad52b181af0ac9177d8eb171e354d19bfd3417a8b50439f6ecf724b53ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1dad1cd8249077477fd60092e34f137eb3e9a0ab262e3eb18e0b1fe5e14a7018
MD5 49c161287294fe56582a2cd4cf9b8d4b
BLAKE2b-256 df27f4c7da914f917313d701a97ad85309d26af133a4b1ef9d4701272b85b035

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 35994f5f4d2c37a94dbcef06ed8513fff62b26d93ee189e3260c2f6f2b39e1bc
MD5 d0e5d0c76533f657cf96f94e1ec86c67
BLAKE2b-256 d44521b8d8427cce5c65cb0c5044c6ab1a8eae1126e355973378948fad2d3347

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 704089b36a328fe828f939e1d2e0ba26494c312fbe52678a9e395dfd2df5c711
MD5 c6c0daf4322b54100d5bd4afe627294c
BLAKE2b-256 2efa481a0e35752adc7367760240d7cb81ac939d9e6f2c225db8a84f3d3f873f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 741b856c88f0c7bcceb3f346eccc892b32297d055321fb3252ab194e53c2a7fc
MD5 e1ea2b9a417a19a38cc0832ed44ff003
BLAKE2b-256 2eff62280dde3eb48a7d1e55ff87d746ddd7641fc64cb4a5cc581650d105739b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c8a2bd479a94eb0b05138e1c519abcfebc54ec32b3f0f97708c96dc3805ef371
MD5 82d2134997552a23edcbd27830ae1919
BLAKE2b-256 c4b4e8c007b2774fd4734dacf4fc17fec8faf7811a6ffa571a13c21cb72f9b90

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 393c0116bfa775274a771ae61d4cc6d2c8a7025220354d98e802861f9a285c63
MD5 9055905c13716e3603dc540a633b053d
BLAKE2b-256 357088d8cf55e226d38abcbc9c5b43d3853d47e1d0e7a79aa76457f662ebb530

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 b724fab2658af25663bd2132f152e94304dc87a070e8650b188d9bbee0c77a65
MD5 601f05fb5fea7e54477ece2954a503f8
BLAKE2b-256 4d1d52eedd38aa97213804cb558aff9480fd2c84344a9b385c869638c620dd9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 84f24ebcddb933b1acc6c3ef0fc48018691d405be31dc75e59a7baa27f34c1d2
MD5 6e67026c41374bfa3c76ddb3f402c0d1
BLAKE2b-256 532cebf16fbc4d36fad2d131551eca54c2ee644d91b52148ab51bf557b4630dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.11.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/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for edgedb-0.11.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8559a6e5081d799715306a605abca6c1b7c2d87fdefe372b933b0cedb2a19a56
MD5 3aa958107dd5356834921dd28a110bac
BLAKE2b-256 6af09379658d8317d950d678a83f2da3813bc4faa7f286a477109561d5420567

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