connection-helper


Nameconnection-helper JSON
Version 0.8.13 PyPI version JSON
download
home_pagehttps://github.com/smeisegeier/connection-helper
SummaryA collection of helper for sql connections
upload_time2025-01-12 11:34:38
maintainerNone
docs_urlNone
authorsmeisegeier
requires_python>=3.10
licenseMIT License
keywords
VCS
bugtrack_url
requirements appnope asttokens build certifi charset-normalizer comm contourpy cycler debugpy decorator docutils exceptiongroup executing fonttools idna importlib-metadata ipykernel ipython jaraco-classes jedi jupyter-client jupyter-core keyring kiwisolver markdown-it-py matplotlib matplotlib-inline mdurl more-itertools nest-asyncio nh3 numpy packaging pandas parso pexpect pillow pip pkginfo platformdirs prompt-toolkit psutil ptyprocess pure-eval pygments pyparsing pyproject-hooks python-dateutil python-dotenv python-gnupg pytz pyzmq readme-renderer requests requests-toolbelt rfc3986 rich seaborn setuptools six sqlalchemy sqlalchemy-utils stack-data tornado traitlets twine typing-extensions tzdata urllib3 wcwidth wheel zipp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
  - 🆕 `load_file_to_duckdb()` load data from various sources into a duckdb database, using pandas read functions (_experimental_)
  - [ ] 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/99/e3/a9c6b11108e228db86af9b3b6ceeb707ec37f15c2e2858ed965a788a142f/connection_helper-0.8.13.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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv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Y3g9IjY0IiBjeT0iODgiIGZpbGw9IiNGRkYiLz4KICA8Y2lyY2xlIHI9IjQiIGN4PSIzNyIgY3k9IjE1IiBmaWxsPSIjRkZGIi8+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  - `load_from_mssql()` load data from an MSSQL database into a Pandas DataFrame\n  - `save_to_mssql()` save data from a Pandas DataFrame to an MSSQL database\n  - \ud83c\udd95 `load_file_to_duckdb()` load data from various sources into a duckdb database, using pandas read functions (_experimental_)\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.13",
    "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": "ff71852190cf44993879077ab77b043f9720d34d7b00b6aefec47705b3bf4387",
                "md5": "7a0a9c5372f93e7097149b315de8fe4f",
                "sha256": "1d904b6682cb55566638a48cf66757d4cd7012b019681d0258c7540b34955aa1"
            },
            "downloads": -1,
            "filename": "connection_helper-0.8.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7a0a9c5372f93e7097149b315de8fe4f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 12995,
            "upload_time": "2025-01-12T11:34:35",
            "upload_time_iso_8601": "2025-01-12T11:34:35.095138Z",
            "url": "https://files.pythonhosted.org/packages/ff/71/852190cf44993879077ab77b043f9720d34d7b00b6aefec47705b3bf4387/connection_helper-0.8.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99e3a9c6b11108e228db86af9b3b6ceeb707ec37f15c2e2858ed965a788a142f",
                "md5": "973bad77d1ebbf7cd12bf0e62a3b7919",
                "sha256": "4442cd2ac9405804f37b0327a087e798735cba074c1d2729b5500eab34ca2229"
            },
            "downloads": -1,
            "filename": "connection_helper-0.8.13.tar.gz",
            "has_sig": false,
            "md5_digest": "973bad77d1ebbf7cd12bf0e62a3b7919",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 14257,
            "upload_time": "2025-01-12T11:34:38",
            "upload_time_iso_8601": "2025-01-12T11:34:38.961090Z",
            "url": "https://files.pythonhosted.org/packages/99/e3/a9c6b11108e228db86af9b3b6ceeb707ec37f15c2e2858ed965a788a142f/connection_helper-0.8.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-12 11:34:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "smeisegeier",
    "github_project": "connection-helper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "appnope",
            "specs": [
                [
                    "==",
                    "0.1.4"
                ]
            ]
        },
        {
            "name": "asttokens",
            "specs": [
                [
                    "==",
                    "2.4.1"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    ">=",
                    "2024.07.04"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.3.2"
                ]
            ]
        },
        {
            "name": "comm",
            "specs": [
                [
                    "==",
                    "0.2.1"
                ]
            ]
        },
        {
            "name": "contourpy",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "cycler",
            "specs": [
                [
                    "==",
                    "0.12.1"
                ]
            ]
        },
        {
            "name": "debugpy",
            "specs": [
                [
                    "==",
                    "1.8.1"
                ]
            ]
        },
        {
            "name": "decorator",
            "specs": [
                [
                    "==",
                    "5.1.1"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.20.1"
                ]
            ]
        },
        {
            "name": "exceptiongroup",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "executing",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "fonttools",
            "specs": [
                [
                    "==",
                    "4.49.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    ">=",
                    "3.7"
                ]
            ]
        },
        {
            "name": "importlib-metadata",
            "specs": [
                [
                    "==",
                    "7.0.2"
                ]
            ]
        },
        {
            "name": "ipykernel",
            "specs": [
                [
                    "==",
                    "6.29.3"
                ]
            ]
        },
        {
            "name": "ipython",
            "specs": [
                [
                    "==",
                    "8.22.2"
                ]
            ]
        },
        {
            "name": "jaraco-classes",
            "specs": [
                [
                    "==",
                    "3.3.1"
                ]
            ]
        },
        {
            "name": "jedi",
            "specs": [
                [
                    "==",
                    "0.19.1"
                ]
            ]
        },
        {
            "name": "jupyter-client",
            "specs": [
                [
                    "==",
                    "8.6.0"
                ]
            ]
        },
        {
            "name": "jupyter-core",
            "specs": [
                [
                    "==",
                    "5.7.1"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "24.3.1"
                ]
            ]
        },
        {
            "name": "kiwisolver",
            "specs": [
                [
                    "==",
                    "1.4.5"
                ]
            ]
        },
        {
            "name": "markdown-it-py",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.8.3"
                ]
            ]
        },
        {
            "name": "matplotlib-inline",
            "specs": [
                [
                    "==",
                    "0.1.6"
                ]
            ]
        },
        {
            "name": "mdurl",
            "specs": [
                [
                    "==",
                    "0.1.2"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.2.0"
                ]
            ]
        },
        {
            "name": "nest-asyncio",
            "specs": [
                [
                    "==",
                    "1.6.0"
                ]
            ]
        },
        {
            "name": "nh3",
            "specs": [
                [
                    "==",
                    "0.2.15"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.26.4"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.2.1"
                ]
            ]
        },
        {
            "name": "parso",
            "specs": [
                [
                    "==",
                    "0.8.3"
                ]
            ]
        },
        {
            "name": "pexpect",
            "specs": [
                [
                    "==",
                    "4.9.0"
                ]
            ]
        },
        {
            "name": "pillow",
            "specs": [
                [
                    ">=",
                    "10.3.0"
                ]
            ]
        },
        {
            "name": "pip",
            "specs": [
                [
                    ">=",
                    "23.3"
                ]
            ]
        },
        {
            "name": "pkginfo",
            "specs": [
                [
                    "==",
                    "1.10.0"
                ]
            ]
        },
        {
            "name": "platformdirs",
            "specs": [
                [
                    "==",
                    "4.2.0"
                ]
            ]
        },
        {
            "name": "prompt-toolkit",
            "specs": [
                [
                    "==",
                    "3.0.43"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    "==",
                    "5.9.8"
                ]
            ]
        },
        {
            "name": "ptyprocess",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "pure-eval",
            "specs": [
                [
                    "==",
                    "0.2.2"
                ]
            ]
        },
        {
            "name": "pygments",
            "specs": [
                [
                    "==",
                    "2.17.2"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.1.2"
                ]
            ]
        },
        {
            "name": "pyproject-hooks",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.9.0.post0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "python-gnupg",
            "specs": [
                [
                    "==",
                    "0.5.2"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2024.1"
                ]
            ]
        },
        {
            "name": "pyzmq",
            "specs": [
                [
                    "==",
                    "25.1.2"
                ]
            ]
        },
        {
            "name": "readme-renderer",
            "specs": [
                [
                    "==",
                    "43.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.32.0"
                ]
            ]
        },
        {
            "name": "requests-toolbelt",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "rfc3986",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.7.1"
                ]
            ]
        },
        {
            "name": "seaborn",
            "specs": [
                [
                    "==",
                    "0.13.2"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    ">=",
                    "70.0.0"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "sqlalchemy",
            "specs": [
                [
                    "==",
                    "2.0.28"
                ]
            ]
        },
        {
            "name": "sqlalchemy-utils",
            "specs": [
                [
                    "==",
                    "0.41.1"
                ]
            ]
        },
        {
            "name": "stack-data",
            "specs": [
                [
                    "==",
                    "0.6.3"
                ]
            ]
        },
        {
            "name": "tornado",
            "specs": [
                [
                    ">=",
                    "6.4.1"
                ]
            ]
        },
        {
            "name": "traitlets",
            "specs": [
                [
                    "==",
                    "5.14.1"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    "==",
                    "4.10.0"
                ]
            ]
        },
        {
            "name": "tzdata",
            "specs": [
                [
                    "==",
                    "2024.1"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    ">=",
                    "2.2.2"
                ]
            ]
        },
        {
            "name": "wcwidth",
            "specs": [
                [
                    "==",
                    "0.2.13"
                ]
            ]
        },
        {
            "name": "wheel",
            "specs": [
                [
                    "==",
                    "0.41.0"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    ">=",
                    "3.19.1"
                ]
            ]
        }
    ],
    "lcname": "connection-helper"
}
        
Elapsed time: 1.30121s