Name | nextline-rdb JSON |
Version |
0.6.9
JSON |
| download |
home_page | None |
Summary | A plugin of nextline-graphql. A relational database for nextline |
upload_time | 2024-06-14 20:36:28 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
|
VCS |
![](/static/img/github-24-000000.png) |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# nextline-rdb
[![PyPI - Version](https://img.shields.io/pypi/v/nextline-rdb.svg)](https://pypi.org/project/nextline-rdb)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nextline-rdb.svg)](https://pypi.org/project/nextline-rdb)
[![Test Status](https://github.com/simonsobs/nextline-rdb/actions/workflows/unit-test.yml/badge.svg)](https://github.com/simonsobs/nextline-rdb/actions/workflows/unit-test.yml)
[![Test Status](https://github.com/simonsobs/nextline-rdb/actions/workflows/type-check.yml/badge.svg)](https://github.com/simonsobs/nextline-rdb/actions/workflows/type-check.yml)
[![codecov](https://codecov.io/gh/simonsobs/nextline-rdb/branch/main/graph/badge.svg)](https://codecov.io/gh/simonsobs/nextline-rdb)
A plugin for [nextline-graphql](https://github.com/simonsobs/nextline-graphql).
A relational database for nextline-graphql.
---
**Table of Contents**
- [Installation](#installation)
- [Configuration](#configuration)
- [Examples](#examples)
## Installation
```bash
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](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls) 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.
```bash
python -m venv venv
source venv/bin/activate
pip install nextline-graphql
pip install nextline-rdb
pip install uvicorn
```
Specify the database URL.
```bash
export NEXTLINE_DB__URL="sqlite+aiosqlite:///db.sqlite3"
```
Run on the port 8080.
```bash
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.
```bash
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.
```bash
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/>.
Raw data
{
"_id": null,
"home_page": null,
"name": "nextline-rdb",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Simons Observatory <so_software@simonsobservatory.org>",
"download_url": "https://files.pythonhosted.org/packages/b3/8c/673eb389b586b7364a542821c0e10fd20c3989b15d5746d2ab85249830cb/nextline_rdb-0.6.9.tar.gz",
"platform": null,
"description": "# nextline-rdb\n\n[![PyPI - Version](https://img.shields.io/pypi/v/nextline-rdb.svg)](https://pypi.org/project/nextline-rdb)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nextline-rdb.svg)](https://pypi.org/project/nextline-rdb)\n\n[![Test Status](https://github.com/simonsobs/nextline-rdb/actions/workflows/unit-test.yml/badge.svg)](https://github.com/simonsobs/nextline-rdb/actions/workflows/unit-test.yml)\n[![Test Status](https://github.com/simonsobs/nextline-rdb/actions/workflows/type-check.yml/badge.svg)](https://github.com/simonsobs/nextline-rdb/actions/workflows/type-check.yml)\n[![codecov](https://codecov.io/gh/simonsobs/nextline-rdb/branch/main/graph/badge.svg)](https://codecov.io/gh/simonsobs/nextline-rdb)\n\nA plugin for [nextline-graphql](https://github.com/simonsobs/nextline-graphql).\nA relational database for nextline-graphql.\n\n---\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Examples](#examples)\n\n## Installation\n\n```bash\npip install nextline-rdb\n```\n\nNextline-graphql automatically detects this package as a plugin.\n\n## Configuration\n\n| Environment variable | Default value | Description |\n| -------------------- | --------------------- | --------------------------------------------------------------------------------------------- |\n| `NEXTLINE_DB__URL` | `sqlite+aiosqlite://` | The [DB URL](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls) of SQLAlchemy |\n\n**Note:** Only tested on SQLite + aiosqlite.\n\n## Examples\n\n### How to run Nextline-graphql with Nextline RDB\n\n#### In a virtual environment\n\nCreate a virtual environment and install packages.\n\n```bash\npython -m venv venv\nsource venv/bin/activate\npip install nextline-graphql\npip install nextline-rdb\npip install uvicorn\n```\n\nSpecify the database URL.\n\n```bash\nexport NEXTLINE_DB__URL=\"sqlite+aiosqlite:///db.sqlite3\"\n```\n\nRun on the port 8080.\n\n```bash\nuvicorn --lifespan on --factory --port 8080 nextlinegraphql:create_app\n```\n\nCheck with a web browser at <http://localhost:8080/>.\n\n#### In a Docker container\n\nCreate a Docker image.\n\n```bash\ngit clone git@github.com:simonsobs/nextline-rdb.git\ncd nextline-rdb\ndocker image build --tag nextline-rdb .\n```\n\nRun on the port 8080 with a file on the host machine `db/db.sqlite3` as the\npersistent DB.\nThe directory `db/` and the file `db.sqlite3` will be created if\nthey don't exist.\n\n```bash\ndocker run -p 8080:8000 --env NEXTLINE_DB__URL='sqlite+aiosqlite:////db/db.sqlite3' -v \"$(pwd)/db:/db\" nextline-rdb\n```\n\nCheck with a web browser at <http://localhost:8080/>.\n",
"bugtrack_url": null,
"license": null,
"summary": "A plugin of nextline-graphql. A relational database for nextline",
"version": "0.6.9",
"project_urls": {
"Documentation": "https://github.com/simonsobs/nextline-rdb#readme",
"Issues": "https://github.com/simonsobs/nextline-rdb/issues",
"Source": "https://github.com/simonsobs/nextline-rdb"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "435643cb522b110347cb37a6259945a8bc630eca130a8d6040eac85a3b58cbb6",
"md5": "caf9d3188ffdfdb0f039e82f05ccdd9a",
"sha256": "c53fa7f6ca7d924f28dee8a5afb2615aa9ac7e0844bc416a381f780fd657cccd"
},
"downloads": -1,
"filename": "nextline_rdb-0.6.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "caf9d3188ffdfdb0f039e82f05ccdd9a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 193433,
"upload_time": "2024-06-14T20:36:27",
"upload_time_iso_8601": "2024-06-14T20:36:27.142474Z",
"url": "https://files.pythonhosted.org/packages/43/56/43cb522b110347cb37a6259945a8bc630eca130a8d6040eac85a3b58cbb6/nextline_rdb-0.6.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b38c673eb389b586b7364a542821c0e10fd20c3989b15d5746d2ab85249830cb",
"md5": "c24c0653db36cb47322f4c7720b38dcc",
"sha256": "1c38a60a249a27dfc0a63181ba44cb8bc0f19024e56d7df0df558098e9cd2ceb"
},
"downloads": -1,
"filename": "nextline_rdb-0.6.9.tar.gz",
"has_sig": false,
"md5_digest": "c24c0653db36cb47322f4c7720b38dcc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 89271,
"upload_time": "2024-06-14T20:36:28",
"upload_time_iso_8601": "2024-06-14T20:36:28.777247Z",
"url": "https://files.pythonhosted.org/packages/b3/8c/673eb389b586b7364a542821c0e10fd20c3989b15d5746d2ab85249830cb/nextline_rdb-0.6.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-14 20:36:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "simonsobs",
"github_project": "nextline-rdb#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nextline-rdb"
}