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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

edgedb-0.13.0a4-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.0a4.tar.gz.

File metadata

  • Download URL: edgedb-0.13.0a4.tar.gz
  • Upload date:
  • Size: 761.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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4.tar.gz
Algorithm Hash digest
SHA256 a8b1312b7bd6b82a16798e75089ed13edad80b47817a6a3eafda4ff3679cd02f
MD5 1dcc03fe5ffc0eebf9b0d60400545af0
BLAKE2b-256 326d3d4256cd17d0a5a4d1bbfef1a8aa65493727cb867707483cb817a3bfd270

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 926e54f5bae5e966ba620a408cecd73d52b31c9c40d707bc854c0ba1cb79cae9
MD5 5025befc6c0e9286e14a296951b7282d
BLAKE2b-256 361006530f4c5aa1d361214ae0fa053d907770ead3457e89ac7d116ecf1cdfa8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f6b802bb61c5bb40e4367fade2aefa24d869af364d2bd0d6d7b784f843b690a0
MD5 f92a5059a3d227e97d515948aa72bb41
BLAKE2b-256 e243e1661e874d4a6966c5e4162ff198391b7c165c358ca4f902a99842eb3206

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 0f90e912953ff009399f55ca90259157cc036298f08decbc572d7433bf080181
MD5 c202c31877bbf00b98cf142592a0b7fa
BLAKE2b-256 74e2df9ea0ed9d2b7483d5c66e244edf4444da0f9862c8c1bb8b224a7e77517b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4abe99ccbee06e1b6a15e93c79e0bd2083bd815232f0399b413ba704f94fef3a
MD5 2101436f3c57698fed21f588e686c47c
BLAKE2b-256 d28a0efba0cf83d874c24cffdb54fd76034f0c24bcaa99bfc75686a232fb1c19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b92b1a1a5fd4885feac8bc46220064adda057744eb0b64cbe6639705da498bd4
MD5 f9a716a92c5a95031a657f3e676b289f
BLAKE2b-256 011a913fca6aa9bbdceeb5e10b082ad3407e9d09e52f84f97157579612fc2ed2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 51a8a87a8478ae4b73d6b75b7063c8f4e62546e880ba5e24772a16c104eefa37
MD5 3a4594e0aef42394d6ccfad2a67d9325
BLAKE2b-256 55a5b99d145f048af4e2c2eebc713bb0646ffa2978d93b4ba21bf052e8c73ce3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 90799dba99e94547b599aa903fe8515c965ce883c699dd9014d1a69bba6d85f5
MD5 d37379d0aa2751666cff5764c8f55652
BLAKE2b-256 286794a039a2d315dba4dbea56329f10897e8e3f279ce54fa8fcc068b5fcd611

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a3d4dc24219cd38f544955bf54ef38bf407dd4e7b94ac9b40e4599812384ceb3
MD5 4b42e50bfdf190514409e4954af7df41
BLAKE2b-256 f537c60cdd9230526f1c7042acc4659afb945d15d248ad9c1a57f8c54388a96c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.13.0a4-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.1 CPython/3.9.1

File hashes

Hashes for edgedb-0.13.0a4-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2bfd28bae2d28b2d0d77fbb1aafd4b1a9da772f48e7a3e10b56d5e85b7f8d0c8
MD5 b6bc75719065d8c9dd1b37f65cf979f0
BLAKE2b-256 fe2f70171f927323e4207d8f55d47fe4bacbbbe9cdf94932ae5ffa8b5382f0f0

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