{ "info": { "author": "Trey Morris", "author_email": "trey@treymorris.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License" ], "description": "truths - auto generate truth tables\n===================================\n\ntruths is a simple tool that allows you to quickly generate a truth\ntable from python variable names and phrases\n\ninstall\n-------\n\n``pip install truths`` or ``git clone`` and ``pip install -e`` to play\nwith the code\n\nuse is simple:\n~~~~~~~~~~~~~~\n\nstart by creating some base variables\n\n.. code:: python\n\n import truths\n print truths.Truths(['a', 'b', 'x'])\n\n::\n\n +---+---+---+\n | a | b | x |\n +---+---+---+\n | 0 | 0 | 0 |\n | 0 | 0 | 1 |\n | 0 | 1 | 0 |\n | 0 | 1 | 1 |\n | 1 | 0 | 0 |\n | 1 | 0 | 1 |\n | 1 | 1 | 0 |\n | 1 | 1 | 1 |\n +---+---+---+\n\nadd some phrases\n~~~~~~~~~~~~~~~~\n\nnow let's use those base variables and pass in some phrases! your base\nvariables can be anything you want but must be valid python variable\nnames. the phrases also have to be valid python\n\n.. code:: python\n\n from truths import Truths\n print Truths(['a', 'b', 'cat', 'has_address'], ['(a and b)', 'a and b or cat', 'a and (b or cat) or has_address'])\n\n::\n\n +---+---+-----+-------------+-----------+----------------+---------------------------------+\n | a | b | cat | has_address | (a and b) | a and b or cat | a and (b or cat) or has_address |\n +---+---+-----+-------------+-----------+----------------+---------------------------------+\n | 0 | 0 | 0 | 0 | 0 | 0 | 0 |\n | 0 | 0 | 0 | 1 | 0 | 0 | 1 |\n | 0 | 0 | 1 | 0 | 0 | 1 | 0 |\n | 0 | 0 | 1 | 1 | 0 | 1 | 1 |\n | 0 | 1 | 0 | 0 | 0 | 0 | 0 |\n | 0 | 1 | 0 | 1 | 0 | 0 | 1 |\n | 0 | 1 | 1 | 0 | 0 | 1 | 0 |\n | 0 | 1 | 1 | 1 | 0 | 1 | 1 |\n | 1 | 0 | 0 | 0 | 0 | 0 | 0 |\n | 1 | 0 | 0 | 1 | 0 | 0 | 1 |\n | 1 | 0 | 1 | 0 | 0 | 1 | 1 |\n | 1 | 0 | 1 | 1 | 0 | 1 | 1 |\n | 1 | 1 | 0 | 0 | 1 | 1 | 1 |\n | 1 | 1 | 0 | 1 | 1 | 1 | 1 |\n | 1 | 1 | 1 | 0 | 1 | 1 | 1 |\n | 1 | 1 | 1 | 1 | 1 | 1 | 1 |\n +---+---+-----+-------------+-----------+----------------+---------------------------------+\n\nprefer boolean words?\n~~~~~~~~~~~~~~~~~~~~~\n\nneat eh? if you prefer True/False over the numbers pass ``ints=False``:\n\n.. code:: python\n\n from truths import Truths\n print Truths(['a', 'b', 'x', 'd'], ['(a and b)', 'a and b or x', 'a and (b or x) or d'], ints=False)\n\n::\n\n +-------+-------+-------+-------+-----------+--------------+---------------------+\n | a | b | x | d | (a and b) | a and b or x | a and (b or x) or d |\n +-------+-------+-------+-------+-----------+--------------+---------------------+\n | False | False | False | False | False | False | False |\n | False | False | False | True | False | False | True |\n | False | False | True | False | False | True | False |\n | False | False | True | True | False | True | True |\n | False | True | False | False | False | False | False |\n | False | True | False | True | False | False | True |\n | False | True | True | False | False | True | False |\n | False | True | True | True | False | True | True |\n | True | False | False | False | False | False | False |\n | True | False | False | True | False | False | True |\n | True | False | True | False | False | True | True |\n | True | False | True | True | False | True | True |\n | True | True | False | False | True | True | True |\n | True | True | False | True | True | True | True |\n | True | True | True | False | True | True | True |\n | True | True | True | True | True | True | True |\n +-------+-------+-------+-------+-----------+--------------+---------------------+\n\nhow it works\n~~~~~~~~~~~~\n\ncheck out the code! behind the scenes it's putting the bases in an\nobject context and generating a grid of values for them. then, the\nphrases are ``eval``\\ uated in the object's context against each row in\nthat grid of values", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tr3buchet/truths", "keywords": "truth,table,truth table,truthtable,logic", "license": "Apache Software License", "maintainer": null, "maintainer_email": null, "name": "truths", "package_url": "https://pypi.org/project/truths/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/truths/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tr3buchet/truths" }, "release_url": "https://pypi.org/project/truths/1.2/", "requires_dist": null, "requires_python": null, "summary": "auto generate truth tables", "version": "1.2" }, "last_serial": 2217818, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "5ea8ac6b2bdefd2ac836139fd0ef7b77", "sha256": "d091541fca9d7f3bb272969bf062c57e5478f868f21b1e670430ff2f0fd2db42" }, "downloads": -1, "filename": "truths-1.0.tar.gz", "has_sig": false, "md5_digest": "5ea8ac6b2bdefd2ac836139fd0ef7b77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7317, "upload_time": "2016-07-12T22:06:59", "url": "https://files.pythonhosted.org/packages/1d/bc/1f401fec2f97ed3a56295c78f651064f623967dc19a369ddc36341ee35cb/truths-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "773dc44f34572633a466a611653e57c8", "sha256": "b05db75ea0a325460f2dec53b3106c7d08c8b7aa18048145bbb9329b212b3105" }, "downloads": -1, "filename": "truths-1.1.tar.gz", "has_sig": false, "md5_digest": "773dc44f34572633a466a611653e57c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7333, "upload_time": "2016-07-12T23:20:49", "url": "https://files.pythonhosted.org/packages/fb/44/e402c9015cf0dfc20c9c4c2010b23d5d53704fad7b533dfec59358efb799/truths-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "24d07f68ad2b0718f42529ca596ffd93", "sha256": "99287a3da4f8982b90613f0aafae5fa94fc001560fa881ec3c8ea3963ed8362b" }, "downloads": -1, "filename": "truths-1.2.tar.gz", "has_sig": false, "md5_digest": "24d07f68ad2b0718f42529ca596ffd93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7597, "upload_time": "2016-07-12T23:37:39", "url": "https://files.pythonhosted.org/packages/3f/5a/bbdd1bd5caebb13cbbe23a4a4b7458e449235c8e8ea7075a34a48676ace7/truths-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "24d07f68ad2b0718f42529ca596ffd93", "sha256": "99287a3da4f8982b90613f0aafae5fa94fc001560fa881ec3c8ea3963ed8362b" }, "downloads": -1, "filename": "truths-1.2.tar.gz", "has_sig": false, "md5_digest": "24d07f68ad2b0718f42529ca596ffd93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7597, "upload_time": "2016-07-12T23:37:39", "url": "https://files.pythonhosted.org/packages/3f/5a/bbdd1bd5caebb13cbbe23a4a4b7458e449235c8e8ea7075a34a48676ace7/truths-1.2.tar.gz" } ] }