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.7.1

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

edgedb-0.7.1-cp38-cp38-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.8

edgedb-0.7.1-cp38-cp38-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

edgedb-0.7.1-cp37-cp37m-manylinux1_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.7m

edgedb-0.7.1-cp37-cp37m-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

edgedb-0.7.1-cp36-cp36m-manylinux1_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.6m

edgedb-0.7.1-cp36-cp36m-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

File details

Details for the file edgedb-0.7.1.tar.gz.

File metadata

  • Download URL: edgedb-0.7.1.tar.gz
  • Upload date:
  • Size: 718.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1.tar.gz
Algorithm Hash digest
SHA256 e7726530dffd13ad99aa7b2ec872034ebbcbc13b8a2783db7f9e77efad7b3b24
MD5 0ba7079fda120b0a59e1636e3efc29e7
BLAKE2b-256 e79f8a75ce31b31c2aff8e183ef667b082f2294507b0b1ed84c8fdcbda1f5f81

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.1-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.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5e3b2e19338679a50c3c35e34f467291bd0b009828acf7f3a3c053274cdcccba
MD5 448525ad2a2bbd0e81469d1179f1613c
BLAKE2b-256 a817882cde3b62be847d22529868c63e6b42f9eb22adff951f4651c721892cc4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0475ab09bb9b75b4610aac0be23f20be5d0dac22be37838aa7be6b992ea0e476
MD5 a9d0a4e28f731c7ec4434497f6da539b
BLAKE2b-256 5585ffa4b488d52ade9db657380dd794dc2e1264c7326ebcba660a2c080faa77

See more details on using hashes here.

File details

Details for the file edgedb-0.7.1-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.1-cp38-cp38-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.8, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9c6bcab8cf65d6b8b587af8e2b2fdaa93e5755cd567a38bfbccf860face4457d
MD5 1cccf398c58eea9d1c00d0f1a96d251e
BLAKE2b-256 35487df4472b857c9b7cabb55c33f8605ad3c08b2b59149306f94159959cc553

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.1-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.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 aeca09bdb3506eeecf621802a1b7b857a12cfef8164acf1a1cd2845963c82ee3
MD5 fc8d9714578f7a2f992565ea31e711d8
BLAKE2b-256 7ff7e5b1cb3fad98271a9fbb773f1299227ef6933882952f41532a01ef9f2729

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d91bc408c7e1926675eba2a42a7290adc566f238cc093cbdaba18e7013e4409c
MD5 84f0437ae80f2b2920e77455a3dc275c
BLAKE2b-256 2f2d218c4160efee937a0bb39e4252a3d47d2010c6572ba32fc15be150f47afd

See more details on using hashes here.

File details

Details for the file edgedb-0.7.1-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.1-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fe684f73088e3d63a5fef30900074873ad889061b4febd2f8d5521ad2fa45f2d
MD5 b1acdf18a615259009f490c508c3f701
BLAKE2b-256 9ce25b3ef694a7d259ea1d22874663417546e22bb91962cfad86692060a23193

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.1-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.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f4a460c963d66bd838f965aa68cad5f8f2bb63adac028f024019a0ab1d748704
MD5 e5186d4591dc83f7d08fc68ad2a9161c
BLAKE2b-256 67fce8b006331e3e02b5acb5505d38b729e9f39adf03bb9f085e46f7ff116a7a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.7.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fcc5f96488bae0fc3ed9026e7a2d69be2d1231efbf4b907ab307a6621d38dc5d
MD5 21cf43ee5a58672d9cbf673cfa5ab7cd
BLAKE2b-256 ebd688e83db837153b8b39a6b141d3484a00970c407c30d7f28957e326e060d8

See more details on using hashes here.

File details

Details for the file edgedb-0.7.1-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.1-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 af0e20592e4667ec7696b8ad72879eb02cf108b16b4d3e745f6b2f51e6ce71b7
MD5 742a1af3e41a1808a8d9ec26cf4bb5e8
BLAKE2b-256 dcee047eb4b84182455cf08425e4f2d1d997700155229bd568e68b77fe0b9d8b

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