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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

deepfos_edgedb-1.4.0-cp312-cp312-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.12Windows x86-64

deepfos_edgedb-1.4.0-cp311-cp311-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.11Windows x86-64

deepfos_edgedb-1.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

deepfos_edgedb-1.4.0-cp310-cp310-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.10Windows x86-64

deepfos_edgedb-1.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

deepfos_edgedb-1.4.0-cp39-cp39-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.9Windows x86-64

deepfos_edgedb-1.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file deepfos_edgedb-1.4.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for deepfos_edgedb-1.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d0c56c428406282d6b0650802d437c983bc5fef0168831e214e32cd6de157a26
MD5 d989602d53ffecc898a40c06f7054749
BLAKE2b-256 21d820f4959355618bc1cd266bb6c35d94e6e156993560a71b6d83a78385de92

See more details on using hashes here.

File details

Details for the file deepfos_edgedb-1.4.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for deepfos_edgedb-1.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4a8569b3c877ddf01bd91f6df10bc8709df6a482b9ce842c60bac750b19168ea
MD5 c504d9347596de89184e09f59e98e016
BLAKE2b-256 bc680d660a8c52bad4993bda7a1f73cc6ae242b0165954ff82ac1430ac013c30

See more details on using hashes here.

File details

Details for the file deepfos_edgedb-1.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deepfos_edgedb-1.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2edea5a7dd62317795bddaf615425e62702e015b02f70dca5866871c24c1fff4
MD5 9214d55fdfe52b9d5dcf2c038f779447
BLAKE2b-256 69a57830c729d50f17f4352f8da2142c169060e00c03ca374e4fa36ad1fcaef2

See more details on using hashes here.

File details

Details for the file deepfos_edgedb-1.4.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for deepfos_edgedb-1.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 13e09143ac149718ec69bfbfbb40fd7d5ccd483a04fabef589bf422112bc43f5
MD5 cbc464fae2f5cf05e881bf4f2b3602aa
BLAKE2b-256 a187ded6d7595b9de0cd47444bb3faf4b892ff606d4cad0733dee7de51524b01

See more details on using hashes here.

File details

Details for the file deepfos_edgedb-1.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deepfos_edgedb-1.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ecb8f93383880ca86af6a1032aff066ca301f7babab29c626d2a0466fc3575e
MD5 835ee0eb5e4a27502f340d3c47c7e57c
BLAKE2b-256 cb81e87e99d3ee18f3801292b87b7c2c7c5a697ff002f68020ee8c3c6bb063f7

See more details on using hashes here.

File details

Details for the file deepfos_edgedb-1.4.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for deepfos_edgedb-1.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cf7efb271f0fb38e0ca1d3cc48495d2eb00c72f8b93218879d5bd98f08360216
MD5 7ff60dff2928fb31b9a7bbb1c0c7ebd7
BLAKE2b-256 c7b706f538542a626a15bf527bf4f53b26a0ccabd60bc5169b57c6d028490d0c

See more details on using hashes here.

File details

Details for the file deepfos_edgedb-1.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for deepfos_edgedb-1.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a227e395ba381bd1f4cb90f146ee84eea86ee39272dae7859fe98351e9680ac3
MD5 239c12ad3fae670544d4fede6bdbc639
BLAKE2b-256 e678ffdb8a3ae17331bba5943e3c31d68806cf494973b54cc98d1d47e76a66d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page