Skip to main content

A python library to update credentials for a connection in TablePlus macOS client without using GUI

Project description

tableplus-macos-update-creds

A python library to update credentials for a connection in TablePlus macOS client without using GUI

TablePlus is a neat SQL GUI client. As virtually any decent SQL client it allows juggling multiple connections, storing the credentials in a secure manner. However, updating a lot of ephemeral credentials via GUI may be quite annoying even though importing connections is supported.

This library's main goal is to allow updating credentials programmatically, without using GUI.

Please note that this project is not affiliated with TablePlus and all the techniques have been developed through (poor) reverse engineering. The library has only been tested against TablePlus 4.2.0 (build 388) on macOS 13.1 with python 3.7/3.8/3.9/3.10. The techniques employed may stop working if any of these happens:

  • TablePlus changes its connections config format
  • TablePlus changes keychain account name format used for storing connection passwords
  • macOS changes ACL mechanics
  • codesign output format changes

Example

The following code may be used as a shell script

#!/usr/bin/env python3

from argparse import ArgumentParser
import sys

from tableplus_macos_update_creds import update_creds


def main():
    parser = ArgumentParser()
    parser.add_argument('--connection', dest='connection')
    parser.add_argument('--username', dest='username')
    parser.add_argument('--password', dest='password')
    args = parser.parse_args(sys.argv[1:])

    update_creds(args.connection, username=args.username, password=args.password)


if __name__ == '__main__':
    main()

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_macos_update_creds-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file tableplus_macos_update_creds-0.1.0.tar.gz.

File metadata

File hashes

Hashes for tableplus_macos_update_creds-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91c19cc4a87b5434ee0b41c31732f72e58ff1aee4bbca406b37c9a49391efb03
MD5 557de0c1c28218fc9e7555993e985b95
BLAKE2b-256 b33e4a21311ffd789d37a0b5349f3a89d26e6b88616b448ba8020499c0c9f82c

See more details on using hashes here.

File details

Details for the file tableplus_macos_update_creds-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tableplus_macos_update_creds-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1257609e0ca2a84c315e08b0e2c36acd75f4838e71f0057b4c1a1de6f31c002c
MD5 fbea689054b812bc65b428a70a700bb8
BLAKE2b-256 2a3e16fdacb2562fb21080cbb4ab51d29372be1813db6b9910b2c372e2bc89d8

See more details on using hashes here.

Supported by

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