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

Uploaded Source

Built Distributions

edgedb-0.17.3-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

edgedb-0.17.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

edgedb-0.17.3-cp39-cp39-macosx_10_14_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

edgedb-0.17.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

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

Uploaded CPython 3.8 macOS 10.14+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

edgedb-0.17.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

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

Uploaded CPython 3.7m macOS 10.14+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

edgedb-0.17.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.5+ x86-64

edgedb-0.17.3-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.17.3.tar.gz.

File metadata

  • Download URL: edgedb-0.17.3.tar.gz
  • Upload date:
  • Size: 785.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3.tar.gz
Algorithm Hash digest
SHA256 cdd7c29ed9a3d5a4db74797e5f3b347b7687d834b772d5491ee65f5edc6e1c6a
MD5 a66bff74822fb63bb7ef06768968a723
BLAKE2b-256 cbbce846ed70ab89cfd007fb186330ce74e57c7a05b95aab5360d0b68b16e68f

See more details on using hashes here.

File details

Details for the file edgedb-0.17.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.17.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6f58a7eaa87f8df135ddfd8a9995889d5a275501ecb57b5858e28ca34768a6e0
MD5 b41549c33b5c7c0d9ad671f6f66dba87
BLAKE2b-256 7bbb865746efd86903cbf72270e0d38493239fa830845eebabefc1480ccf0f0d

See more details on using hashes here.

File details

Details for the file edgedb-0.17.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.17.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dc4e863d34c30970f37890545e4fb56f14a5e836db82cf5198d203109576dbed
MD5 959f3cd4cbd4084d96477674f316c1de
BLAKE2b-256 038618f1e24b5d459ec95cbf80925ca97e979d7cc4d9c92143ef4c5e3df26926

See more details on using hashes here.

File details

Details for the file edgedb-0.17.3-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: edgedb-0.17.3-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8ccf7d90a96e0879ba7e7f89b4589fd80a8477249fddd992bb4c7d0ab83cad98
MD5 18f2f176913ebd1b4f361aff7dcae21e
BLAKE2b-256 a306c0e9d47827f2e282d43207b404e7ab64132bc8f992364adb2b562727b54c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.3-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.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e22431323c9cf1c0ff9cc4aff5b0267f693b92685bac886941be57556972fc12
MD5 c1a43d3c1f13155bb91cfb5b61d85c28
BLAKE2b-256 b326bfe82b99fe83a07f276455dc118bde5260779a0cefef4e098a2517fc4a78

See more details on using hashes here.

File details

Details for the file edgedb-0.17.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.17.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4d7d9242d43c5aaa963bd764f630fff59381ae8679677de22f85f05f8fc3e213
MD5 d1674b99c12acb5090a50b68345e3a1d
BLAKE2b-256 d7556167c1d8cfd8601d6ca411906aa5d6d374c6b647d803c0bd8e1130b10574

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.3-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.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 176f50891e802938cb6b770f60b7123b90d1e96aae6db91e086941011f681efa
MD5 92c93922f6492c7e6ca64f82ce0b6df0
BLAKE2b-256 d9a0e564e5e986d4610d2a634c42cf20bce6665ed1b144c32f9a2b1dd67636d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.3-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.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 91ad5d458cb3dbf5ea5af72c3671868b78325f1cf6a9bfb1080403d587cd5994
MD5 a8e3b8416231078fdf8f9ecf954f904a
BLAKE2b-256 11fb9b8651caef1c483c8a4238b73b014d56ab3765efa7799869fefa00cf3976

See more details on using hashes here.

File details

Details for the file edgedb-0.17.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.17.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 07d1f3574d639caf680b6d333e14074576a5c089aeeb21e7a6f9d3f15e9f514b
MD5 8191c26c8ce6829ccb68f539050873b9
BLAKE2b-256 0f082f5c9bb774127303c585e30812dac5fc16c96f9a39f17d8190e411ab0baf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.3-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.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 0b91d40e714969cdc988667b9ad5eff6ebd0631bddc1f13d9eb6c9df36ff070b
MD5 a6cc18aac8bec5ac290cc24d3d05ace1
BLAKE2b-256 8a880e0162673e1b5c4f924e4d143116301587ed23b51938014c745a276149be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.3-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.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2658aed8595849f7deb0d0f238bd91ba9a86b1265935dd6bfc4eee7c3b059d2c
MD5 41869f0e3611dce7bd883d8e1dcb26f0
BLAKE2b-256 4d3e335457fefa69579667c8e4050e2833241d9747781a1906a61f0c7706805a

See more details on using hashes here.

File details

Details for the file edgedb-0.17.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-0.17.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 96011f28097d81bfd084242b4d0ffe597ddf64328508c6e94b8c9d846effab98
MD5 abbe0c81419e721f3bd1d9edf472db8f
BLAKE2b-256 249218535e6007089c9afeeff6c652b96ff26285d4270cb22d631ee5ea827085

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.17.3-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.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for edgedb-0.17.3-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 80a939ff06e79ff6921eeb5329ba9d8ce3a4155ea23e453bedca76a0a8545183
MD5 239dc3cf6800e310aa8da34fe1c68f88
BLAKE2b-256 890bbc48d005550482971f2014cdeff6ed0f9d665339e03ae32efd4384131aa6

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