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%20the%20community-on%20spectrum-blueviolet

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

This version

0.8.0

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

edgedb-0.8.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.8.0.tar.gz.

File metadata

  • Download URL: edgedb-0.8.0.tar.gz
  • Upload date:
  • Size: 740.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0.tar.gz
Algorithm Hash digest
SHA256 c18aff37f93dab3612c41df25cfcb9e71355a585d5134e72acfa944386313591
MD5 ebc31087b9ac9c44edd394ae79cbede1
BLAKE2b-256 9bd05f376561e006dd3b239b8326c784aa0dc323b757a89b9ccccab00a4ca6ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ba55298c0a71a0b627c88aa530194bbc200bb83a2aef1e34702464fd7d2c9cd6
MD5 3b8c864c7b2b68740edbf64c13e52239
BLAKE2b-256 580c14a8a0c8dc2019ec7ae6d4c46f06a85f5835bcccce32bc2cf00e02507472

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 883a423d5aec4be089e42d8b506caa229f67e7d75374a3e0443863756684462a
MD5 af6dd8a95376997ff2d9c35ac00a9e26
BLAKE2b-256 38cd4c8e97a6ba2677b47b0dc36d4eb994598f1dbcd746ca48c36241d1e3e50c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 55bcd6f927a4aff289b420cc21f7a57ce46c6aa3e55ead124c1261d58ec67e7e
MD5 6a49ab120405b00abb4b4b3b2ade5ff8
BLAKE2b-256 1e5a52a4fb44f451fd4aa46c74e98167f9f506da1d5b0c104332d4e3ec1cdb92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f6c6105e36ec5c79fe6ccca3bcf0021550dd11fdcf490a24845c668c44d84b59
MD5 5b32a7749f974daebd111a5eb4f632ce
BLAKE2b-256 73a10d76d9945ecc651b2e309075cf4f36f81c2c5b26ee8b62b859d362ea7853

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 66bca7c4fb49f7a2756b24e2871b564a8e356ee3213668656e0c327f04afcc86
MD5 8174d3133be2392146f432054dedfacf
BLAKE2b-256 bac81640637beac3139675ba37e046c6629e564fe95c33f023f916cbc84a99d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 606f4edfc8fb656e62232d505a435e159f2a9a6021396e48c3edf80556eaf695
MD5 54daecce7d131c5e0afc93a221f8a05a
BLAKE2b-256 2b44ee2d926d86aef45828a1d2769ed99e23ff0b02a17173670d7a25f48bab3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 d57eda35fa1db021131626324dbd3c5989379db116c221dc117cef785246714b
MD5 daf6b62724bef5d58659d7c56dc0431d
BLAKE2b-256 84a7b17e92c5c7854b217cc7bfc71d7335f2e89e506182e5fbb7e4ce63c2dc6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f8800e30641b458710ab3014859d527fbdc30d27ef7137ed8993ddd5ac49cb1c
MD5 a388fa8634e143150eb3200daf44ef68
BLAKE2b-256 2853774cb90297c15f68f932544d029d3eaa5bf9cf6c42d55389e640773e2e7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.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.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edgedb-0.8.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 122c8dd8457fd1440e646c2a5a3fcd6f1cd831d043721cdf3dea8bf3ca3b631f
MD5 fc7829a1e7d7515c62995d7f2949a141
BLAKE2b-256 8c3f0a6461a515db5bbd425dfb679a81ec00506af2b891eaca7dd0be69e3b3c6

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