Skip to main content

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

Project description

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.

History

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

0.1.4 (2024-05-15)

  • Too quick on the trigger! Bug fix with CLI implementation after name added.

0.1.3 (2024-05-15)

  • Bug fix with CLI implementation after name added.

0.1.2 (2024-05-15)

  • Added name argument to name the connection.

0.1.1 (2024-04-23)

  • Moved from argparse to click
  • Moved from python-environ to python-dotenv
  • Fixed bug with production URL

0.1.0 (2024-04-09)

  • First release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tableplus_db_urls-0.1.4.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

tableplus_db_urls-0.1.4-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page