| Name | edwh-devdb-plugin JSON |
| Version |
0.6.1
JSON |
| download |
| home_page | None |
| Summary | edwh plugin for quick database snapshot creation and recovery |
| upload_time | 2025-10-07 12:51:04 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.12 |
| license | None |
| keywords |
edwh
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# EDWH Development Database (`devdb`) Plugin
## Overview
The EDWH Development Database Plugin provides a comprehensive set of tools for managing snapshots of the development
database. This plugin allows developers to create, push, pop, recover, and list database snapshots efficiently.
## Features
- **Snapshot Management**: Create and manage snapshots of the development database.
- **Selective Exclusion**: Optionally exclude specific tables during snapshot creation.
- **Remote Operations**: Push and pop snapshots to/from a remote server.
- **Database Recovery**: Recover the database from previously created snapshots.
- **Environment Setup**: Easy setup of environment variables for PostgreSQL connections.
## Requirements
- Python 3.12+
- Docker Compose
- PostgreSQL
- EDWH environment variables configured (usually via `edwh setup`)
## Installation
### Development Installation
To install the plugin in development mode, run:
```bash
uv pip install -e .[dev]
```
### Production Installation
For production use, you can install the plugin using:
```bash
uvenv install edwh[devdb]
```
Alternatively, you can add the plugin directly with:
```bash
edwh plugin.add devdb
```
## Usage
### Environment Variables
Ensure the following environment variables are set:
- `POSTGRES_USERNAME`: Username for PostgreSQL (default: `postgres`)
- `POSTGRES_PASSWORD`: Password for PostgreSQL (default: `password`)
- `PGPOOL_PORT`: Port for pgpool (default: `5432`)
- `POSTGRES_DATABASE`: Name of the PostgreSQL database (default: `backend`)
Then you can run `edwh setup` and the other required variables can be infered.
### Commands
#### Create a Snapshot
To create a snapshot of the development database:
```bash
ew devdb.snapshot
```
You can exclude specific tables using optional parameters:
```bash
ew devdb.snapshot --without_api_activity False --without_applog False
```
#### List Snapshots
To list all snapshots in reverse chronological order:
```bash
ew devdb.list
```
#### Rename a Snapshot
To rename the most recent snapshot:
```bash
ew devdb.rename <new_name>
```
#### Push a Snapshot
To push the local snapshot to a remote server:
```bash
ew devdb.push
```
#### Pop a Snapshot
To download and prepare a snapshot from a given URL:
```bash
ew devdb.pop <url>
```
#### Recover a Snapshot
To recover the database from a snapshot:
```bash
ew devdb.recover
```
This assumes an empty database. An easier alternative is:
#### Reset the Database
To reset your database to the latest state:
```bash
ew devdb.reset
```
## Notes
- Be cautious when using the `reset` command as it will clear your PostgreSQL database and remove all existing data.
## Repository
The source code is available at [GitHub](https://github.com/educationwarehouse/edwh-devdb-plugin).
## License
This project is licensed under the MIT License.
Raw data
{
"_id": null,
"home_page": null,
"name": "edwh-devdb-plugin",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "edwh",
"author": null,
"author_email": "Remco Boerma <remco.b@educationwarehouse.nl>, Robin van der Noord <robin.vdn@educationwarehouse.nl>",
"download_url": "https://files.pythonhosted.org/packages/79/5b/f19c0d80de3c0ac0942b3e973ed51971f79bee84b626227179f565a7d884/edwh_devdb_plugin-0.6.1.tar.gz",
"platform": null,
"description": "# EDWH Development Database (`devdb`) Plugin\n\n## Overview\n\nThe EDWH Development Database Plugin provides a comprehensive set of tools for managing snapshots of the development\ndatabase. This plugin allows developers to create, push, pop, recover, and list database snapshots efficiently.\n\n## Features\n\n- **Snapshot Management**: Create and manage snapshots of the development database.\n- **Selective Exclusion**: Optionally exclude specific tables during snapshot creation.\n- **Remote Operations**: Push and pop snapshots to/from a remote server.\n- **Database Recovery**: Recover the database from previously created snapshots.\n- **Environment Setup**: Easy setup of environment variables for PostgreSQL connections.\n\n## Requirements\n\n- Python 3.12+\n- Docker Compose\n- PostgreSQL\n- EDWH environment variables configured (usually via `edwh setup`)\n\n## Installation\n\n### Development Installation\n\nTo install the plugin in development mode, run:\n\n```bash\nuv pip install -e .[dev]\n```\n\n### Production Installation\n\nFor production use, you can install the plugin using:\n\n```bash\nuvenv install edwh[devdb]\n```\n\nAlternatively, you can add the plugin directly with:\n\n```bash\nedwh plugin.add devdb\n```\n\n## Usage\n\n### Environment Variables\n\nEnsure the following environment variables are set:\n\n- `POSTGRES_USERNAME`: Username for PostgreSQL (default: `postgres`)\n- `POSTGRES_PASSWORD`: Password for PostgreSQL (default: `password`)\n- `PGPOOL_PORT`: Port for pgpool (default: `5432`)\n- `POSTGRES_DATABASE`: Name of the PostgreSQL database (default: `backend`)\n\nThen you can run `edwh setup` and the other required variables can be infered.\n\n### Commands\n\n#### Create a Snapshot\n\nTo create a snapshot of the development database:\n\n```bash\new devdb.snapshot\n```\n\nYou can exclude specific tables using optional parameters:\n\n```bash\new devdb.snapshot --without_api_activity False --without_applog False\n```\n\n#### List Snapshots\n\nTo list all snapshots in reverse chronological order:\n\n```bash\new devdb.list\n```\n\n#### Rename a Snapshot\n\nTo rename the most recent snapshot:\n\n```bash\new devdb.rename <new_name>\n```\n\n#### Push a Snapshot\n\nTo push the local snapshot to a remote server:\n\n```bash\new devdb.push\n```\n\n#### Pop a Snapshot\n\nTo download and prepare a snapshot from a given URL:\n\n```bash\new devdb.pop <url>\n```\n\n#### Recover a Snapshot\n\nTo recover the database from a snapshot:\n\n```bash\new devdb.recover\n```\n\nThis assumes an empty database. An easier alternative is:\n\n#### Reset the Database\n\nTo reset your database to the latest state:\n\n```bash\new devdb.reset\n```\n\n## Notes\n\n- Be cautious when using the `reset` command as it will clear your PostgreSQL database and remove all existing data.\n\n## Repository\n\nThe source code is available at [GitHub](https://github.com/educationwarehouse/edwh-devdb-plugin).\n\n## License\n\nThis project is licensed under the MIT License.\n",
"bugtrack_url": null,
"license": null,
"summary": "edwh plugin for quick database snapshot creation and recovery",
"version": "0.6.1",
"project_urls": {
"Documentation": "https://github.com/educationwarehouse/edwh-devdb-plugin#readme",
"Issues": "https://github.com/educationwarehouse/edwh-devdb-plugin/issues",
"Source": "https://github.com/educationwarehouse/edwh-devdb-plugin"
},
"split_keywords": [
"edwh"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7faf96413190198b2373f385d350d7b573b9abf6e0d97b8986c120d53a76ed50",
"md5": "6191676a5bd56df4c6b2dd1231eb5232",
"sha256": "2b37ebd7137d63c2db8565c332aa8e2b864fae760861c52743665155d987b9b8"
},
"downloads": -1,
"filename": "edwh_devdb_plugin-0.6.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6191676a5bd56df4c6b2dd1231eb5232",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 10612,
"upload_time": "2025-10-07T12:51:05",
"upload_time_iso_8601": "2025-10-07T12:51:05.830529Z",
"url": "https://files.pythonhosted.org/packages/7f/af/96413190198b2373f385d350d7b573b9abf6e0d97b8986c120d53a76ed50/edwh_devdb_plugin-0.6.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "795bf19c0d80de3c0ac0942b3e973ed51971f79bee84b626227179f565a7d884",
"md5": "e9e3e9bac22001d979c8186ef817178b",
"sha256": "7fe882af1f22a70235ca45bac14abf16986eb067e963f3cce95ba00ac1ac8224"
},
"downloads": -1,
"filename": "edwh_devdb_plugin-0.6.1.tar.gz",
"has_sig": false,
"md5_digest": "e9e3e9bac22001d979c8186ef817178b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 11896,
"upload_time": "2025-10-07T12:51:04",
"upload_time_iso_8601": "2025-10-07T12:51:04.680779Z",
"url": "https://files.pythonhosted.org/packages/79/5b/f19c0d80de3c0ac0942b3e973ed51971f79bee84b626227179f565a7d884/edwh_devdb_plugin-0.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-07 12:51:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "educationwarehouse",
"github_project": "edwh-devdb-plugin#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "edwh-devdb-plugin"
}