# recreatedb
## Useful for Testing Postgres Databases for Django Deployments
Command Line Interface tool that looks for a database backup in the form of an .sql file, removes a local Postgres database, recreates it, then adds the database data to the newly created one.
To use it assumes you have the Postgres command line tools available on your bash config/profile. If you do not have these tools follow the _Install Postgres App_ section.
## Install recreatedb
To add `recreatedb` to the your path, clone it then run the following to create a simlink.
```bash
# Commands
pip3 install recreatedb
```
## Configure
```bash
# Commands
recreatedb configure
```
This will create a JSON configuration file at `~/.recreatedb`:
```
{
"DATABASE_NAME": "<databse>",
"DATABASE_USER": "<user>",
"DUMP_LOCATION": "<location of SQL file>"
}
```
Please update this with your supplied data.
## Usage
To use `recreatedb` please ensure you have installed Postgres, have updated the `.recreatedb` configuration file, and have a SQL file readily available you wish to load.
```bash
# Commands
recreatedb start
```
## Install Postgres App
This is a GUI interface for PostgreSQL databases. Find it here: https://postgresapp.com/
Post installation it is important to add Postgres's tools to your system path. Based on the official docs run the following:
```bash
# Command
sudo mkdir -p /etc/paths.d &&
echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
```
Use which psql to confirm installation while in the virtualenv.
## Development
* To create edits please branch and clone the repository.
* Cd into the directory and install + activate a new Pipenv.
* To package use setup.py upload
Metadata
Release files for recreatedb 2018.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| recreatedb-2018.5.1.tar.gz | 4.4 kB | Without provenance | Details for recreatedb-2018.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| recreatedb-2018.5.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for recreatedb-2018.5.1-py2.py3-none-any.whl |
Total release size: 9.3 kB
Release files / recreatedb-2018.5.1.tar.gz
| Download URL | recreatedb-2018.5.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15a7b1c33ac2d8c3dc004180c7e6bb68d78593b25da97d8efbf51a942a0b3e62
|
|
BLAKE2b-256 checksum How to use checksums |
77af9833f37b08b78c80806cce64450afa21b489ba17194663c8cac0afdc700e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / recreatedb-2018.5.1-py2.py3-none-any.whl
| Download URL | recreatedb-2018.5.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ea1f378d890648832d2cf91c3110f5dbe6ecc059f9acdc449597e6148c63acbf
|
|
BLAKE2b-256 checksum How to use checksums |
c03d99c7162d36b88bd1e429eb64cc77a976eb3702dfea6a186b4dc8259e65b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for recreatedb 2018.5.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.