A plugin of nextline-graphql. A relational database for nextline
Project description
Nextline RDB
A plugin for nextline-graphql. A relational database for nextline-graphql.
Table of Contents
Installation
pip install nextline-rdb
Nextline-graphql automatically detects this package as a plugin.
Configuration
| Environment variable | Default value | Description |
|---|---|---|
NEXTLINE_DB__URL |
sqlite+aiosqlite:// |
The DB URL of SQLAlchemy |
Note: Only tested on SQLite + aiosqlite.
Examples
How to run Nextline-graphql with Nextline RDB
In a virtual environment
Create a virtual environment and install packages.
python -m venv venv
source venv/bin/activate
pip install nextline-graphql
pip install nextline-rdb
pip install uvicorn
Specify the database URL.
export NEXTLINE_DB__URL="sqlite+aiosqlite:///db.sqlite3"
Run on the port 8080.
uvicorn --lifespan on --factory --port 8080 nextlinegraphql:create_app
Check with a web browser at http://localhost:8080/.
In a Docker container
Create a Docker image.
git clone git@github.com:simonsobs/nextline-rdb.git
cd nextline-rdb
docker image build --tag nextline-rdb .
Run on the port 8080 with a file on the host machine db/db.sqlite3 as the
persistent DB.
The directory db/ and the file db.sqlite3 will be created if
they don't exist.
docker run -p 8080:8000 --env NEXTLINE_DB__URL='sqlite+aiosqlite:////db/db.sqlite3' -v "$(pwd)/db:/db" nextline-rdb
Check with a web browser at http://localhost:8080/.
License
- Nextline RDB is licensed under the MIT license.
Contact
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nextline_rdb-0.6.5.tar.gz.
File metadata
- Download URL: nextline_rdb-0.6.5.tar.gz
- Upload date:
- Size: 62.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
037a247ec7881751e24576b31d03124c0f0405255c1a835e2b4308b7fb3a3694
|
|
| MD5 |
de5becebb9ffae89c97af29c885706b0
|
|
| BLAKE2b-256 |
6bc2d3b98fdc153eb788e98e648ed0482f9b11e89ba30d7d8ca4bc3a21681df7
|
File details
Details for the file nextline_rdb-0.6.5-py3-none-any.whl.
File metadata
- Download URL: nextline_rdb-0.6.5-py3-none-any.whl
- Upload date:
- Size: 123.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3f650f011e787526aa5312a822ecfd478be2557b814a88cc5de817a8e9907b1
|
|
| MD5 |
c4a69ab3de7020701fff58fd4caae7da
|
|
| BLAKE2b-256 |
ff372b4931429a8981905e7981d17955dfeb1e6a24fea3a303239890e7caed38
|