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.7 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():
    client = edgedb.create_client()
    # Create a User object type
    client.execute('''
        CREATE TYPE User {
            CREATE REQUIRED PROPERTY name -> str;
            CREATE PROPERTY dob -> cal::local_date;
        }
    ''')

    # Insert a new User object
    client.query('''
        INSERT User {
            name := <str>$name,
            dob := <cal::local_date>$dob
        }
    ''', name='Bob', dob=datetime.date(1984, 3, 1))

    # Select User objects.
    user_set = client.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 client.
    client.close()

if __name__ == '__main__':
    main()

Development

Instructions for installing EdgeDB and edgedb-python locally can be found at edgedb.com/docs/reference/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-2.0.0a1.tar.gz (923.2 kB view details)

Uploaded Source

Built Distributions

edgedb-2.0.0a1-cp310-cp310-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

edgedb-2.0.0a1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

edgedb-2.0.0a1-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

edgedb-2.0.0a1-cp39-cp39-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9 Windows x86-64

edgedb-2.0.0a1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

edgedb-2.0.0a1-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

edgedb-2.0.0a1-cp38-cp38-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.8 Windows x86-64

edgedb-2.0.0a1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

edgedb-2.0.0a1-cp38-cp38-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

edgedb-2.0.0a1-cp37-cp37m-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7m Windows x86-64

edgedb-2.0.0a1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

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

edgedb-2.0.0a1-cp37-cp37m-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file edgedb-2.0.0a1.tar.gz.

File metadata

  • Download URL: edgedb-2.0.0a1.tar.gz
  • Upload date:
  • Size: 923.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for edgedb-2.0.0a1.tar.gz
Algorithm Hash digest
SHA256 baada01a23440b83d035d1ebb7d231f68986dbaec06147361072ca4feadfd043
MD5 db8065f91daf1541dbd6a150e0f82cf6
BLAKE2b-256 34f629d0b52eccb953c86ba776b4de1d3d902c186e3e137785a915249e5c43f2

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bef8d15e2c6b0954208b24a2e31e066ddebbc00a19459b528308d749b1ed9c31
MD5 431cf2dc75c83d5bdbc1388e627f4e35
BLAKE2b-256 ece83f960cbe0e83f81ce1d326335f52128aa76ef2d540439341d5c2d8dd09d8

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 97edab4f1a3fd89b86a6e750e64490c94f5d5d89124beba960d1c5f355904498
MD5 47119fb42970a155bbd1bf456bd3edde
BLAKE2b-256 606f446a44d36c2b3910beb5c6d7092d48ce923742598fc68ee5278ca052c1f3

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8b10cdb4105fd5b0454793706279a413669696a12977ad8854e547411005fa36
MD5 5d55f7aa5516d08e50c71471d4231038
BLAKE2b-256 15ddc1b65478d952b000e9a2796372b2ce998f76c68689d02f3dcd4a253ce4ed

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: edgedb-2.0.0a1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for edgedb-2.0.0a1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4b18637e673fbb058f3f5f4832185768723b15e5bc3dad016bedcd718bed42e1
MD5 4ff18b67f007df4e682655eae20e4834
BLAKE2b-256 3d2fcda268642ab37bb1e5152c89756cc51e468fc310011c9ffd97d29f7159f6

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 076fbc928046f3427ac9bfb3535632e19e4a11d04105c935fc1e1d4fd4fd5e7a
MD5 e9d8a9c92aa4eac560ecc03b5c34e223
BLAKE2b-256 a34234564a99c966ab42a2bc3567750f081c21709d56d6b8cebadcf6f914a643

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5540f93a12e67e2cf3c627e59ade61773f478cd070a509d6ed1e659d58f8303b
MD5 feca5b0a9eb052bca5b0455852e81063
BLAKE2b-256 845556c4c71ae919f4405e75814286df4e5fe04cff9189dc9c384a223011af54

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: edgedb-2.0.0a1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for edgedb-2.0.0a1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ed151bde4f106ee5e3240264143972e6c58aa9d41a598291e8390d1540692440
MD5 418e07b9dfce6fb5330289f3c92bd0fd
BLAKE2b-256 5ac49f0d413b640594c85fd913bd9eed7a6d6e652dc37a9ca33ade5e9915d20c

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67caf26c67f45459bf338afd12e67a560882ec542244562b38b079b450c47a02
MD5 3b38eee2acc10c0a964d15687ebba934
BLAKE2b-256 a36fcaa56437c0c951defe0636683e5f1abf50c51c64fac5c7eb93469f4388d3

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d0574ebb572af6b2fde47c1afc6e2dc5d8ecf5874ba241309002895ce537c20e
MD5 54a468550a2c8a6a1df372e3376cab4d
BLAKE2b-256 759027eb2ae6b6f631680247fec253045834298b155a996d50aaa6ca901a3d32

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: edgedb-2.0.0a1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for edgedb-2.0.0a1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 aeb31297e4f81f87ad3e737727137de155fae2422710b3b80c59bef0bce0d940
MD5 69882df2d78737fa4dde2413a7e1d3d7
BLAKE2b-256 0ebf44d639de24b250add6995a328722de26c8acd816a7b4b2b209b7114489f3

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fd69cd8da165a7ff54dcffe6c394ef213ada18c7fa63bce8684ac9d964646f65
MD5 935603db5540cb22c812e1d336cf2cff
BLAKE2b-256 f9b1f7eeea323e793dbfe74528df4986ba0e9390b7c2296f0ccf13e99380016e

See more details on using hashes here.

File details

Details for the file edgedb-2.0.0a1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-2.0.0a1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ad129869fec795b8577686e3e570f036e3c44f152bd1d10e68180dd10b7a0818
MD5 297f3868026410ce57472bcfd40caa13
BLAKE2b-256 188a7d3e5e7278cdc2eaac149b125866f5eaa4ee8208eb22070970a92337458f

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