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)
    • load_from_mssql() load data from an MSSQL database into a Pandas DataFrame
    • save_to_mssql() save data from a Pandas DataFrame to an MSSQL database
    • load_file_to_duckdb() load data from various sources into a duckdb database, using pandas read functions (experimental)
    • load_sqlite_to_duckdb() converts a SQLite database to a DuckDB database
    • load_mssql_to_duckdb() converts a MSSQL database to a DuckDB database
  • pgp cryptographic tools adapted from python-gnupg. this is a wrapper around gnupg, but only offers some convenience 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)
    • get_bitwarden_secrets() retrieve secrets from Bitwarden vault (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.10.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

connection_helper-0.10.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file connection_helper-0.10.0.tar.gz.

File metadata

  • Download URL: connection_helper-0.10.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for connection_helper-0.10.0.tar.gz
Algorithm Hash digest
SHA256 75dc9d81da8c99cbaef331456961d571d16341861610956c77a5c6c8aa73a492
MD5 c3f008653dd9b2ba329e1a44b6e0a7ca
BLAKE2b-256 a6c348d6ade177319e5776eecfe37c9fd2f1d936411e85c80afa5af4a6cc1fcb

See more details on using hashes here.

File details

Details for the file connection_helper-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for connection_helper-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43d4898239079361e5a157d0307fd7258a3b7af521ba6bafc63c67d1b19e2146
MD5 67a5ec7352c38c61248a3713bf0debcf
BLAKE2b-256 7a1d498e606f9489197ebd85a88b6528c709e5474332e2a626ae10679d2262c1

See more details on using hashes here.

Supported by

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