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.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for tableplus_macos_update_creds-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fb27b32b694ac19ec55c88fdb00ec117832364b713c26814f759b5f91743cff6
MD5 bc724aaf10b359c6a0744007e96b188f
BLAKE2b-256 4b8f16908be16f7088ba7ff59a72db0108baf00c2716c409cb766892505055fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tableplus_macos_update_creds-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d0a59525387c5845b22481dbe83f51e016ceff0c3d53b6437d6a62a1b0db96a0
MD5 9326d854e26e9fb10bd472a23d7be65d
BLAKE2b-256 27f4cffef61de78d8ec5009f95a2f9057cae435dadfec115e9cbd8dd6ea55995

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