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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

edgedb-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10 macOS 10.9+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

edgedb-1.3.1-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-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

edgedb-1.3.1-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-1.3.1-cp38-cp38-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

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

File metadata

  • Download URL: edgedb-1.3.1.tar.gz
  • Upload date:
  • Size: 926.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for edgedb-1.3.1.tar.gz
Algorithm Hash digest
SHA256 96b9b3da2ba39c2826b1413b23ffbfe51839374274bb24b735fcdc9644c6110f
MD5 5a2a47816bba1b9ac64d830f774b9c8b
BLAKE2b-256 9b7e78cb0ca8160ef0ce685784e1585bb951732d6e3ed4caf1b6cae95c7a70cc

See more details on using hashes here.

File details

Details for the file edgedb-1.3.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: edgedb-1.3.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for edgedb-1.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 614bb89b5623c4921d74274e86d696360782d644d33d0065d86a4f5fca5e3b45
MD5 777b6440a5c973826c06dd9a4d0e819b
BLAKE2b-256 c67b6944bc96bffd1393dd63cd864df51ac79ae59cbf666bc1cb6513fd4058fe

See more details on using hashes here.

File details

Details for the file edgedb-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 41e970880e341715a38f2c29c07d081b4aaf4c5f7cdba894b9a07974d6878cdf
MD5 5346d3d9dc3d0c6f8e8f59a86e7cc760
BLAKE2b-256 5ddbb438c4c45a91535bfce523f7834f4b3d49499f97b4d95c7f40e9af263256

See more details on using hashes here.

File details

Details for the file edgedb-1.3.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.3.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4474891202ed908cf42a1d7af9f8725e094dd79da8f40400a0aa3ace4b660fdd
MD5 e5f1fc941f773c9a44b56435cd4ebdea
BLAKE2b-256 c769f57e60efcfc08889a2ae20942d4b2c7f2d478a983d0ee2669df25ade8dfc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-1.3.1-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.18

File hashes

Hashes for edgedb-1.3.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b11b8562d348418c98be86159af6bfacc67e65e6ceaacb4a4855efbe7422dd03
MD5 8de9d05b7bfc984b88f6426237472a39
BLAKE2b-256 1380f4ecad8fcc2084f991bf2ae5119b3c927e7ab10247194745d4735cd5e545

See more details on using hashes here.

File details

Details for the file edgedb-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d1b04d1c4c15615404db30175e2996e40f29efc57fcac81917a5ace076f4d039
MD5 4cff0b3a7897a8fdfd352f0bd20e706a
BLAKE2b-256 6493c6bad8ef43a293aa43d09c029c89b07dd7bf379e71c00375950c03a2d70e

See more details on using hashes here.

File details

Details for the file edgedb-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 574e97b221a120d6c0bbb31c9c8cd851e6f806e9c621f673d8261eff2fd17746
MD5 42ff01059a9cd1d6f06b78281afe742e
BLAKE2b-256 85be9713310f147107f9c11ddfc3abcc65ff53be7dc88d927c9c00ae4893be7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-1.3.1-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.18

File hashes

Hashes for edgedb-1.3.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 379c6f9bccd1cc2ee80a0f0e28c4d0e256963e9cdca2038a795230a66c4f84e0
MD5 aa953db4f900c75208b6cc2a97fe3138
BLAKE2b-256 813746b196eccf6435989bc1342819af9d2bf1970d04c683f88ca036aeb057be

See more details on using hashes here.

File details

Details for the file edgedb-1.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e11178df92c328642ed988db5906ddc7e6ce232094432077335c39f3c1b674e8
MD5 6c19699f26104a0e82a649ddd48b57e9
BLAKE2b-256 63927781c299407ed16077f65dd7e41584e8b677b9637759f50c1f2e1d8dca4e

See more details on using hashes here.

File details

Details for the file edgedb-1.3.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.3.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1c7e6b916a1e77682e4a4656c9d059b5e2c090e29a3b7f17d4a028d295a82124
MD5 96a0ebb0ffd20f27b25548e7328d33b4
BLAKE2b-256 0f92d103f01fe596a1011f50f09c3f0d2966eef5a3d0a0853810316a9263863f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-1.3.1-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.18

File hashes

Hashes for edgedb-1.3.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 577cd9750aa4b8b64a2ceee913cf2b0b637e57fd038f851636f6a5c935f2aae8
MD5 c22167f81fafc411ca42b8a5e4739804
BLAKE2b-256 9f32a90cab13649be47201ce73efa28785776d7d555876b61c4b02a57ce9ffa0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for edgedb-1.3.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b93c75a448d3e74696707d355c98133364e4f0e525a0e16505388205a9caa4a7
MD5 b119810e66797769f78733f983c88b21
BLAKE2b-256 9d700453609297835a82f7c62ab286eae1f93b34cdc9bc458757390ec93ff481

See more details on using hashes here.

File details

Details for the file edgedb-1.3.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for edgedb-1.3.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 769202fef943d8eb1f5901e185b3e6e69a7ef8eb4e0ad1380176b79be0158101
MD5 c1a9d5cfbb083b3b333c5a7fddce668b
BLAKE2b-256 e67ad16bbeae05db8da1e3f16d6e566dbb6b902ca92509c019453e92b1619a14

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