# connection-helper
![PyPI - Version](https://img.shields.io/pypi/v/connection-helper) ![GitHub last commit](https://img.shields.io/github/last-commit/smeisegeier/connection-helper?logo=github) ![GitHub License](https://img.shields.io/github/license/smeisegeier/connection-helper?logo=github) ![py](https://img.shields.io/badge/python-3.10_|_3.11_|_3.12-blue.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icHlZZWxsb3ciIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoNDUpIj4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI2ZlNSIgb2Zmc2V0PSIwLjYiLz4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI2RhMSIgb2Zmc2V0PSIxIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJweUJsdWUiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoNDUpIj4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzY5ZiIgb2Zmc2V0PSIwLjQiLz4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzQ2OCIgb2Zmc2V0PSIxIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KCiAgPHBhdGggZD0iTTI3LDE2YzAtNyw5LTEzLDI0LTEzYzE1LDAsMjMsNiwyMywxM2wwLDIyYzAsNy01LDEyLTExLDEybC0yNCwwYy04LDAtMTQsNi0xNCwxNWwwLDEwbC05LDBjLTgsMC0xMy05LTEzLTI0YzAtMTQsNS0yMywxMy0yM2wzNSwwbDAtM2wtMjQsMGwwLTlsMCwweiBNODgsNTB2MSIgZmlsbD0idXJsKCNweUJsdWUpIi8+CiAgPHBhdGggZD0iTTc0LDg3YzAsNy04LDEzLTIzLDEzYy0xNSwwLTI0LTYtMjQtMTNsMC0yMmMwLTcsNi0xMiwxMi0xMmwyNCwwYzgsMCwxNC03LDE0LTE1bDAtMTBsOSwwYzcsMCwxMyw5LDEzLDIzYzAsMTUtNiwyNC0xMywyNGwtMzUsMGwwLDNsMjMsMGwwLDlsMCwweiBNMTQwLDUwdjEiIGZpbGw9InVybCgjcHlZZWxsb3cpIi8+CgogIDxjaXJjbGUgcj0iNCIgY3g9IjY0IiBjeT0iODgiIGZpbGw9IiNGRkYiLz4KICA8Y2lyY2xlIHI9IjQiIGN4PSIzNyIgY3k9IjE1IiBmaWxsPSIjRkZGIi8+Cjwvc3ZnPgo=)
## usage
install / update package
```bash
pip install connection-helper -U
```
include in python
```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
- [ ] azure storage connector 🚧
- `pgp` cryptographic tools adapted from [python-gnupg](https://github.com/vsajip/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](https://gnupg.org/).
- `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](https://infisical.com/) project (requires existing account and machine identities)
Raw data
{
"_id": null,
"home_page": "https://github.com/smeisegeier/connection-helper",
"name": "connection-helper",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "smeisegeier",
"author_email": "dexterDSDo@googlemail.com",
"download_url": "https://files.pythonhosted.org/packages/37/30/a3a0a6086d6cde3f7cf2a725bc23ada8638a9b8973f718a9c32d30c9791e/connection_helper-0.8.4.tar.gz",
"platform": null,
"description": "# connection-helper\n\n![PyPI - Version](https://img.shields.io/pypi/v/connection-helper) ![GitHub last commit](https://img.shields.io/github/last-commit/smeisegeier/connection-helper?logo=github) ![GitHub License](https://img.shields.io/github/license/smeisegeier/connection-helper?logo=github) ![py](https://img.shields.io/badge/python-3.10_|_3.11_|_3.12-blue.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icHlZZWxsb3ciIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoNDUpIj4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI2ZlNSIgb2Zmc2V0PSIwLjYiLz4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI2RhMSIgb2Zmc2V0PSIxIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJweUJsdWUiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoNDUpIj4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzY5ZiIgb2Zmc2V0PSIwLjQiLz4KICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzQ2OCIgb2Zmc2V0PSIxIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KCiAgPHBhdGggZD0iTTI3LDE2YzAtNyw5LTEzLDI0LTEzYzE1LDAsMjMsNiwyMywxM2wwLDIyYzAsNy01LDEyLTExLDEybC0yNCwwYy04LDAtMTQsNi0xNCwxNWwwLDEwbC05LDBjLTgsMC0xMy05LTEzLTI0YzAtMTQsNS0yMywxMy0yM2wzNSwwbDAtM2wtMjQsMGwwLTlsMCwweiBNODgsNTB2MSIgZmlsbD0idXJsKCNweUJsdWUpIi8+CiAgPHBhdGggZD0iTTc0LDg3YzAsNy04LDEzLTIzLDEzYy0xNSwwLTI0LTYtMjQtMTNsMC0yMmMwLTcsNi0xMiwxMi0xMmwyNCwwYzgsMCwxNC03LDE0LTE1bDAtMTBsOSwwYzcsMCwxMyw5LDEzLDIzYzAsMTUtNiwyNC0xMywyNGwtMzUsMGwwLDNsMjMsMGwwLDlsMCwweiBNMTQwLDUwdjEiIGZpbGw9InVybCgjcHlZZWxsb3cpIi8+CgogIDxjaXJjbGUgcj0iNCIgY3g9IjY0IiBjeT0iODgiIGZpbGw9IiNGRkYiLz4KICA8Y2lyY2xlIHI9IjQiIGN4PSIzNyIgY3k9IjE1IiBmaWxsPSIjRkZGIi8+Cjwvc3ZnPgo=)\n\n## usage\n\ninstall / update package\n\n```bash\npip install connection-helper -U\n```\n\ninclude in python\n\n```python\nfrom connection_helper import sql, pgp, sec\n```\n\n## why use connection-helper\n\n`connection-helper` bundles some packages for connecting to sql databases\n\n- `sql` is added as convenience wrapper for retrieving data from sql databases\n - `connect_sql()` to get get data from `['mssql', 'sqlite','postgres']`\n - `load_sql_to_sqlite` connect to a sql db and transfer a list of tables to `sqlite`\n - `load_sqlite_to_parquet()` to get all tables from a sqlite file as parquets\n - `unpack_files_to_duckdb()` return a tuple of all files of a dir (csv or parquet) into high performance duckdb objects \u26a1\n - `print_meta()` print meta information of a certain database (niche case)\n - \ud83c\udd95 `load_from_mssql()` load data from an MSSQL database into a Pandas DataFrame\n - \ud83c\udd95 `save_to_mssql()` save data from a Pandas DataFrame to an MSSQL database\n - [ ] azure storage connector \ud83d\udea7\n\n- `pgp` cryptographic tools adapted from [python-gnupg](https://github.com/vsajip/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](https://gnupg.org/).\n - `encrypt()` a message for one or more recipient(s) with a public key\n - `decrypt()` a message with a private key. Passphrase must be provided via env variable\n - `find_key()` in keyring\n - ...\n\n> \ud83d\udca1 The pgp methods require a pgp public/private key in the keyring\n\n- `sec` secrets module. \u26a0\ufe0f this package is optional and must be extra installed with `pip install 'connection-helper[sec]'` (enclose in '')\n - \ud83c\udd95 `get_infisical_secrets()` retrieve secrets from [Infisical](https://infisical.com/) project (requires existing account and machine identities)\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "A collection of helper for sql connections",
"version": "0.8.4",
"project_urls": {
"Bug Tracker": "https://github.com/smeisegeier/connection-helper/issues",
"Documentation": "https://github.com/smeisegeier/connection-helper",
"Homepage": "https://github.com/smeisegeier/connection-helper",
"Source Code": "https://github.com/smeisegeier/connection-helper"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7bdc4d0bae8cf6dac548708dbcf4615d9e6c6eaa2f1130ac52e8b5d64aa42712",
"md5": "7f3915550be0f195fade9f2286f02ef5",
"sha256": "ffeb1c2c8ac6e1259a7f327f40351a5cf1731beee868af71f03b98d958a102ab"
},
"downloads": -1,
"filename": "connection_helper-0.8.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f3915550be0f195fade9f2286f02ef5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 12154,
"upload_time": "2024-09-05T11:29:52",
"upload_time_iso_8601": "2024-09-05T11:29:52.525272Z",
"url": "https://files.pythonhosted.org/packages/7b/dc/4d0bae8cf6dac548708dbcf4615d9e6c6eaa2f1130ac52e8b5d64aa42712/connection_helper-0.8.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3730a3a0a6086d6cde3f7cf2a725bc23ada8638a9b8973f718a9c32d30c9791e",
"md5": "0069238b4927255ac33a953f5246f5b5",
"sha256": "43c8b510a97981e5264b1269e5bf48d252e8d514c7c4afc0a554d0f710be2b03"
},
"downloads": -1,
"filename": "connection_helper-0.8.4.tar.gz",
"has_sig": false,
"md5_digest": "0069238b4927255ac33a953f5246f5b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 13378,
"upload_time": "2024-09-05T11:29:53",
"upload_time_iso_8601": "2024-09-05T11:29:53.924574Z",
"url": "https://files.pythonhosted.org/packages/37/30/a3a0a6086d6cde3f7cf2a725bc23ada8638a9b8973f718a9c32d30c9791e/connection_helper-0.8.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-05 11:29:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "smeisegeier",
"github_project": "connection-helper",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "connection-helper"
}