tableplus-db-urls

Generate TablePlus DB URLs from CookieCutter Django to make setting up connections easier.


License
MIT
Install
pip install tableplus-db-urls==0.1.0

Documentation

TablePlus DB URLS

Coverage

Overview

Generate TablePlus DB URLs from CookieCutter Django to make setting up connections easier. Yea, I'm that lazy!

It assumes you are using django-cookiecutter with the use_docker=y option and that you are connecting to your Postgres DB over SSH using your private key (~/.ssh/config) in production.

It is looking for your .postgres env files that are generated by cookiecutter at

Installation

$ python3 -m pip install tableplus-db-urls

Usage

# --path should be your django project root
$ tableplus generate --path="." --name="DB Name" --ssh-user="user" --ssh-host="xxx.xxx.x.x"

NOTE: TablePlus DB URLs assumes you use an SSH Key to login and not password.

Then in TablePlus, on the main screen, right-click and choose New > Connection from URL... and use the URLs provided by the output.

Development

make env
make pip_install
make pip_install_editable

Testing

make pytest
make coverage
make open_coverage

Issues

If you experience any issues, please create an issue on GitHub.