Skip to main content

nextline-graphql

(This package will be renamed in the future.)

Python framework for building plugin‑based HTTP API servers.


PyPI - Version PyPI - Python Version

Test Status Test Status codecov


Table of Contents

Introduction

This package provides the framework for a plugin-based Python API server. Plugins can implement endpoints and services.

(This package will not be specific to Nextline or GraphQL and will be renamed in the future.)

How to run

The section shows how to run the Nextline backend API server. How to run the frontend web app is described elsewhere.

As a Docker container

Docker images of the Nextline backend API server are created as ghcr.io/nextline-dev/nextline-graphql. These images are created by the Dockerfile. No external plugins are included in the images.

Use, for example, the following command to run as a Docker container.

docker run -p 8080:8000 ghcr.io/nextline-dev/nextline-graphql

If you access to the API server with a web browser, you will see the GraphQL IDE: http://localhost:8080/.

To include external plugins, you can create a new Docker image with ghcr.io/nextline-dev/nextline-graphql as the base image. For example, nextline-rdb shows how to create a new Docker image with nextline-rdb as an external plugin.

In a virtual environment

You can create a virtual environment, install packages, and run the API server as follows.

python -m venv venv
source venv/bin/activate
pip install nextline-graphql
pip install uvicorn
uvicorn --lifespan on --factory --port 8080 nextline_graphql:create_app

Check with a web browser at http://localhost:8080/.

If you check out external plugins, nextline-graphql automatically detects them as plugins. An example can be described in nextline-rdb.

Configuration

nextline-graphql uses dynaconf for configuration management. The nextline-graphql framework itself has configuration for CORS and logging. The internal plugins have configurations. External plugins can extend the configuration.

CORS

These CORS (Cross-Origin Resource Sharing) settings will be given to allow_origin and allow_headers of Starlette's CORSMiddleware.

Environment variable Default value Description
NEXTLINE_CORS__ALLOW_ORIGINS ['*'] A list of allowed origins, e.g., ["http://example.com:8080"]. The default value ("*") allows any origins.
NEXTLINE_CORS__ALLOW_HEADERS ['*'] A list of allowed HTTP request headers. For example, ['remote-user', 'remote-name', 'remote-email'] can be appropriate values if Authelia is used. Some headers such as Content-Type are always allowed (See the Starlette doc). The default value ("*") allows any headers.
NEXTLINE_CORS__ALLOW_CREDENTIALS false Whether to support cookies. If true, the wildcard ("*") cannot be used for NEXTLINE_CORS__ALLOW_ORIGINS or NEXTLINE_CORS__ALLOW_HEADERS. They need to be listed explicitly.

Logging

See default.toml.

graphql plugin

Environment variable Default value Description
NEXTLINE_GRAPHQL__MUTATION_ALLOW_ORIGINS [*] A list of allowed origins for GraphQL Mutations. The default value ("*") allows any origins.*
  • In addition to the CORS settings above, this setting provides further access control for GraphQL Mutations. With this setting, you can allow only GraphQL Queries and Subscriptions from certain origins while prohibiting Mutations.

ctrl plugin

Environment variable Default value Description
NEXTLINE_CTRL__TRACE_MODULES false By default (false), Nextline only traces the main Python script. If true, Nextline traces execution of imported Python modules as well.
NEXTLINE_CTRL__TRACE_THREADS false By default (false), Nextline only traces the main thread. If true, Nextline traces execution of other threads as well.

Check out code for development

How to check out code from GitHub for development:

git clone git@github.com:nextline-dev/nextline-graphql.git
cd nextline-graphql/
python -m venv venv
source venv/bin/activate
pip install -e ./"[tests,dev]"

To run

uvicorn --port 8080 --lifespan on --factory --reload nextline_graphql:create_app

Metadata

Release files for nextline-graphql 0.9.1

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

Source distribution (sdist)

Source distribution for nextline-graphql 0.9.1
File Size Uploaded
nextline_graphql-0.9.1.tar.gz 32.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nextline-graphql 0.9.1
File Interpreter ABI Platform
nextline_graphql-0.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 67.1 kB

Release files / nextline_graphql-0.9.1.tar.gz

Download URL nextline_graphql-0.9.1.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
594b0dbc97c0b1a57994ec03e0b96b7a5ed47bc5c518bd08956237f3a5c2564e
BLAKE2b-256 checksum
How to use checksums
058bbebcf73d64b4fab43b014d1ce0439b1820ee895bf13e124e8094a91dc7c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2025.

Transparency log

Release files / nextline_graphql-0.9.1-py3-none-any.whl

Download URL nextline_graphql-0.9.1-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1e99dd0aa133ab09b1755db2ae1aca63757edec9851be2b050c68d4506d5fe8
BLAKE2b-256 checksum
How to use checksums
79637aeeeb7c8bf681e8ca048ba3004b86840f3ccde9321293dcdf112866e262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.9.1 This release

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.13

2 release files

0.7.12

2 release files

0.7.11

2 release files

0.7.10

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

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