Skip to main content

A GraphQL endpoint for Datasette

Project description

datasette-graphql

PyPI Changelog License

A GraphQL endpoint for Datasette

Work in progress alpha - this has many missing features.

Try out a live demo at datasette-graphql-demo.datasette.io/graphql.

Installation

Install this plugin in the same environment as Datasette.

$ pip install datasette-graphql

Usage

This sets up /graphql as a GraphQL endpoint for the first attached database. Individual tables can be queried like this:

{
  name_of_table {
    first_column
    second_column
  }
}

Still to come:

  • Pagination
  • Filtering (e.g. rows where age > X)
  • Foreign key expansion
  • Much, much more

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-graphql
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and tests:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-graphql-0.1a2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

datasette_graphql-0.1a2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file datasette-graphql-0.1a2.tar.gz.

File metadata

  • Download URL: datasette-graphql-0.1a2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for datasette-graphql-0.1a2.tar.gz
Algorithm Hash digest
SHA256 fe410a6022977fa41d191a768ff5250eff494d057b4bb3a2b3d1a0fef9bedcc7
MD5 3ef10aeef04d4bbfa98a04c6df0b3af8
BLAKE2b-256 5230f70d07b33bdbe478bf19f8a906d509a009d1e46068e1e7208d5e41a9c344

See more details on using hashes here.

File details

Details for the file datasette_graphql-0.1a2-py3-none-any.whl.

File metadata

  • Download URL: datasette_graphql-0.1a2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for datasette_graphql-0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 6c020d89db56d7769c55d856542e604dae7ec9795ee33797a6c174e140c2258c
MD5 05fd90ddc67d12b3caccd39c6c1ce1c7
BLAKE2b-256 052b56109c27b009a7efdf9a8b631dd7bc047a47cc3b70c33162215aff04a6bf

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