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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file tableplus_db_urls-0.1.4.tar.gz.

File metadata

  • Download URL: tableplus_db_urls-0.1.4.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.11

File hashes

Hashes for tableplus_db_urls-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b2c4cd3427a1b734f06edd9e195cff89b1da1b43cce789cc16fbe055827753cd
MD5 2b0acb2a509f82c6977994761a806262
BLAKE2b-256 573b9f25023ddc643030fea4be4cb7439251417812ec5840cd76fb4f202446d8

See more details on using hashes here.

File details

Details for the file tableplus_db_urls-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for tableplus_db_urls-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0cee465efe3c2c99dbb548134eeef554b2a854ae0ea3474e9a8a443397e6b95c
MD5 9ecfb72a847d2bf342b626bddb550319
BLAKE2b-256 effe290d02672c9df41d390b03c1ad2e1ec5363c162f77387bf9da18abe313ff

See more details on using hashes here.

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