Skip to main content

aiida-graphql

Build Status codecov PyPI

Strawberry-based GraphQL Server for AiiDA

Why GraphQL when there is already the REST API? See https://www.howtographql.com/basics/1-graphql-is-the-better-rest/ ... a lot of possible optimizations and fits the graph-based structure of the AiiDA DB a lot better than a REST API.

Requirements

For development: https://poetry.eustace.io/

Why Strawberry for GraphQL? It uses graphql-core v3 (while graphene is still stuck with v2), uses typings and dataclasses for both validation and schema generation. And it uses modern Python to write the schema, in comparison to the schema-first approach.

Why Python 3.7+? It's the future, and for Strawberry. In fact, were it not for a bug in uvloop this would be Python 3.8+ (for the walrus operator). And given the timeline these projects are running for, we'll probably see Python 3.9 until people effectively start using it.

Why Poetry? I wanted to get away from setuptools and used Poetry already in a different project and liked the virtualenv integration.

Usage

Development

Installing the dependencies:

git clone https://github.com/dev-zero/aiida-graphql.git
cd aiida-graphql

# for poetry installation use the official documentation
poetry install

To run the development server:

$ poetry run strawberry server aiida_graphql.schema

then visit http://localhost:8000/graphql with your browser.

Example query:

{
  computers {
    uuid
    name
    description
    schedulerType
    transportType
  }
}

Query Screenshot

Available fields

Documentation and schema are embedded in the development server.

Metadata

Release files for aiida-graphql 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiida-graphql 0.0.2
File Size Uploaded Provenance
aiida-graphql-0.0.2.tar.gz 5.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aiida-graphql 0.0.2
File Interpreter ABI Platform
aiida_graphql-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / aiida-graphql-0.0.2.tar.gz

Download URL aiida-graphql-0.0.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2c6afdee46a2b824c58647c041232798e13855adff30e15146c58f6080f1f6df
BLAKE2b-256 checksum
How to use checksums
264b0064249862ba73186a6414e3295aa1d989e423bcb07085dcdc4be89994d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0b3 CPython/3.7.1 Linux/4.15.0-1040-gcp

Release files / aiida_graphql-0.0.2-py3-none-any.whl

Download URL aiida_graphql-0.0.2-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd2993827f5742014f48a6fa2dab18d9f123df85ac05059f00e0a1be1e45eb8a
BLAKE2b-256 checksum
How to use checksums
9ed8ad6a024f3f854b33f9d9e0e83c023427a6469b4706736b541d0f46d42706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0b3 CPython/3.7.1 Linux/4.15.0-1040-gcp

Security for aiida-graphql 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page