sql-helper


Namesql-helper JSON
Version 0.0.18 PyPI version JSON
download
home_pagehttps://github.com/kenjyco/sql-helper
SummaryHelper funcs and tools for working with SQL in mysql, postgresql, and more
upload_time2023-07-10 06:59:02
maintainer
docs_urlNone
authorKen
requires_python
licenseMIT
keywords sql data database cli command-line sqlalchemy mysql postgresql sqlite helper kenjyco
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            About
-----

This is meant to be a simple way to explore a postgresql/mysql/sqlite
database and get data out (super light wrapper to SQLAlchemy).

Connect with DB url in the following formats:

-  ``postgresql://someuser:somepassword@somehost[:someport]/somedatabase``
-  ``mysql://someuser:somepassword@somehost[:someport]/somedatabase``
-  ``sqlite:///somedb.db``

..

   Note: This package uses ``pymysql`` driver for connecting to mysql.
   Urls that start with ``mysql://`` will automatically be changed to
   use ``mysql+pymysql://``.

Install
-------

   Ensure the ``pg_config`` executable is on the system

::

   $ sudo apt-get install -y libpq-dev

   or

   $ brew install postgresql

Then install sql-helper

::

   $ pip3 install sql-helper

Usage
-----

::

   In [1]: from sql_helper import SQL

   In [2]: sql = SQL('postgresql://someuser:somepassword@somehost/somedatabase')

   In [3]: table_names = sql.get_tables()

   In [4]: results = sql.execute('SELECT ...')

Extra
-----

`Redshift <https://aws.amazon.com/redshift/>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Install ``sqlalchemy-redshift`` wherever you installed ``sql-helper``

::

   $ venv/bin/pip3 install sqlalchemy-redshift

Connect with DB url in the following format:

-  ``redshift+psycopg2://someuser:somepassword@somehost/somedatabase``



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kenjyco/sql-helper",
    "name": "sql-helper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "sql,data,database,cli,command-line,sqlalchemy,mysql,postgresql,sqlite,helper,kenjyco",
    "author": "Ken",
    "author_email": "kenjyco@gmail.com",
    "download_url": "https://github.com/kenjyco/sql-helper/tarball/v0.0.18",
    "platform": null,
    "description": "About\n-----\n\nThis is meant to be a simple way to explore a postgresql/mysql/sqlite\ndatabase and get data out (super light wrapper to SQLAlchemy).\n\nConnect with DB url in the following formats:\n\n-  ``postgresql://someuser:somepassword@somehost[:someport]/somedatabase``\n-  ``mysql://someuser:somepassword@somehost[:someport]/somedatabase``\n-  ``sqlite:///somedb.db``\n\n..\n\n   Note: This package uses ``pymysql`` driver for connecting to mysql.\n   Urls that start with ``mysql://`` will automatically be changed to\n   use ``mysql+pymysql://``.\n\nInstall\n-------\n\n   Ensure the ``pg_config`` executable is on the system\n\n::\n\n   $ sudo apt-get install -y libpq-dev\n\n   or\n\n   $ brew install postgresql\n\nThen install sql-helper\n\n::\n\n   $ pip3 install sql-helper\n\nUsage\n-----\n\n::\n\n   In [1]: from sql_helper import SQL\n\n   In [2]: sql = SQL('postgresql://someuser:somepassword@somehost/somedatabase')\n\n   In [3]: table_names = sql.get_tables()\n\n   In [4]: results = sql.execute('SELECT ...')\n\nExtra\n-----\n\n`Redshift <https://aws.amazon.com/redshift/>`__\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nInstall ``sqlalchemy-redshift`` wherever you installed ``sql-helper``\n\n::\n\n   $ venv/bin/pip3 install sqlalchemy-redshift\n\nConnect with DB url in the following format:\n\n-  ``redshift+psycopg2://someuser:somepassword@somehost/somedatabase``\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Helper funcs and tools for working with SQL in mysql, postgresql, and more",
    "version": "0.0.18",
    "project_urls": {
        "Download": "https://github.com/kenjyco/sql-helper/tarball/v0.0.18",
        "Homepage": "https://github.com/kenjyco/sql-helper"
    },
    "split_keywords": [
        "sql",
        "data",
        "database",
        "cli",
        "command-line",
        "sqlalchemy",
        "mysql",
        "postgresql",
        "sqlite",
        "helper",
        "kenjyco"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80fc512ce11bf510ac77bdfc5642d151dcbb89b820dabc5934f6884b576b6f40",
                "md5": "ecd40a36cb4ef933714fcc9f1c57a74e",
                "sha256": "9579b82ba0d97854c25451911b28cb121a7f2a6c0e17cbb07601e089940c0384"
            },
            "downloads": -1,
            "filename": "sql_helper-0.0.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ecd40a36cb4ef933714fcc9f1c57a74e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12188,
            "upload_time": "2023-07-10T06:59:02",
            "upload_time_iso_8601": "2023-07-10T06:59:02.365258Z",
            "url": "https://files.pythonhosted.org/packages/80/fc/512ce11bf510ac77bdfc5642d151dcbb89b820dabc5934f6884b576b6f40/sql_helper-0.0.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-10 06:59:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kenjyco",
    "github_project": "sql-helper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "sql-helper"
}
        
Ken
Elapsed time: 0.08550s