{ "info": { "author": "Fritz Larco", "author_email": "flarco@live.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "Operating System :: MacOS", "Operating System :: Unix", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "xutil\n=====\n\nThis is a Python package containing all the utility functions and libraries that are commonly used.\n\nInstall\n=======\n\n.. code-block::\n\n pip install xutil\n pip install xutil[jdbc] # for JDBC connectivity. Requires JPype1.\n pip install xutil[web] # for web scraping. Requires Twisted.\n pip install xutil[hive] # for Hive connectivity. Requires SASL libraries.\n\nWindows\n-------\n\nIf you face the message 'error: Microsoft Visual C++ 14.0 is required. Get it with \"Microsoft Visual C++ Build Tools\"', you can quickly install the build tools with chocolatey (https://chocolatey.org/)\n\n.. code-block::\n\n choco install -y VisualCppBuildTools\n\nCLI\n===\n\nAvailable commands:\n\n.. code-block:: bash\n\n xutil-alias # add useful alias commands, see xutil/alias.sh\n xutil-create-profile # creates ~/profile.yaml from template.\n exec-etl --help # Execute various ETL operations.\n exec-sql --help # Execute SQL from command line\n ipy # launch ipython with pre-defined modules/functions imported\n ipy-spark --help # launch ipython Spark with pre-defined modules/functions imported\n pykill pattern # will swiftly kill any process with the command string mathing pattern\n\nDatabases\n=========\n\nWhy not use SQLAlchemy (SA)? http://docs.sqlalchemy.org/en/latest/faq/performance.html#i-m-inserting-400-000-rows-with-the-orm-and-it-s-really-slow\n\nIt has been demontrated the SA is not performant when it comes to speedy ETL.\n\nSQL Server\n----------\n\nInstallation\n^^^^^^^^^^^^\n\nMake sure ODBC is installed.\n\n.. code-block::\n\n brew install unixodbc\n apt-get install unixodbc\n\nThen, install the drivers\n\nhttps://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017\n\n.. code-block::\n\n odbcinst -j\n\nOracle\n------\n\nInstall Oracle Client:\n\n.. code-block::\n\n brew tap InstantClientTap/instantclient\n brew install instantclient-basic\n\nInstalling with conda:\n\n.. code-block:: bash\n\n conda install oracle-instantclient -y\n\nSpark SQL\n---------\n\nIt is the user's responsibility to properly set up the SPARK_HOME environment and configurations.\nThis library uses pyspark and will default to the SPARK_HOME settings.\n\nUseful config.py\n================\n\nhttps://github.com/apache/incubator-airflow/blob/master/setup.py\n\nhttps://github.com/dask/dask/blob/master/setup.py\n\nhttps://github.com/tartley/colorama/blob/master/setup.py\n\nDev\n===\n\n.. code-block::\n\n pip install -e /path/to/xutil\n\nTesting\n-------\n\n.. code-block::\n\n python setup.py test\n\nRelease\n-------\n\n\n* Update version in `setup.py <./setup.py>`_.\n* Draft new release on Github: https://github.com/flarco/xutil/releases/new\n\n.. code-block::\n\n git clone https://github.com/flarco/xutil.git\n cd xutil\n m2r --overwrite README.md\n python setup.py sdist && twine upload --skip-existing dist/*\n\nTODO\n====\n\nRevamp ``database.base`` methods:\n-------------------------------------\n\n.. code-block::\n\n get_conn\n DBConn\n __init__\n _set_variables\n _do_execute\n _split_schema_table\n _concat_fields\n _template\n\n connect\n check_pk\n execute -- straight SA.connection.execute, return \"fields, rows\"\n query -- use the SQLAlachy and replaces self.select, fields = conn._fields\"\n stream\n insert\n drop_table\n create_table\n get_cursor_fields -> _get_cursor_fields\n get_schemas\n get_objects\n get_tables\n get_views\n get_columns\n get_primary_keys\n get_indexes\n get_ddl\n get_all_columns\n get_all_tables\n analyze_fields\n analyze_tables\n analyze_join_match\n\n remove:\n get_cursor: no need for get_cursor with SA\n execute_multi\n select: use `query` instead, which uses `execute`", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/flarco/xutil/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/flarco/xutil", "keywords": "xutil", "license": "", "maintainer": "", "maintainer_email": "", "name": "xutil", "package_url": "https://pypi.org/project/xutil/", "platform": "", "project_url": "https://pypi.org/project/xutil/", "project_urls": { "Download": "https://github.com/flarco/xutil/archive/master.zip", "Homepage": "https://github.com/flarco/xutil" }, "release_url": "https://pypi.org/project/xutil/0.1.9/", "requires_dist": null, "requires_python": "", "summary": "Extra Useful Utilities.", "version": "0.1.9" }, "last_serial": 5978692, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f0d96e616249bba781f2aec5785e8963", "sha256": "b05b7b9e5a8123be377aaba1410d40e73b18c04ee1ba177b29db19d0eb0773d7" }, "downloads": -1, "filename": "xutil-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f0d96e616249bba781f2aec5785e8963", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12764253, "upload_time": "2019-03-17T15:26:07", "url": "https://files.pythonhosted.org/packages/7b/56/808e65e111a2963d96c3eb946c4926f905d4cd26c5240df9f89b9796ce11/xutil-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "f35e35f6b3a2a09dbe9297fe0b6c3a76", "sha256": "70b701e4be6fb0d588387adbaffaded43f7ccaeb7ac5b1dfebd8d7ba8554fcac" }, "downloads": -1, "filename": "xutil-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f35e35f6b3a2a09dbe9297fe0b6c3a76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12765550, "upload_time": "2019-03-17T17:18:44", "url": "https://files.pythonhosted.org/packages/cf/15/521e18c7bf067fe7bc6c208c18f3e8c00bd397652f64bed7d3e29c7e6d2e/xutil-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "77de7514647387d591382e932bcf6cf2", "sha256": "34f04674fb923e1151278ef986b517811c12022768830f9a3bf02ae906597bd6" }, "downloads": -1, "filename": "xutil-0.0.3.tar.gz", "has_sig": false, "md5_digest": "77de7514647387d591382e932bcf6cf2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12767252, "upload_time": "2019-03-18T19:49:33", "url": "https://files.pythonhosted.org/packages/b6/56/4d8ef178bec7da8cd0bbcfc77e41e2d1a0c4f1851b4f098227720f13b216/xutil-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "45898afcaf6718de7e33a69ddacb2f80", "sha256": "11bb4de54b0d192c802bf521e090126bf8fecbd7f487aece67d09ca799893b5f" }, "downloads": -1, "filename": "xutil-0.0.4.tar.gz", "has_sig": false, "md5_digest": "45898afcaf6718de7e33a69ddacb2f80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12767557, "upload_time": "2019-03-19T01:46:15", "url": "https://files.pythonhosted.org/packages/65/06/4459571bda7d74293a3f0d1ccd98040503eeca1c5d795545d7fa7bcc93ec/xutil-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "aa1fabb9bde8c236561e1583f1a63177", "sha256": "19bebb2b8c475d7b8559ec94f4c2dbe52a83d9113084c32e801fc04eda2fb0c7" }, "downloads": -1, "filename": "xutil-0.0.5.tar.gz", "has_sig": false, "md5_digest": "aa1fabb9bde8c236561e1583f1a63177", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12767583, "upload_time": "2019-03-19T02:54:28", "url": "https://files.pythonhosted.org/packages/c8/26/58e81acb4555cefc4c5b680bea4bf4456285cd28721506cad5170ea5c031/xutil-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "a37b899e8c9c4e8fa67e6354bf1baf2a", "sha256": "a6c0d93ddc629dce26267b2d4bb6ee673fc8246e280b56becf370954c5e9b04f" }, "downloads": -1, "filename": "xutil-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a37b899e8c9c4e8fa67e6354bf1baf2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12767572, "upload_time": "2019-03-24T02:10:06", "url": "https://files.pythonhosted.org/packages/1f/b5/538e41fce1af964d2586b5ecb98b67aaa3991fffe90292f26b5267679ba8/xutil-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "96cd25f2a7208d3ecd1b5d5cc3eb155d", "sha256": "fbd4ce8fe6499a371dda4b581235a1fef9dd1877b0b5950484e8635c3ff95f45" }, "downloads": -1, "filename": "xutil-0.0.7.tar.gz", "has_sig": false, "md5_digest": "96cd25f2a7208d3ecd1b5d5cc3eb155d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12790568, "upload_time": "2019-04-29T01:59:44", "url": "https://files.pythonhosted.org/packages/98/ec/4332553c152c845500a45b21f66ff75330082872d4f534ed0a2b0971df73/xutil-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "4cb51a011408f3c71b9dd64a6b3c32be", "sha256": "9d2fe78d4a412a6fbddc6d2710bd4feeaf044b48b2a4dc63acbccf745224c2f2" }, "downloads": -1, "filename": "xutil-0.0.8.tar.gz", "has_sig": false, "md5_digest": "4cb51a011408f3c71b9dd64a6b3c32be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12772128, "upload_time": "2019-05-02T19:47:46", "url": "https://files.pythonhosted.org/packages/59/8f/fa8554c2a670541ba4934586aafabb73bd9745994c0a27798ab2329ce203/xutil-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "561fa64d8024c2440a4d7b7a4530a142", "sha256": "fbd5b7f367a676a9d033b0bed6dc196134e8e1d2c5d9b725d21666ede0f1b76e" }, "downloads": -1, "filename": "xutil-0.0.9.tar.gz", "has_sig": false, "md5_digest": "561fa64d8024c2440a4d7b7a4530a142", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12772197, "upload_time": "2019-05-02T20:44:41", "url": "https://files.pythonhosted.org/packages/eb/9b/c0cad1d9fa9f18bb70a54bbd3f90a0cf24aba9a02f701941f0304ecb8b0b/xutil-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "8fcf6e1d9f27cd4ad51e938f440045eb", "sha256": "ae7c231007be0b81ed12137b6c04ca902bc29f23c48b7c6809367bdd1d46b25e" }, "downloads": -1, "filename": "xutil-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8fcf6e1d9f27cd4ad51e938f440045eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12791345, "upload_time": "2019-05-05T15:56:11", "url": "https://files.pythonhosted.org/packages/26/c3/783118cd16340d5118fb2d357c4399857c817d79a41fa3c198b5bf12295e/xutil-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d69dc4e2aaf15b3f869a0b94af35d6ef", "sha256": "fb9fc2fa7d5925b18f062513154b0a8705c0de80813e904e4ae85d9f3fac133e" }, "downloads": -1, "filename": "xutil-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d69dc4e2aaf15b3f869a0b94af35d6ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12774449, "upload_time": "2019-05-14T13:20:35", "url": "https://files.pythonhosted.org/packages/f0/a6/47808e8acdf1821a4b889e136fac8c948b083543f03f8eb6f07345a05e1e/xutil-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "fd84b32eb9eb8969772015b8de970825", "sha256": "c71ab738608aa09e6f5a85fff50b07abe20e7f3cbd8bf997606dea2891ca749f" }, "downloads": -1, "filename": "xutil-0.1.2.tar.gz", "has_sig": false, "md5_digest": "fd84b32eb9eb8969772015b8de970825", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12791148, "upload_time": "2019-07-14T20:52:02", "url": "https://files.pythonhosted.org/packages/12/3e/0fb4eed84dd1215d0ff2142c27b6da1438392b54bd60039da00b67d4416d/xutil-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "bef6032375c77510096ff4ff61e192d7", "sha256": "482008521fdd7c1649adbd250784900da917d05a6e997f978f975bfed401e639" }, "downloads": -1, "filename": "xutil-0.1.3.tar.gz", "has_sig": false, "md5_digest": "bef6032375c77510096ff4ff61e192d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12791180, "upload_time": "2019-10-11T16:04:18", "url": "https://files.pythonhosted.org/packages/0e/88/f3b69e4ea36409298a95ac0e351ce719e0657fb01bec6ac08f978eb0aaea/xutil-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "8ef2e253402b405b79adefa1d00074b0", "sha256": "7d63fd7d32a11dedc1a30ec737b5ec50f05b34a3ea840657528c5a8795420e91" }, "downloads": -1, "filename": "xutil-0.1.4.tar.gz", "has_sig": false, "md5_digest": "8ef2e253402b405b79adefa1d00074b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12711946, "upload_time": "2019-10-15T00:22:20", "url": "https://files.pythonhosted.org/packages/04/0b/8435896490215d5eeeb8f36612b44d88a943877f25531b365d1f7bad4095/xutil-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "07fb0b827566bcbfc52349ab41f000ef", "sha256": "5fd2e82fead2779aeecda30c3a0b10dca1a5ed4d200f6a798bb190be4b9c6db3" }, "downloads": -1, "filename": "xutil-0.1.5.tar.gz", "has_sig": false, "md5_digest": "07fb0b827566bcbfc52349ab41f000ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12711982, "upload_time": "2019-10-15T01:26:29", "url": "https://files.pythonhosted.org/packages/de/bc/bc771065080d265e08a0de0ec97a8df592cd8a96456df64b61fcc7cdc756/xutil-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "4806720cf978575f08d15f0e1ac73cfa", "sha256": "91cbc8feeecbf917a75d8ec3901ec289548a9691f5d3bdf7f23987872cb84b3c" }, "downloads": -1, "filename": "xutil-0.1.6.tar.gz", "has_sig": false, "md5_digest": "4806720cf978575f08d15f0e1ac73cfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12711942, "upload_time": "2019-10-15T01:42:37", "url": "https://files.pythonhosted.org/packages/cd/af/0fcae2de9b3c94abebfba52a99e35f80e5b61c0e97ea630ae25021626fd7/xutil-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "efba80fe9fc7361c5f5901a33f5b8dfc", "sha256": "35a5771066fc6eef79df8b161379ca561f1158dc218bf01ce867d482fd12340a" }, "downloads": -1, "filename": "xutil-0.1.7.tar.gz", "has_sig": false, "md5_digest": "efba80fe9fc7361c5f5901a33f5b8dfc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12711960, "upload_time": "2019-10-15T02:15:09", "url": "https://files.pythonhosted.org/packages/26/6d/e7e9805ab9353abd32c88fc0739b610cf08c9aeca7d147f5679eed65a359/xutil-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "27f3351645e4865e9303bcb2e98a6c59", "sha256": "0c45798e2ce6ffa98437e528619b478ebfaf6ed705b88dc6a9d8e9e8827b0785" }, "downloads": -1, "filename": "xutil-0.1.8.tar.gz", "has_sig": false, "md5_digest": "27f3351645e4865e9303bcb2e98a6c59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12712019, "upload_time": "2019-10-15T11:22:52", "url": "https://files.pythonhosted.org/packages/47/8b/4c109f0186abb6fcb9b2bcc8b7be95eb9a8c2d244c3bedec1b381c7377e5/xutil-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "fac29690b25898500dc36b4fdeeb0faf", "sha256": "a38257ab56c18279d7bcbc2ec8e0ef5c92ae6e5134860d6659cb57747a1906eb" }, "downloads": -1, "filename": "xutil-0.1.9.tar.gz", "has_sig": false, "md5_digest": "fac29690b25898500dc36b4fdeeb0faf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12712037, "upload_time": "2019-10-15T18:15:03", "url": "https://files.pythonhosted.org/packages/73/d9/3be096130cdfb8cbfb3bf174e7e9c86362893e4c5e2d089bb9fcfbbdf6ee/xutil-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fac29690b25898500dc36b4fdeeb0faf", "sha256": "a38257ab56c18279d7bcbc2ec8e0ef5c92ae6e5134860d6659cb57747a1906eb" }, "downloads": -1, "filename": "xutil-0.1.9.tar.gz", "has_sig": false, "md5_digest": "fac29690b25898500dc36b4fdeeb0faf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12712037, "upload_time": "2019-10-15T18:15:03", "url": "https://files.pythonhosted.org/packages/73/d9/3be096130cdfb8cbfb3bf174e7e9c86362893e4c5e2d089bb9fcfbbdf6ee/xutil-0.1.9.tar.gz" } ] }