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%20the%20community-on%20spectrum-blueviolet

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 -> local_date;
        }
    ''')

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

    # Select User objects.
    user_set = conn.fetchall(
        '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.7.0a5.tar.gz (701.0 kB view details)

Uploaded Source

Built Distributions

edgedb-0.7.0a5-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

edgedb-0.7.0a5-cp38-cp38-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.8

edgedb-0.7.0a5-cp38-cp38-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

edgedb-0.7.0a5-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7m Windows x86-64

edgedb-0.7.0a5-cp37-cp37m-manylinux1_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.7m

edgedb-0.7.0a5-cp37-cp37m-macosx_10_13_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

edgedb-0.7.0a5-cp36-cp36m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.6m Windows x86-64

edgedb-0.7.0a5-cp36-cp36m-manylinux1_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.6m

edgedb-0.7.0a5-cp36-cp36m-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

File details

Details for the file edgedb-0.7.0a5.tar.gz.

File metadata

  • Download URL: edgedb-0.7.0a5.tar.gz
  • Upload date:
  • Size: 701.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5.tar.gz
Algorithm Hash digest
SHA256 e0e934a8d0e994d07ecfedfdeea73cf778d08285d04259dba7144bf15332bded
MD5 477af9fe10fe7762f0fb597f84fe67a3
BLAKE2b-256 3c8570335807bc6d054ec03407544119e2ea54228db0c758148069ba971ad132

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 aeaa65265734762647a8c2545dc379c79d3cbb9a4238343170c40131e63aad7e
MD5 18224c6a5dcb9decf541dca261296756
BLAKE2b-256 d2ad91c750f0222ee3a754d920b16f6acccaea8778a9834a047c0fc62f265644

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bf2d377ac76f1f6c1192a72130acb2be4b19855ae1e8015e6aaf0700072f5984
MD5 2e57e0023d2d67c7f4bc8c838e0190b9
BLAKE2b-256 08296208a4478040cab4f43dd9e2806aa558ca07261cddc4f9bc16ebb1adf6e6

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp38-cp38-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.8, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 511e3150e1d964c18f0e766edecb60dd26f85aa9ecf02a05b3774e276284b708
MD5 05a5cbdfdf0ffa625892f5e6eb7084f5
BLAKE2b-256 2667f37cd67a863464c18fcfa6cfdf4e8ceaa1f8ddfb3a8c8dedd89809e9387f

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 079ae78b75cad726a67fb4cfbf5b4cfe042d077e8014bf8610a2a03b57f7a808
MD5 c6998314699861a01c39d2228eb5c5e7
BLAKE2b-256 ad7979a9cd52cdcf324a3d16f9304c93ec1831a4930c4aba0f27c56caf59c693

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c72135957a91c9743373166dd9eebfd763c770e3eab287f7718987bfcfa17e63
MD5 21d3a2ff77c0cd5b3f8316aead0db323
BLAKE2b-256 ad0b66e6fa7020dce93b15afeaaa279374f80f43d46afae95a76e1f849dc4716

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f741e2806c0c5af27179edb8cfe98b5d44868c5c498fd7b2f3d5eb644c001510
MD5 a62654efce146e287628dde925f0196c
BLAKE2b-256 9cf448d8a55cc2f3e7b31aecfbf5a2d21c4569f769f4b7b083b6f731804048d4

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 38f95922bddb37e42fadcb0d9d6ca27c4f5940dde7da346f08ff7b5d8f662146
MD5 74d36007c0be6a7f4a2a900ace640e95
BLAKE2b-256 9cc474b66a31ad432fc86075dc9636fe405abcd7c07d371a30bbcc6bc1006726

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e8f36ced79999967f8586ae47c42fd55e543a418b7e1233521a3373921013135
MD5 c31f036d3807cd3db08dddc5db898fea
BLAKE2b-256 88ebedb0e58f76f09bd57f1cfc0e3c918dde9282b0f05882e68853e1912e9376

See more details on using hashes here.

File details

Details for the file edgedb-0.7.0a5-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.0a5-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for edgedb-0.7.0a5-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 446b93789bd88d3d27826beb1fefec293cb0fbb2cbb693dc2e25bcc5a1177e74
MD5 c375ed94dbad785e53aff7fb191531a7
BLAKE2b-256 00ac37aa0d6d7987e72ca729893f02505209f2b9b74973486bfaf627b4573189

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