Skip to main content

A collection of helper for sql connections

Project description

connection-helper

PyPI - Version GitHub last commit GitHub License py

usage

install / update package

pip install connection-helper -U

include in python

from connection_helper import sql, pgp, sec

why use connection-helper

connection-helper bundles some packages for connecting to sql databases

  • sql is added as convenience wrapper for retrieving data from sql databases

    • connect_sql() to get get data from ['mssql', 'sqlite','postgres']
    • load_sql_to_sqlite connect to a sql db and transfer a list of tables to sqlite
    • load_sqlite_to_parquet() to get all tables from a sqlite file as parquets
    • unpack_files_to_duckdb() return a tuple of all files of a dir (csv or parquet) into high performance duckdb objects ⚡
    • print_meta() print meta information of a certain database (niche case)
    • azure storage connector 🚧
  • pgp cryptographic tools adapted from python-gnupg. this is a wrapper around gnupg, but only offers some cenvenience or tailored options. feel free to use the original library or the GNU Privacy Guard.

    • encrypt() a message for one or more recipient(s) with a public key
    • decrypt() a message with a private key. Passphrase must be provided via env variable
    • find_key() in keyring
    • ...

💡 The pgp methods require a pgp public/private key in the keyring

  • sec secrets module. ⚠️ this package is optional and must be extra installed with pip install 'connection-helper[sec]' (enclose in '')
    • 🆕 get_infisical_secrets() retrieve secrets from Infisical project (requires existing account and machine identities)

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

connection_helper-0.8.2.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

connection_helper-0.8.2-py3-none-any.whl (11.2 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