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 probably isn't worth using yet.

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

Uploaded Source

Built Distribution

datasette_graphql-0.1a1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: datasette-graphql-0.1a1.tar.gz
  • Upload date:
  • Size: 4.3 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.1a1.tar.gz
Algorithm Hash digest
SHA256 194a698521df2b27b67be48035f52adcd986b1d3dae8df4a84ec4c2be651569a
MD5 40784a701c2c0456ea608b36c43c2aa7
BLAKE2b-256 e143e64affac6998f70d2191c1e6f398a59e838feefe4c8f0f905d7e10a8e5a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: datasette_graphql-0.1a1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 137eb0efc41bab9e5503f93a95eea4db6155800e0c6284438f8582dd8627ee39
MD5 38fdbd6c8ca5360bb1d86e720171694c
BLAKE2b-256 24b1c0138aed923f00884e90394fe02522664058137d4eecd1e2fe70b70d6c85

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