{"id":18620516,"url":"https://github.com/simonsobs/nextline-rdb","last_synced_at":"2025-10-04T20:29:32.369Z","repository":{"id":65467405,"uuid":"592873392","full_name":"simonsobs/nextline-rdb","owner":"simonsobs","description":"A plugin of nextline-graphql. A relational database for nextline","archived":false,"fork":false,"pushed_at":"2024-05-22T16:11:18.000Z","size":466,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-22T16:31:57.976Z","etag":null,"topics":["nextline"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonsobs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-24T18:09:18.000Z","updated_at":"2024-06-06T15:46:36.019Z","dependencies_parsed_at":"2023-12-19T18:22:50.433Z","dependency_job_id":"3bd7cb8f-ecd9-4997-8dc2-73010e6cd499","html_url":"https://github.com/simonsobs/nextline-rdb","commit_stats":{"total_commits":60,"total_committers":1,"mean_commits":60.0,"dds":0.0,"last_synced_commit":"695ec6837fd535ec3c8242d9223432791aec4d4c"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Fnextline-rdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Fnextline-rdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Fnextline-rdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Fnextline-rdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonsobs","download_url":"https://codeload.github.com/simonsobs/nextline-rdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244294014,"owners_count":20429935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextline"],"created_at":"2024-11-07T04:06:38.751Z","updated_at":"2025-10-04T20:29:27.325Z","avatar_url":"https://github.com/simonsobs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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 \u003chttp://localhost:8080/\u003e.\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 \u003chttp://localhost:8080/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsobs%2Fnextline-rdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonsobs%2Fnextline-rdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsobs%2Fnextline-rdb/lists"}