semvec/pypi-packages huggingface dataset:
aiida-graphql 0.0.2
Strawberry-based GraphQL API Server for AiiDA
License: MIT
Requires Python: >=3.7,<4.0

# aiida-graphql

[![Build Status](https://travis-ci.com/dev-zero/aiida-graphql.svg?branch=develop)](https://travis-ci.com/dev-zero/aiida-graphql) [![codecov](https://codecov.io/gh/dev-zero/aiida-graphql/branch/develop/graph/badge.svg)](https://codecov.io/gh/dev-zero/aiida-graphql) [![PyPI](https://img.shields.io/pypi/pyversions/aiida-graphql)](https://pypi.org/project/aiida-graphql/)

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

* Python 3.7+
* https://pypi.org/project/strawberry-graphql/ 0.16.7+
* https://pypi.org/project/aiida-core/ 1.0.0b6+

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](https://ariadnegraphql.org/).

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](https://github.com/dev-zero/cp2k-input-tools) and liked the virtualenv integration.

# Usage

## Development

Installing the dependencies:

```bash
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:

```console
$ poetry run strawberry server aiida_graphql.schema
```

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

Example query:

```graphql
{
  computers {
    uuid
    name
    description
    schedulerType
    transportType
  }
}
```

![Query Screenshot](docs/screenshot.png?raw=true "Query Screenshot")


# Available fields

* node
* calculation
* computer
* user
* singlefile
* gaussian_basissets (only if the [aiida-gaussian-datatypes](https://github.com/dev-zero/aiida-gaussian-datatypes) is installed)

Documentation and schema are embedded in the development server.
foliantcontrib.aglio 1.0.0
Aglio backend for Foliant documentation generator.
License: MIT

[![](https://img.shields.io/pypi/v/foliantcontrib.aglio.svg)](https://pypi.org/project/foliantcontrib.aglio/)


# Aglio Backend for Foliant

Aglio backend generates API documentation from [API Blueprint](https://apiblueprint.org/) using [aglio renderer](https://github.com/danielgtaylor/aglio).

This backend operates the `site` target.

> Note, that aglio is designed to render API Blueprint documents. Blueprint syntax is very close to that of Markdown and you may be tempted to use this backend as a general purpose static site generator, which may work in some cases, but is not guaranteed to work in all of them.

## Installation

```bash
$ pip install foliantcontrib.aglio
```

## Usage

To use this backend aglio should be installed in your system. Follow the [instruction](https://github.com/danielgtaylor/aglio#installation--usage) in aglio repo.

To test if you've installed aglio properly run the `aglio -h` command, which should return you a list of options.

To generate a static website from your Foliant project run the following command:

```bash
$ foliant make site --with aglio
Parsing config... Done
Making site...
Done
────────────────────
Result: My_Awesome_Project.aglio
```

## Config

You don't have to put anything in the config to use aglio backend. If it's installed, Foliant detects it.

To customize the output, use options in `backend_config.aglio` section:

```yaml
backend_config:
  aglio:
    aglio_path: aglio
    params:
        theme-variables: flatly
        fullWidth: True
```

`aglio_path`
:   Path to the aglio binary. Default: `aglio`

`params`
:   Parameters which will be supplied to the `aglio` command. To get the list of possible parameters, run `aglio -h` or check the [official docs](https://github.com/danielgtaylor/aglio#installation--usage).

## Customizing output

### Templates

You can customize the appearence of the static website build by aglio with [Jade](http://jade-lang.com/) templates. Aglio has two built-in templates:

* `default` — two-column web-page;
* `triple` — three-column web-page.

To add your own template, follow [the instructions](https://github.com/danielgtaylor/aglio#customizing-layout-templates) in the official docs.

To specify the template add the `theme-template` field to the `params` option:

```yaml
backend_config:
  aglio:
    params:
        theme-template: triple
```

### Color scheme

You can customize the color scheme of the website by specifying the color scheme name in `theme-variables` param.

Available built-in color schemes:

* `default`,
* `cyborg`,
* `flatly`,
* `slate`,
* `streak`.

You can also specify your own scheme in a LESS or CSS file.

```yaml
backend_config:
  aglio:
    params:
        theme-variables: flatly
```

### Stylesheets

Finally, you can provide custom stylesheets in a LESS or CSS file in `theme-style` param:

```yaml
backend_config:
  aglio:
    params:
        theme-style: !path my-style.less
```