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.2a2.tar.gz (737.5 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

edgedb-0.7.2a2-cp38-cp38-manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.8

edgedb-0.7.2a2-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.2a2-cp37-cp37m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7m Windows x86-64

edgedb-0.7.2a2-cp37-cp37m-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.7m

edgedb-0.7.2a2-cp37-cp37m-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

edgedb-0.7.2a2-cp36-cp36m-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.6m

edgedb-0.7.2a2-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.2a2.tar.gz.

File metadata

  • Download URL: edgedb-0.7.2a2.tar.gz
  • Upload date:
  • Size: 737.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2.tar.gz
Algorithm Hash digest
SHA256 006fa815451ce9e36733c5e21faf812e5b176bfaf2141452fb47df88fad6b987
MD5 76210446c1d01a14737f53880a3e68e5
BLAKE2b-256 3f5ce025f2824c76374680649e84125653d3288fbbd2e21b6ad669407cf17b76

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-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.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f569229b0db7955950d48ee7ed84f7540bbce4df9b3a713e268ccf3e7184f0c4
MD5 195b32ef2a64c6a2a6036d53d3981a61
BLAKE2b-256 de92305b101563b2b42b54e020b580e9c6edb4c873b014eff672b6be9a9ccd17

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.9 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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 29ec1c87c7535db02142bee64877ad2d24652aa083f96275d0822259ddad18a9
MD5 0c96f69c6430276e924911de1d196082
BLAKE2b-256 a603a438642982b72c8df08768d041db9e698b7ffae78c587d5f503aaaa376a3

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 004452c86fcdcbe2ddec77f62b96557a945de2850dfb914b7fff1df05af46327
MD5 ae4ded23d554c95a39ced5cef33ac200
BLAKE2b-256 3b2a0d29cd20f255874ca048560587c0de1b8bde4a3ae282bbd02be37970a0d0

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-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.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 20f894f563c840a89d187d6248cd37a4668587e0d9a4c925c5f45ecbfd8293ac
MD5 ead69d1a5d7f93b68f1ef9db9646b98d
BLAKE2b-256 bda0337a10fe730f99c55446f2d6ea4043463ebd4fda3843bbc490f58c29b174

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.8 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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 302b546a95b199bf708c27ee9bb84ac310992900aedc2c44e78016382f4a93de
MD5 59bdfba54f37939686ac804544d75b9f
BLAKE2b-256 87f24e9e01f60e184472c566847fce3d8a9b0307e4b5a4de22e369e46f4734d3

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 1.3 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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a61212b8d7adca7432fe41c3e7f67ca96c719ae5d16abe094c633aa9ddb160fa
MD5 d4cfdc0d59307b0b393cdd73ba1d0633
BLAKE2b-256 03bef06ada23032d4b335d9518006754413184bcd9ced2a962879898cc7484bd

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-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.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 95c83b4b0a7df83e54743e9b7eac4455777ed089bf5b3c962b4e3be907b1ed4a
MD5 261e4b53a4f9ee0b1b734660de861f5e
BLAKE2b-256 1207d12a669d0ca285319aa9604438b096cf163c505f22348631da3154666b5e

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.8 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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fbccd71096aab53637ad23afc64453b2e1e39eef0f88847083e078a0a4b87bc8
MD5 cdd7b7aa631ab82c4f86203bb6265797
BLAKE2b-256 acf7fe61f80b0ebe41af0fec238f6805ee16f82c8eb6b148a6ebb0bd016bed59

See more details on using hashes here.

File details

Details for the file edgedb-0.7.2a2-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.7.2a2-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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for edgedb-0.7.2a2-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 51b55e4623e378ef57d8ea5b1ddaa0d141634a09e1c93555c71e69d79637e516
MD5 6f4a211630e214565b4c911e1e03930e
BLAKE2b-256 2744f1750f845d2ed3a705b0acedee7ae3a428c7d375704d44c541db9a817e7e

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