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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

edgedb-0.12.0a2-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.12.0a2.tar.gz.

File metadata

  • Download URL: edgedb-0.12.0a2.tar.gz
  • Upload date:
  • Size: 752.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2.tar.gz
Algorithm Hash digest
SHA256 fa782f7d7c78150640c95f7e9b5c8072f93ae9285a380e464db91fdaf4cf2bba
MD5 b2d75baa401f978469844de77ac0840e
BLAKE2b-256 cd5eab112cf6e418388079fc55541b3d7b05552283456a5c5a2c7437913a297c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 07645d8cca6804c9754882767339a14ea50d86e96f77d22d7a7ce3644292a268
MD5 5237941bac193d3999b2a645d50bfde7
BLAKE2b-256 0e4306523ce762b3ec69ec4e1cbdb87663abc4dc4251750c447b1e62b3464e88

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e8b40ad3ed79bcb098f9d380b2ab45c9dd8a94f86cd4e45bfa4ce1da43330c0d
MD5 de9d956b800dd51672b56db1e60f8c14
BLAKE2b-256 0f9e3ea58ada805a3670c7966af0ea12249763341c41472f099b9d9895183b62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 0ff4376a647d913d1c2245ec198d902ecb346d09a6351d878b3c9c3b83b63988
MD5 710a833ff8123fbbd880b34c83b74697
BLAKE2b-256 190af70ccec1dec87eb58ec35ed2cbd5dd6712f82e0d69dc0579555331fe4bee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 95cf5060e7b7c5e98d06b2d9ae314e35bb50ca55520edc4fd8827a10a27d24a4
MD5 e324f427afd4cb6efb28857b257223b6
BLAKE2b-256 27ef13069024c08a56844754090bb2008792256af350328add75c5a06f8f62c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 281f561e66d5f955d1c984c91e04cd09ad7b5a882842fe104d4d5e73bdc9ec33
MD5 022c78015338ef3cb2372860df8bd137
BLAKE2b-256 d3e908dbbe3ded8e6e7cda66d5201af5fc3a816b26fad55bded67cf8b3279f12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fcbcd0af952fc571eb01a5619909aa5c935f24316920392dd3c0d06f14aebd4c
MD5 f99d128b12baa884d8988da00f50b49b
BLAKE2b-256 77cc61370f3e575446bae3690c1aac194666555bf8fa7150525b4c71618c2711

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 29567772d79b56845bda0d86970897eea0eb0fc7ebc885c46efbc93a0fbd79b2
MD5 f596ef100bab15e18792d89619879891
BLAKE2b-256 b00865cc001cb624747dfbc3d64c5e082698ef4c98b0c7ac07011b4953c5e752

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 95ecd274c30ee5eeee8d30068ea419cf0631f056d1e702b1a177655bab4ae086
MD5 c18076b28e05dbaac18c556c576a155c
BLAKE2b-256 d77315a183510499f8cb023ebafd31292a8384fd05f0f5e6bde1557715d0eace

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.12.0a2-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.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for edgedb-0.12.0a2-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2bb61f2e9468b5777ac53e3512148b930cd7fe33ed06bab7368e67b1bd5d85b8
MD5 eabe5d3061425b7c93adec216031d18a
BLAKE2b-256 97d5a62936bb2e7c8368e12e15204436a30a42c3ee4f0347866ddb58916129ac

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