Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
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.
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.
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
}
}
Documentation and schema are embedded in the development server.
FAQs
Strawberry-based GraphQL API Server for AiiDA
We found that aiida-graphql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.