{ "info": { "author": "Gabriel Martin del Campo y Eternod", "author_email": "gmartin@tecnocity.com.mx", "bugtrack_url": null, "classifiers": [], "description": "========\ntecutils\n========\n\ntecutils provides various utilities to accelerate development\nof programs design to use MySQL as a database and substitute\nthe use of global variables.\nAlso includes a standalone module to tranform a text file to pdf.\n\ntecutils contains the following modules:\n\n- mydb\n- envvar\n- simplecrypt\n- txt2pdf\n\nmydb\n====\n\nRequires:\n mysql-python (sudo apt-get install python-mysqldb)\n \nProvides:\n There are three functions that take care the database interaction:\n \n - GetRecordset(sHost,sUser,sPwd,sDB,sSQL)\n - GetData(sHost,sUser,sPwd,sDB,sSQL)\n - ExecuteSQL(sHost,sUser,sPwd,sDB,sSQL)::\n \n from tecutils.mydb import ExecuteSQL, GetData, GetRecordset\n\n myHost = \"localhost\"\n myUser = \"root\"\n myPwd = \"password\"\n myDB = \"test\"\n\n ExecuteSQL(myHost, myUser, myPwd, myDB, \"INSERT INTO animal (name, category) VALUES \" + \\\n ('snake', 'reptile'), ('frog', 'amphibian'), ('tuna', 'fish'), ('racoon', 'mammal'), \n ('lizard', 'reptile')\")\n \n sql=\"SELECT name FROM animal WHERE category='reptile'\"\n GetRecordset(myHost, myUser, myPwd, myDB,sql)\n\n thistype='fish'\n sql=\"SELECT name FROM animal WHERE category='%s'\" % thistype\n GetData(myHost, myUser, myPwd, myDB,sql)\n\n\nenvvar\n======\n\nProvides:\n Reads a file containing = and loads in a container, so you can use container.var\n \n getVarFromFile(filename,container)\n \nUse::\n\n from tecutils import getVarFromFile\n db = getVarFromFile('config/db.cfg','db')\n\n\n\nExamples\n--------\n\nIf use the two modules provides a way to use a configuration file to access de database::\n\n\n # this is the config file:\n # db.cfg\n HOST = 'localhost'\n USER = 'root'\n PWD = 'password'\n DB = 'test'\n\n\nand use it in a program::\n\n from tecutils.envvar import getVarFromFile\n from tecutils.mydb import GetRecordset\n\n getVarFromFile('db.cfg',db)\n\n data = GetRecordset(db.HOST,db.USER,db.PWD,db.DB,\"SELECT * FROM animal\")\n for animal in data:\n print animal[0]\n\n\nsimplecrypt\n===========\n\nMany thanks to the Dabo team: Ed Leafe and Paul McNett (http://dabodev.com)\nfor this simple utility to \"obscure\" passwords so casual browsing on the database\nconnection info doesn't show the real one.\n\nUse::\n\n from tecutils.simplecrypt import simplecrypt\n pwd = 'foobar'\n crypt = SimpleCrypt()\n pwd = crypt.encrypt(pwd)\n \n \nor using the example from envvars::\n\n crypt = SimpleCrypt()\n db.PWD = crypt.decrypt(db.PWD)\n \n \ntxt2pdf\n=======\n\nrequires reportlab and pyPDF for normal use\nfor windows printing requires win32api or ghostscript and ghostview\n\nUsage: txt2pdf.py [options] text_file\nThe name of the outfile is the name on the text_file with pdf extension.\n\nOptions:\n -h, --help show this help message and exit\n -c COPIES, --copies=COPIES\n number of copies, only valid with -p option\n -g print through ghostprint, only valid with -w option\n -m use half letter as size of output, default letter\n --output=OUTPUT use specific output file name\n -p, --print print file after converting\n --printer=PRINTER printer to send file, default: send to default printer\n -w use win32api to send file to print, only valid with -p\n option", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/TecUtils/", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "TecUtils", "package_url": "https://pypi.org/project/TecUtils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/TecUtils/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/TecUtils/" }, "release_url": "https://pypi.org/project/TecUtils/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "Various utilities for database and config files use. Text to Pdf converter", "version": "0.4.0" }, "last_serial": 785777, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "59f221b961b011e8660bef0b0f4f5dd7", "sha256": "c352496d0451d099a64cabee17987623c93cd3d45418ba00909e78c55d764289" }, "downloads": -1, "filename": "TecUtils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "59f221b961b011e8660bef0b0f4f5dd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2301, "upload_time": "2011-01-05T05:34:52", "url": "https://files.pythonhosted.org/packages/06/4f/38ffeb606ecb78a348707cbd14f3dbd2888cb8978fa458b90f213b297631/TecUtils-0.1.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "e4c1c65853a26c5b8d62b33f3bb59c2c", "sha256": "9f0ebfb05fb94eb077d887743357566892c20812ebf28709357a9d10cc752242" }, "downloads": -1, "filename": "TecUtils-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e4c1c65853a26c5b8d62b33f3bb59c2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5040, "upload_time": "2011-04-21T00:47:11", "url": "https://files.pythonhosted.org/packages/54/58/12c80abcf71cf6d44003cae241a8e2319e89c8c104a3f57984771d258a48/TecUtils-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "built for Linux-2.6.38-8-generic-i686-with-glibc2.4", "digests": { "md5": "afb24816588e7857c93d8d27aa042494", "sha256": "2cb7f5b63844a8f613a917cbc710c6a3bfc5bea71720d13f5a75ab41eccbffcd" }, "downloads": -1, "filename": "TecUtils-0.4.0.linux-i686.tar.gz", "has_sig": false, "md5_digest": "afb24816588e7857c93d8d27aa042494", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 11126, "upload_time": "2012-08-16T22:14:31", "url": "https://files.pythonhosted.org/packages/e3/ba/68711989291db0791e2fea02e9ffcadf15bf0b95f92d5296304c2cf49e98/TecUtils-0.4.0.linux-i686.tar.gz" }, { "comment_text": "", "digests": { "md5": "db3d24db6fa319a036b577f15248535d", "sha256": "cfe72b0f2b131f366639dd2d70aad3b9404038782bf46f72281aa37b57dda56f" }, "downloads": -1, "filename": "TecUtils-0.4.0.tar.gz", "has_sig": false, "md5_digest": "db3d24db6fa319a036b577f15248535d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8095, "upload_time": "2012-08-16T22:15:20", "url": "https://files.pythonhosted.org/packages/96/a5/068694a7bfaa28aa35311f995340a49e794eafe7babb3286e8a1427479b9/TecUtils-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-2.6.38-8-generic-i686-with-glibc2.4", "digests": { "md5": "afb24816588e7857c93d8d27aa042494", "sha256": "2cb7f5b63844a8f613a917cbc710c6a3bfc5bea71720d13f5a75ab41eccbffcd" }, "downloads": -1, "filename": "TecUtils-0.4.0.linux-i686.tar.gz", "has_sig": false, "md5_digest": "afb24816588e7857c93d8d27aa042494", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 11126, "upload_time": "2012-08-16T22:14:31", "url": "https://files.pythonhosted.org/packages/e3/ba/68711989291db0791e2fea02e9ffcadf15bf0b95f92d5296304c2cf49e98/TecUtils-0.4.0.linux-i686.tar.gz" }, { "comment_text": "", "digests": { "md5": "db3d24db6fa319a036b577f15248535d", "sha256": "cfe72b0f2b131f366639dd2d70aad3b9404038782bf46f72281aa37b57dda56f" }, "downloads": -1, "filename": "TecUtils-0.4.0.tar.gz", "has_sig": false, "md5_digest": "db3d24db6fa319a036b577f15248535d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8095, "upload_time": "2012-08-16T22:15:20", "url": "https://files.pythonhosted.org/packages/96/a5/068694a7bfaa28aa35311f995340a49e794eafe7babb3286e8a1427479b9/TecUtils-0.4.0.tar.gz" } ] }