Skip to main content

connection-helper

PyPI - Version GitHub last commit GitHub License py

usage

install / update package

uv add connection-helper -U

include in python

from connection_helper import sql, pgp

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
    • apply_duckdb_type_overrides() applies column type overrides to tables in an existing DuckDB database
    • add_duckdb_meta_table() adds a meta table to an existing DuckDB database
    • optimize_duckdb() copies a DuckDB database into a new one and applies optimizations to reduce size

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

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.14.0.tar.gz (19.9 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.14.0-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: connection_helper-0.14.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for connection_helper-0.14.0.tar.gz
Algorithm Hash digest
SHA256 d03140caf06311b66ea36f8782ac2b898e6bf76120b301ae986e756c46e70032
MD5 4ce92f071e9bc7766b4bd9fdb0d93d5e
BLAKE2b-256 42707e224cd76b1b503f140e0d05406ea815a16ed074e6246e31527a5de9618c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for connection_helper-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de87a6bb9865c94f4500d77671cbf38e3e7729fa37cfc61ea26539a2884a6f39
MD5 8ee315afee6695e0268a8d7f9af30750
BLAKE2b-256 d1c12eb3a3c957e9a66115af6c35a53e40cebbd9ce48bff081fc4dd76828f4b8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.14.0 This release

2 files

0.13.4

2 files

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.1

2 files

0.12

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.8

2 files

0.9.7

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.15

2 files

0.8.14

2 files

0.8.13

2 files

0.8.12

2 files

0.8.11

2 files

0.8.10

2 files

0.8.9

2 files

0.8.8

2 files

0.8.7

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page