• Stars
    star
    349
  • Rank 117,659 (Top 3 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The official Python client library for EdgeDB

The Python driver for EdgeDB

https://github.com/edgedb/edgedb-python/workflows/Tests/badge.svg?event=push&branch=master 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.

More Repositories

1

edgedb

A graph-relational database with declarative schema, built-in migration system, and a next-generation query language
Python
12,123
star
2

edgedb-js

The official TypeScript/JS client library and query builder for EdgeDB
TypeScript
479
star
3

imdbench

IMDBench β€”Β Realistic ORM benchmarking
Python
209
star
4

edgedb-rust

The official Rust binding for EdgeDB
Rust
198
star
5

edgedb-go

The official Go client library for EdgeDB
Go
152
star
6

edgedb-cli

The EdgeDB CLI
Rust
152
star
7

edgedb-elixir

Elixir client for EdgeDB
Elixir
85
star
8

edgedb-deno

EdgeDB driver for Deno
TypeScript
80
star
9

remix

A Remix stack for EdgeDB-backed applications
JavaScript
78
star
10

edgedb-net

The official .NET client library for EdgeDB
C#
77
star
11

edgedb-docker

Official Docker Image packaging for EdgeDB
Shell
73
star
12

easy-edgedb

An illustrated textbook designed to be a one-stop shop for learning EdgeDB
66
star
13

edgedb-examples

EdgeDB example projects for different stacks
TypeScript
55
star
14

edgedb-ui

The home of EdgeDB UI and all related shared UI components
TypeScript
47
star
15

rfcs

RFCs for major changes to EdgeDB
Python
34
star
16

edgedb-vim

EdgeDB + Vim
Python
31
star
17

awesome-edgedb

A curated list of resources related to EdgeDB.
30
star
18

edgedb-editor-plugin

EdgeDB plugin for Sublime Text, Atom, and VSCode
JavaScript
27
star
19

edgedb-dart

Dart
27
star
20

setup-edgedb

A GitHub Action to install EdgeDB and its CLI
TypeScript
18
star
21

edgedb-java

The official Java client library for EdgeDB
Java
17
star
22

mcu-sandbox

A movie schema sandbox for playing with EdgeDB and the EdgeQL query builder, pre-loaded with MCU data
TypeScript
15
star
23

metapkg

Multi-platform native package builder toolkit
Python
14
star
24

edgedb-deploy

EdgeDB Deployment Recipes and Scripts
Shell
9
star
25

edgedb-grafana-frontend

A frontend plugin for Grafana that fetches data from an HTTP endpoint responding to EdgeQL queries
TypeScript
8
star
26

edgedb-grafana-backend

Grafana backend plugin for EdgeDB
TypeScript
8
star
27

simpletodo

A preposterously simple todo app powered by EdgeDB
TypeScript
6
star
28

edgedb-wasm

Rust
5
star
29

homebrew-tap

Install nightly EdgeDB packages in Homebrew
Ruby
4
star
30

cla-bot

A GitHub bot and Web UI for managing contributor license agreements
TypeScript
4
star
31

website

A read-only mirror of the edgedb.com repo.
HTML
3
star
32

shared-client-testcases

3
star
33

action-release

A Github Action to automate package releases.
TypeScript
3
star
34

heroku-buildpack-edgedb

Run EdgeDB in a dyno along with your application.
Shell
2
star
35

libvirt-aws

Python
2
star
36

edgedb-js-lexer

Rust
1
star
37

edgedb-pkg

EdgeDB Release Packaging Toolkit
Dockerfile
1
star
38

chinook

A sample EdgeDb project seeded with chinook sample database
Python
1
star
39

packages-nix

Nix
1
star