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.8.0a1.tar.gz (737.7 kB view details)

Uploaded Source

Built Distributions

edgedb-0.8.0a1-cp38-cp38-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

edgedb-0.8.0a1-cp38-cp38-manylinux1_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.8

edgedb-0.8.0a1-cp38-cp38-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

edgedb-0.8.0a1-cp37-cp37m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7m Windows x86-64

edgedb-0.8.0a1-cp37-cp37m-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.7m

edgedb-0.8.0a1-cp37-cp37m-macosx_10_13_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

edgedb-0.8.0a1-cp36-cp36m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.6m Windows x86-64

edgedb-0.8.0a1-cp36-cp36m-manylinux1_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.6m

edgedb-0.8.0a1-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.8.0a1.tar.gz.

File metadata

  • Download URL: edgedb-0.8.0a1.tar.gz
  • Upload date:
  • Size: 737.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1.tar.gz
Algorithm Hash digest
SHA256 99e50281c561e72b2961b4a21d6854c3f802347e700c3b9636edf153cfc7c7fc
MD5 79cfe444cb242a68863d2466d4f1501a
BLAKE2b-256 466bdf8c905955e8d00587dec85a09837ac01a8309d10554785e597effcf4be0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a1872a0ea165fcc4c521b4ccc5720d660a68428fec2336b72cf79d9cc6a9da2f
MD5 bd8c3c24ec30cc853efcab2d9d069873
BLAKE2b-256 31d8813cb4260a08ee45af131c876c3c5e0d974dbe35100a5cf63c70e054ff2b

See more details on using hashes here.

File details

Details for the file edgedb-0.8.0a1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3b3c218caa0604838157aa55155f04846a4684c196492a13acea8ba8eea3f939
MD5 baabbdae3a9daa29c3597c9149a5ac21
BLAKE2b-256 6c5844de51ff2d14d8ce21b232c288d5a9f833e5437deb49d631b71b36d8d62c

See more details on using hashes here.

File details

Details for the file edgedb-0.8.0a1-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fa12c2e6473011516a1531c00818da9281b657a829a1bb277890663dc13f8f45
MD5 9c1c4e2ecc11d39c1cede0ec6282d1fe
BLAKE2b-256 5bc4838b281119ecd37dff7f3fc160eec9a07b18abce10136f0a419f103d0632

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 aa488a4f886e56e0f1130a1a8b681422618ae09fd5251b6502bf082c2f108430
MD5 30d205f84595b102d09028383b36ede5
BLAKE2b-256 c1b524a386cef48cc6cb9a8c4ed9a2adab40e40e0c2e18b524878d882fb482d5

See more details on using hashes here.

File details

Details for the file edgedb-0.8.0a1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f972c4a97c339f1eb884dc6530612d892afdc96d195eb824c3e9bbfde3f6ce7f
MD5 463c8960d6a5891817d8da0142f67856
BLAKE2b-256 83f8ae5135e7026f38274a11621fc25f4c5c027b63531b7604c075d41f8dc7ad

See more details on using hashes here.

File details

Details for the file edgedb-0.8.0a1-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 23132b52c167bff3b43f58e62e37ed2d48f418e0efde36405d9a50f8362de196
MD5 2989779d39111e0fb7f4e7ede0a48c33
BLAKE2b-256 b28e023db9bd8987f99feb7b1d74c8ce515a562b2dcb98e4390bac20ea226964

See more details on using hashes here.

File details

Details for the file edgedb-0.8.0a1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 336c45e9f5728ec9626041e3f33a5b63f586f9e79193928764a5686d79f62f6d
MD5 c94d24dc744dce48c15f1c0f10064995
BLAKE2b-256 ec4816c7944add2a745dfa06b898f3154bf2c673166536d11003ca704a836a16

See more details on using hashes here.

File details

Details for the file edgedb-0.8.0a1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 41eca9a71bc6447ca4094b882d99d01f9cac9dbd95155d6251d55b01232ccfeb
MD5 c58d672d76043a9a16d1fae84eb7ce11
BLAKE2b-256 824c5de6b1d64017c115fee97679db525a56860988885cab8b0fb2b301ad5dcb

See more details on using hashes here.

File details

Details for the file edgedb-0.8.0a1-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: edgedb-0.8.0a1-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.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for edgedb-0.8.0a1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4800464db4aa7f2995949b762d002fc687608434e97f71451d79826b64c7c30c
MD5 2feea9a3f330959869a4518eb6648871
BLAKE2b-256 8bce81bdbb9e7c44c0db728a86a068325d4979d57da59f859253387191d3cb6c

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