{ "info": { "author": "Shawn Brown", "author_email": "shawnbrown@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Utilities" ], "description": "\n***********************************************\nsquint: Simple query interface for tabular data\n***********************************************\n\n.. start-inclusion-marker-description\n\nSquint is a light-weight query interface for tabular data that's\neasy to learn and quick to use. A core feature of ``squint`` is that\nthe structure of a query's *selection* matches the structure of its\n*result*. With it you can:\n\n* Select data using Python literals\u2014sets, lists, dictionaries,\n etc.\u2014and get results in the same format.\n* Aggregate, map, filter, reduce, and otherwise manipulate data.\n* Lazily iterate over results, write them to a file, or eagerly\n evaluate them in memory.\n* Analyze data from CSV, Excel, SQL, and other data sources.\n\n.. end-inclusion-marker-description\n\n\nInstallation\n============\n\n.. start-inclusion-marker-install\n\nThe ``squint`` package is tested on Python 2.6, 2.7, 3.2 through 3.8,\nPyPy, and PyPy3; and is freely available under the Apache License,\nversion 2.\n\nThe easiest way to install squint is to use `pip `_:\n\n.. code-block:: console\n\n pip install squint\n\nTo upgrade an existing installation, use the \"``--upgrade``\" option:\n\n.. code-block:: console\n\n pip install --upgrade squint\n\nThe development repository for ``squint`` is hosted on\n`GitHub `_. If you need bug-fixes\nor features that are not available in the current stable release, you can\n\"pip install\" the development version directly from GitHub:\n\n.. code-block:: console\n\n pip install --upgrade https://github.com/shawnbrown/squint/archive/master.zip\n\nAll of the usual caveats for a development install should\napply\u2014only use this version if you can risk some instability\nor if you know exactly what you're doing. While care is taken\nto never break the build, it can happen.\n\n.. end-inclusion-marker-install\n\n\nSome Examples\n=============\n\nThe examples below will query a CSV file containing the following\ndata (**example.csv**):\n\n=== === ===\n A B C\n=== === ===\n x foo 20\n x foo 30\n y foo 10\n y bar 20\n z bar 10\n z bar 10\n=== === ===\n\nTo begin, we load the CSV file into a Select object:\n\n.. code-block:: python\n\n import squint\n\n select = squint.Select('example.csv')\n\n\n+------------------------------+--------------------------------------+\n| When you select a | The result contains a |\n+==============================+======================================+\n| single column | list of values from that column |\n| | |\n| .. code-block:: python | .. code-block:: python |\n| | |\n| select('A') | ['foo', |\n| | 'foo', |\n| | 'foo', |\n| | 'bar', |\n| | 'bar', |\n| | 'bar'] |\n+------------------------------+--------------------------------------+\n| tuple of columns | list of tuples with values from |\n| | those columns |\n| .. code-block:: python | |\n| | .. code-block:: python |\n| select(('A', 'B')) | |\n| | [('x', 'foo'), |\n| | ('x', 'foo'), |\n| | ('y', 'foo'), |\n| | ('y', 'bar'), |\n| | ('z', 'bar'), |\n| | ('z', 'bar')] |\n+------------------------------+--------------------------------------+\n| dictionary of columns | dictionary with keys and values |\n| | from those columns |\n| .. code-block:: python | |\n| | .. code-block:: python |\n| select({'A': 'C'}) | |\n| | {'x': [20, 30], |\n| | 'y': [10, 20], |\n| | 'z': [10, 10]} |\n| | |\n| | (values are grouped by matching |\n| | key) |\n+------------------------------+--------------------------------------+\n| dictionary with a tuple of | dictionary with keys and tuples of |\n| column values | values from those columns |\n| | |\n| .. code-block:: python | .. code-block:: python |\n| | |\n| select({'A': ('B', 'C')}) | {'x': [('foo', 20), ('foo', 30)], |\n| | 'y': [('foo', 10), ('bar', 20)], |\n| | 'z': [('bar', 10), ('bar', 10)]} |\n+------------------------------+--------------------------------------+\n| dictionary with a tuple of | dictionary with tuple keys and |\n| column keys | values from those columns |\n| | |\n| .. code-block:: python | .. code-block:: python |\n| | |\n| select({('A', 'B'): 'C'}) | {('x', 'foo'): [20, 30], |\n| | ('y', 'foo'): [10], |\n| | ('y', 'bar'): [20], |\n| | ('z', 'bar'): [10, 10]} |\n+------------------------------+--------------------------------------+\n\n\n----------\n\nFreely licensed under the Apache License, Version 2.0\n\nCopyright 2015 - 2019 National Committee for an Effective Congress, et al.\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/shawnbrown/squint", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "squint", "package_url": "https://pypi.org/project/squint/", "platform": "", "project_url": "https://pypi.org/project/squint/", "project_urls": { "Homepage": "https://github.com/shawnbrown/squint" }, "release_url": "https://pypi.org/project/squint/0.0.2/", "requires_dist": [ "get-reader[dbf,excel]" ], "requires_python": ">=2.6.7, !=3.0.*, !=3.1.*", "summary": "Simple query interface for tabular data.", "version": "0.0.2" }, "last_serial": 5831031, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7489d389d97de66f79612f29fa4cbfa0", "sha256": "0002b4b7fe22ac4f23e08a6885014f82acf5956f9b95a1126dbd136849485d03" }, "downloads": -1, "filename": "squint-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7489d389d97de66f79612f29fa4cbfa0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6.7, !=3.0.*, !=3.1.*", "size": 39959, "upload_time": "2019-08-12T03:39:37", "url": "https://files.pythonhosted.org/packages/ea/f1/fb2efc97a11bac869ad7672473d75cb0df74bd96d86b98cf94b2e26b3c8d/squint-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be91e9e4589fe9465a91c4d72fc5b84c", "sha256": "dec39b66dc6c3c2460bbabed7d4464776afcae1779ab484735d4b2e47d74866e" }, "downloads": -1, "filename": "squint-0.0.1.tar.gz", "has_sig": false, "md5_digest": "be91e9e4589fe9465a91c4d72fc5b84c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6.7, !=3.0.*, !=3.1.*", "size": 34689, "upload_time": "2019-08-12T03:39:39", "url": "https://files.pythonhosted.org/packages/72/ac/d347553abb096d6ac46b82123a2e9e372a1fab290b811dc434620f5d38cd/squint-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6f5a105b0d17029641e192330bf6cba3", "sha256": "db661455cc32887cf6db72c10555a5e40b7047b5e66e3149740641429dc1d1f4" }, "downloads": -1, "filename": "squint-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6f5a105b0d17029641e192330bf6cba3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6.7, !=3.0.*, !=3.1.*", "size": 41511, "upload_time": "2019-09-15T07:29:07", "url": "https://files.pythonhosted.org/packages/d2/dc/f6959103cb820bbaa642359a37efaceb9a0d11cb71d3721a8bc7b279d74a/squint-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95d85857d3651eafa54a1cc3af94e4e9", "sha256": "3d366eacdf7a1dde2a7827951d01798141eed9fb99cfe0d07ab7de3f306c3dde" }, "downloads": -1, "filename": "squint-0.0.2.tar.gz", "has_sig": false, "md5_digest": "95d85857d3651eafa54a1cc3af94e4e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6.7, !=3.0.*, !=3.1.*", "size": 36274, "upload_time": "2019-09-15T07:29:10", "url": "https://files.pythonhosted.org/packages/89/e1/29b0dcdcaf0f7ea0099de20c728aca1fc071ae1a7d52c9079579803949b6/squint-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6f5a105b0d17029641e192330bf6cba3", "sha256": "db661455cc32887cf6db72c10555a5e40b7047b5e66e3149740641429dc1d1f4" }, "downloads": -1, "filename": "squint-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6f5a105b0d17029641e192330bf6cba3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6.7, !=3.0.*, !=3.1.*", "size": 41511, "upload_time": "2019-09-15T07:29:07", "url": "https://files.pythonhosted.org/packages/d2/dc/f6959103cb820bbaa642359a37efaceb9a0d11cb71d3721a8bc7b279d74a/squint-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95d85857d3651eafa54a1cc3af94e4e9", "sha256": "3d366eacdf7a1dde2a7827951d01798141eed9fb99cfe0d07ab7de3f306c3dde" }, "downloads": -1, "filename": "squint-0.0.2.tar.gz", "has_sig": false, "md5_digest": "95d85857d3651eafa54a1cc3af94e4e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6.7, !=3.0.*, !=3.1.*", "size": 36274, "upload_time": "2019-09-15T07:29:10", "url": "https://files.pythonhosted.org/packages/89/e1/29b0dcdcaf0f7ea0099de20c728aca1fc071ae1a7d52c9079579803949b6/squint-0.0.2.tar.gz" } ] }