{ "info": { "author": "Hiroyuki Nikaido", "author_email": "hiroyuki.nikaido@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "pyactiverecord\n==============\n\npyactiverecord is python active-record like mysql wrapper.\n\nFeatures\n--------\n\n- active-record like mysql wrapper\n- ORM\n\nRequirements\n------------\n\n- Python 3.x\n- mysql\n- mysql-connector-python\n\nInstall\n-------\n\n::\n\n pip install pyactiverecord\n\nUsage\n-----\n\ncreate model class.\n\n::\n\n import model\n\n\n class SampleModel(model.Model):\n\n number = model.Column(type=model.Type.int)\n title = model.Column(type=modle.Type.varchar)\n text = model.Column(type=model.Type.text)\n date = model.Column(type=model.Type.timestamp)\n \n\nat this time, if the lower-case of this model class name of table is't\nexist, table is automatically created.\n\npyactiverecord needs to connecte to the database, program is required to\ncall Databese.setup() method.\n\n::\n\n import model\n\n def execute():\n s = SampleModel()\n s.title = \"test\"\n s.text = \"test to save sample model\"\n s.save()\n \n s = SampleModel.query().first()\n print(s.title, s.text)\n\n\n if __name__ == '__main__':\n \n model.Database.setup(\n host=\"localhost\",\n database=\"database_name\",\n user=\"root\",\n password=\"\"\n )\n \n execute()\n\nMethods\n-------\n\nclass methods\n~~~~~~~~~~~~~\n\nquery: fetch data from the table\n\n::\n\n data = SampleModel.query()\n for d in data:\n print(d.title)\n\n # where\n data = SampleModel.query(where=[\"title='py-activerecord'\", \"text like '%Python%'\"])\n\n # order\n data = SampleModel.query(order=[\"id asc\", \"title desc\"])\n\ninstance methods\n~~~~~~~~~~~~~~~~\n\nsave: save model object to the table\n\n::\n\n s = SampleModel()\n s.number = 1\n s.title = \"py-activerecord\"\n s.text = \"ActiveRecord for Python Library\"\n s.date = \"2016-01-01 00:00:00\"\n\n s.save()\n\ndelete: delete model object from the table\n\n::\n\n s = SampleModel.query(where=[\"title='py-activerecord'\"], order=[\"id asc\"]).first()\n s.delete()\n\nLicense\n~~~~~~~\n\nThis software is released under the MIT License\n\nThe MIT License (MIT)\nCopyright (c) 2016 Hiroyuki Nikaido\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "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/nkdn/pyactiverecord", "keywords": "db,mysql,active record,ORM", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pyactiverecord", "package_url": "https://pypi.org/project/pyactiverecord/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyactiverecord/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/nkdn/pyactiverecord" }, "release_url": "https://pypi.org/project/pyactiverecord/0.4.2/", "requires_dist": null, "requires_python": null, "summary": "pyactiverecord is python active record like mysql wrapper.", "version": "0.4.2" }, "last_serial": 2234992, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1debf2d18af9d550dd6e8700b7cdc013", "sha256": "6d30fb84b4d8c9a6a427653f31bdebbcb24af8d9eb9b233defe6e130c63f6d23" }, "downloads": -1, "filename": "pyactiverecord-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1debf2d18af9d550dd6e8700b7cdc013", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4052, "upload_time": "2016-04-27T19:48:24", "url": "https://files.pythonhosted.org/packages/f2/fa/b6e870c8bfd4e60b94e830bcf7fec2b2574c5d75c91d0c840ea1604e37e9/pyactiverecord-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "527d25ac51000a7129711a861c289721", "sha256": "543c56cc2e286f2856f246d153029c111fdd0c98771328256de99d4ebe119dff" }, "downloads": -1, "filename": "pyactiverecord-0.1.1.tar.gz", "has_sig": false, "md5_digest": "527d25ac51000a7129711a861c289721", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4032, "upload_time": "2016-04-29T02:39:39", "url": "https://files.pythonhosted.org/packages/3e/62/d56cb353415053946635a9200d494d030578a590f66364ff73576521624c/pyactiverecord-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ad040199dfcac10eefe18308828ab2e3", "sha256": "b4cd9476335669471f5417454dc038ccc07b9388f98fbbcc06960756a626da50" }, "downloads": -1, "filename": "pyactiverecord-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ad040199dfcac10eefe18308828ab2e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4055, "upload_time": "2016-04-29T04:21:12", "url": "https://files.pythonhosted.org/packages/9a/bd/5d372248f6f2d1bfe26e0e52741f74f8632910fad15565b53eb38c19853d/pyactiverecord-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "987f73d3706020243a3b7b2529994c7f", "sha256": "b3e0b03a20262fc81504f54b6c2efd09f42e1e2040d1e8ce2d261e3e2a4eaf36" }, "downloads": -1, "filename": "pyactiverecord-0.1.3.tar.gz", "has_sig": false, "md5_digest": "987f73d3706020243a3b7b2529994c7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4055, "upload_time": "2016-04-29T04:26:09", "url": "https://files.pythonhosted.org/packages/4e/2e/a8c5972c33eb778bb1729261299f046ec7ab9dbdb676445943a30355ab58/pyactiverecord-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "19bced6d1851fb1af1569e5bae823aa6", "sha256": "4025c9ffb1fa35a6a1a03db206176652074f29fa7e17df4bb6afc89c699f5d38" }, "downloads": -1, "filename": "pyactiverecord-0.1.4.tar.gz", "has_sig": false, "md5_digest": "19bced6d1851fb1af1569e5bae823aa6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4883, "upload_time": "2016-04-29T05:26:12", "url": "https://files.pythonhosted.org/packages/75/d3/7806ed8fd8359bf2362a5dff1125ed864a717199b024a970b3b8075b7600/pyactiverecord-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "84334cc0ff84a54413c8fb5faa108c96", "sha256": "7d87700a2ca6b2f90dd236a4d4f9a829c129d7a438222203bacbc289a15cb0a7" }, "downloads": -1, "filename": "pyactiverecord-0.1.5.tar.gz", "has_sig": false, "md5_digest": "84334cc0ff84a54413c8fb5faa108c96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4788, "upload_time": "2016-04-29T05:30:35", "url": "https://files.pythonhosted.org/packages/39/bd/4e0c9c9e648380e87e9373b07bf264d1972bc319b4bfd065a2b9735e743c/pyactiverecord-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "d14cca0c0c21d9d9a248b6a2e2a76f80", "sha256": "97a29309c13f57755047d84943d6b3e9eadaddc741eab4bcc660164794d8d0f5" }, "downloads": -1, "filename": "pyactiverecord-0.1.6.tar.gz", "has_sig": false, "md5_digest": "d14cca0c0c21d9d9a248b6a2e2a76f80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4777, "upload_time": "2016-04-29T05:39:39", "url": "https://files.pythonhosted.org/packages/a3/1f/1e514d9f34c1deb518c4bb14007b44cf02c985559252cc15fb80d5149d74/pyactiverecord-0.1.6.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "71e86ec0715088686ff62af4f9c1bbfb", "sha256": "d34734a6c325dada280e90a0e9f9048fc19265c301a512b4375fbbe7c37b655c" }, "downloads": -1, "filename": "pyactiverecord-0.2.0.tar.gz", "has_sig": false, "md5_digest": "71e86ec0715088686ff62af4f9c1bbfb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5612, "upload_time": "2016-04-30T16:44:56", "url": "https://files.pythonhosted.org/packages/4a/5a/553c8d075fe8ed244fb8fd8586dc733c9acb39eeae31d733a89069a8e5ff/pyactiverecord-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "08883ab93c7a6928663e27d32b637401", "sha256": "52bf82e0003a9ae258c3bc34e73bf6dcce0771d81166b6940afd3dbd5014308f" }, "downloads": -1, "filename": "pyactiverecord-0.2.1.tar.gz", "has_sig": false, "md5_digest": "08883ab93c7a6928663e27d32b637401", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5664, "upload_time": "2016-05-01T08:53:51", "url": "https://files.pythonhosted.org/packages/44/f6/046c2ee1c3fbbb28b536785c3486d40f1e768c9b1b1d2b0d948103111ef5/pyactiverecord-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f4d59faaaf6a00863c322d6e44f1f05f", "sha256": "9d756ecb026028e1d28d6087f3ab85b487c8b45bf993a74e6353b1f606aa02e8" }, "downloads": -1, "filename": "pyactiverecord-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f4d59faaaf6a00863c322d6e44f1f05f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5749, "upload_time": "2016-05-01T09:00:18", "url": "https://files.pythonhosted.org/packages/58/17/0704c1375e069f3b4daea55f6df69a59160612b61949956e0fdec86e5199/pyactiverecord-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "c68144f632f40b9ef1a6a1cc26fc4b90", "sha256": "6c6bc823919ef0f6915029d031d8208b8b2b7334cd088496181dca43ab3e0196" }, "downloads": -1, "filename": "pyactiverecord-0.2.3.tar.gz", "has_sig": false, "md5_digest": "c68144f632f40b9ef1a6a1cc26fc4b90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5538, "upload_time": "2016-05-01T09:18:38", "url": "https://files.pythonhosted.org/packages/fc/7c/3b9d02455f45200092c0ffac929876e3827de218258dd4a9e7898e79deb8/pyactiverecord-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "79aba61df8a8055eb36fa5174a3f1893", "sha256": "e1e17b0ecaee91ce1a7a80030f020ceed36177f872a83ab35ab5f6c5d8bbcc39" }, "downloads": -1, "filename": "pyactiverecord-0.2.4.tar.gz", "has_sig": false, "md5_digest": "79aba61df8a8055eb36fa5174a3f1893", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5615, "upload_time": "2016-05-01T14:21:36", "url": "https://files.pythonhosted.org/packages/01/b0/e1b07d7201841f04c4432ab27f1a73f7c436356dea2da4d54f050eb24ebb/pyactiverecord-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "71df9f54af105d6ec23640260c0bd792", "sha256": "f7563077caee8757eb0a8a9450153ac4dbaa1739007a58eb15c5631e61bd3754" }, "downloads": -1, "filename": "pyactiverecord-0.2.5.tar.gz", "has_sig": false, "md5_digest": "71df9f54af105d6ec23640260c0bd792", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5625, "upload_time": "2016-05-02T01:34:37", "url": "https://files.pythonhosted.org/packages/27/95/ece78524bd4111379b9518d4faf25e1d57a2714700abead561e66487d9be/pyactiverecord-0.2.5.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "879b7ebf9c8f1d00633e6e9731358aa9", "sha256": "6867f74e393f57a8e99c27bf2ecc823916c6944c2e835a7accfcba6d1dc52005" }, "downloads": -1, "filename": "pyactiverecord-0.3.0.tar.gz", "has_sig": false, "md5_digest": "879b7ebf9c8f1d00633e6e9731358aa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4976, "upload_time": "2016-05-09T17:37:36", "url": "https://files.pythonhosted.org/packages/74/d4/92553bdefb41647d725d85281cf23e9404e2878f919c5dded32a54b9029e/pyactiverecord-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "72507ee58e8a0b296468f61271ba7b96", "sha256": "711254357f86f275583bf6c340903bca509fb32f77df799e96775bf4c0c24280" }, "downloads": -1, "filename": "pyactiverecord-0.3.1.tar.gz", "has_sig": false, "md5_digest": "72507ee58e8a0b296468f61271ba7b96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5744, "upload_time": "2016-05-10T04:39:53", "url": "https://files.pythonhosted.org/packages/03/4d/da7fdbe0e72aa8854b369ecde99c187b15e3754ab4ea3fdabb3470101945/pyactiverecord-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "0bf56ef5b383dc9a38cbaef77d74877b", "sha256": "8ec2175aca8374a115f5270129d4e4bae4532851208097224ac2f4ec2bf2ac76" }, "downloads": -1, "filename": "pyactiverecord-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0bf56ef5b383dc9a38cbaef77d74877b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5778, "upload_time": "2016-07-05T05:41:35", "url": "https://files.pythonhosted.org/packages/c6/d1/077e06b784e404adfe09680d54e42522c3219da24e9edb063deda1bb7a19/pyactiverecord-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "d521a319fab06c5aa86b5b1aeec65bfd", "sha256": "7890749e368b7ca2a45545b2a80ecf036939e1aea45810e44a37c7bb95094fbd" }, "downloads": -1, "filename": "pyactiverecord-0.4.1.tar.gz", "has_sig": false, "md5_digest": "d521a319fab06c5aa86b5b1aeec65bfd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5799, "upload_time": "2016-07-20T05:54:38", "url": "https://files.pythonhosted.org/packages/8a/7a/6f3893ad5df24a183ec316aec19ab77b8616ad2ba1843383e2facd3acbd3/pyactiverecord-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "b4b35cec8c355804893e1c92626abd05", "sha256": "3f83a12fae1867a155ece494eb0a6b1c1bd9b6eb439e4e444fab7273425d3075" }, "downloads": -1, "filename": "pyactiverecord-0.4.2.tar.gz", "has_sig": false, "md5_digest": "b4b35cec8c355804893e1c92626abd05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5717, "upload_time": "2016-07-21T02:43:09", "url": "https://files.pythonhosted.org/packages/70/f5/48154a8309b4896dd6da9b57036d9a264afcea0574e3e2d6aeb32c726818/pyactiverecord-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4b35cec8c355804893e1c92626abd05", "sha256": "3f83a12fae1867a155ece494eb0a6b1c1bd9b6eb439e4e444fab7273425d3075" }, "downloads": -1, "filename": "pyactiverecord-0.4.2.tar.gz", "has_sig": false, "md5_digest": "b4b35cec8c355804893e1c92626abd05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5717, "upload_time": "2016-07-21T02:43:09", "url": "https://files.pythonhosted.org/packages/70/f5/48154a8309b4896dd6da9b57036d9a264afcea0574e3e2d6aeb32c726818/pyactiverecord-0.4.2.tar.gz" } ] }