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.13.0a2.tar.gz (759.0 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

edgedb-0.13.0a2-cp38-cp38-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

edgedb-0.13.0a2-cp37-cp37m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

edgedb-0.13.0a2-cp37-cp37m-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

edgedb-0.13.0a2-cp36-cp36m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.6m Windows x86-64

edgedb-0.13.0a2-cp36-cp36m-manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.6m

edgedb-0.13.0a2-cp36-cp36m-macosx_10_14_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.6m macOS 10.14+ x86-64

File details

Details for the file edgedb-0.13.0a2.tar.gz.

File metadata

  • Download URL: edgedb-0.13.0a2.tar.gz
  • Upload date:
  • Size: 759.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2.tar.gz
Algorithm Hash digest
SHA256 9f17ec5d1eb549c295dd807fea7e2a3961051c471a924a15994698b413b2a8d8
MD5 6ae8ec2dd4b0e2f0fa9cebf7be1cefad
BLAKE2b-256 f6aabd2530a1004dd7eb81edceec0b85a688325eca346b764574271f968e3c72

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1df818b1091128c874a8dd506d40b420133df8357ebf1f94c840271f1a5bd2d3
MD5 1d41050d46a7d0b10a7d3b9aaccadbed
BLAKE2b-256 05b5ca4545be247197fa3a50f0159229761096e0fc35ed24be9e0ed340b03cd4

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e70c4121c650e0255838cbbf4fa7b1944520aa95112b6ed956b03f07a715f667
MD5 e8f7fc2c5e859942e84e8a0ca556fe23
BLAKE2b-256 6105e550d90e7184eace43e9dc9c0e96b1ef137608044b015b74339a51209c87

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 32c3dfc0957eaeffa6290e5bc92d7563cb5f5cb900b1f94539093c30b2bef8bf
MD5 748eaebf61084b7920f18802624b08f0
BLAKE2b-256 a0695cd01643ac42498e9787519ad8f4ef9d6b2d66288717985728983934b0d3

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 734aed5d2ba6b9fe941170806d8aee9b2f90ccad11da1abb4a6e671164fea1df
MD5 e1160def04632b23e24b6e9fc86faa72
BLAKE2b-256 80df4285d53d89df332d63634aab8730f324ec084acc81e2bda536abc264fab9

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fe1f1c3006197651d5c0bdd5cd54e295f69a922c3816767bb617da08eb46ed93
MD5 3bbdcad9cbb733a8272f8fef6463048f
BLAKE2b-256 2b1961b4c597cf8223ad36fc3ac5024bd4c430a0aba64655b16b70b08f9a6201

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b5cc83429b251f866ef670a311bdedb5a19061e8bdfb6c5decdf29940d466a34
MD5 948b3af1517e3c832c3622414cbf4ff9
BLAKE2b-256 943f79dbc1cae669bfd7eb7aeb8ed8637d83bdad901bf63caf5d8c457b00f490

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 50ce601cc2eba90c14528b03a7cd49f9fff179bdd41db01a3bc6d72d84163465
MD5 3aca5cadde3e9bd7e34a62ef17eca708
BLAKE2b-256 e710d3da089afd30c56ba68c8d4224dd9d3e0ef9317c246bdb671a616a7e72da

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7aa7ef5d228058c8370eec4f660a65d8166f9c18129b0b78b502242e3ff3ee0d
MD5 57266073fb07f5bc5017c2bf935c25e4
BLAKE2b-256 1a74cde8de0dff9ea23aba61b6cc86f59b86062a0ef78755d3fdcd495f74939d

See more details on using hashes here.

File details

Details for the file edgedb-0.13.0a2-cp36-cp36m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.13.0a2-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for edgedb-0.13.0a2-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3469f6494edf8bcda69d2cada6efde33440af700645078084bd52444435f02cd
MD5 111ec613fc70c3687b0e1f24948e4136
BLAKE2b-256 d988333770659f4e9f851475d9942b8a8c6f1356ce2f27f88ca90cf5de888716

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