{ "info": { "author": "Keith Byrne", "author_email": "keithmbyrne@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7" ], "description": "# KBPC\n\n![GitHub](https://img.shields.io/github/license/kmjbyrne/kbpc)\n[![PyPI version](https://badge.fury.io/py/kbpc.svg)](https://badge.fury.io/py/kbpc)\n[![Build Status](https://travis-ci.org/kmjbyrne/kbpc.svg?branch=master)](https://travis-ci.org/kmjbyrne/kbpc)\n[![Coverage Status](https://coveralls.io/repos/github/kmjbyrne/kbpc/badge.svg?branch=master)](https://coveralls.io/github/kmjbyrne/kbpc?branch=master)\n\nTable of contents\n=================\n\n\n\n* [Database](#database)\n * [Models](#models)\n * [User](#user)\n * [User Model](#user-model)\n * [User DAO](#user-dao)\n * [Serializer](#flask-alchemy-model-serializer)\n* [Common](#common)\n * [Exceptions](#exceptions)\n \n\n\n## Database\n\n\n### Models\n\n#### User Model\n\nDocs coming soon\n\n#### User DAO\n\nDocs coming soon\n\n---\n\n### Flask Alchemy Model Serializer\n\n\nTransformation was originally a series of routines written to convert FlaskAlchemy models into jsonifiable dict \nstructures. This proved to be a solution lacking elegance and evolved and eventually found its way into half a dozen \nprojects over time and eventually, then started to splinter into slightly different variations.\n\n#### Basic Usage\n\n```python\nfrom flask import jsonify\n\nfrom application.models import SomeFlaskAlchemyModel\nfrom kbpc.db.flaskalchemy import serializer\n\n# Assume the model has name and age as the model fields\nmodel = SomeFlaskAlchemyModel('John Doe', 25)\ntransformed_model = serializer.serialize(model)\n\n# This typically fails if you attempt it with the model.\njson = jsonify(data=model)\n\n# This however is serializable immediately\njson = jsonify(data=transformed_model)\n```\n---\n\nOften, fields like passwords or other sensitive data should be hidden from responses or outputs. Usually this would be \nmanaged at the model class, and writing a to_dict() function or something similar, and simply not declaring the \nprotected properties of that instance.\n\n#### Protected Properties\n\n```python\nfrom flask import jsonify\n\nfrom application.models import SomeFlaskAlchemyModel\nfrom kbpc.db.flaskalchemy import serializer\n\n# Assume the model has name and age as the model fields\nmodel = SomeFlaskAlchemyModel('John Doe', 25)\ntablename = 'tablename_of_model'\nexclusions = {tablename: ['age']}\ntransformed_model = serializer.serialize(model, exclusions)\n\n# This however is serializable immediately\njson = jsonify(data=transformed_model)\n\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kmjbyrne/kbpc", "keywords": "python library utilities", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Flask-KBPC", "package_url": "https://pypi.org/project/Flask-KBPC/", "platform": "", "project_url": "https://pypi.org/project/Flask-KBPC/", "project_urls": { "Homepage": "https://github.com/kmjbyrne/kbpc" }, "release_url": "https://pypi.org/project/Flask-KBPC/0.3.1/", "requires_dist": null, "requires_python": "", "summary": "Reusable Python code for projects", "version": "0.3.1" }, "last_serial": 5951864, "releases": { "0.1.23": [ { "comment_text": "", "digests": { "md5": "79209d1dbf0fe2043278f0eb43d53178", "sha256": "c05f50abd06cb187ce208aabbf1a243146fd76e3759cf59703445c8105df891c" }, "downloads": -1, "filename": "Flask-KBPC-0.1.23.tar.gz", "has_sig": false, "md5_digest": "79209d1dbf0fe2043278f0eb43d53178", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9476, "upload_time": "2019-09-12T23:24:13", "url": "https://files.pythonhosted.org/packages/05/b2/4f9244c44b4947665bc98647f2e03a29adb13b13b9aa910a06e37ebd0ce0/Flask-KBPC-0.1.23.tar.gz" } ], "0.1.24": [ { "comment_text": "", "digests": { "md5": "b890527a91f0bd5c472a3542d3c40147", "sha256": "d08dde2fce66db290afeb1f22b72ed3239420854d2f32dfedef2d929c4593003" }, "downloads": -1, "filename": "Flask-KBPC-0.1.24.tar.gz", "has_sig": false, "md5_digest": "b890527a91f0bd5c472a3542d3c40147", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9477, "upload_time": "2019-09-12T23:30:32", "url": "https://files.pythonhosted.org/packages/bf/46/2150b2f12c785775b8ebb109e04785b4004704249826f280e1a1a929cd03/Flask-KBPC-0.1.24.tar.gz" } ], "0.1.25": [ { "comment_text": "", "digests": { "md5": "7878720fcec7a554497417f4a69fad58", "sha256": "55f0c2664a0ed8d9656d8516331f7e483fc2e497712235a74e9ddce4059c43c2" }, "downloads": -1, "filename": "Flask-KBPC-0.1.25.tar.gz", "has_sig": false, "md5_digest": "7878720fcec7a554497417f4a69fad58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9453, "upload_time": "2019-09-12T23:36:07", "url": "https://files.pythonhosted.org/packages/20/fd/5a3773f947eec408337777d18f974d1ef242c74877e4cca91521ea58cc7b/Flask-KBPC-0.1.25.tar.gz" } ], "0.1.26": [ { "comment_text": "", "digests": { "md5": "0a6595a6ea88c0c93dd3ee1c76a08207", "sha256": "cb81b935b2e28bd1df94d48fd2b150eb75cf79cfc89b972cead22d07f596d429" }, "downloads": -1, "filename": "Flask-KBPC-0.1.26.tar.gz", "has_sig": false, "md5_digest": "0a6595a6ea88c0c93dd3ee1c76a08207", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9449, "upload_time": "2019-09-12T23:37:32", "url": "https://files.pythonhosted.org/packages/8c/d3/6dc13bda4dd8f94caa017aa2c86401d6a1be424f997a93c403234c24d877/Flask-KBPC-0.1.26.tar.gz" } ], "0.1.27": [ { "comment_text": "", "digests": { "md5": "609d5070d0bc714a21a12243fa9d13ce", "sha256": "1ae57d90341dd5a11d38791a357216d2290f05ee900868561a524acef67ab529" }, "downloads": -1, "filename": "Flask-KBPC-0.1.27.tar.gz", "has_sig": false, "md5_digest": "609d5070d0bc714a21a12243fa9d13ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9649, "upload_time": "2019-09-13T02:04:14", "url": "https://files.pythonhosted.org/packages/e4/a7/2153dde9e0573f9ce4f1626e67d7fc356e7e06a05e40209524d038c2c3c7/Flask-KBPC-0.1.27.tar.gz" } ], "0.1.28": [ { "comment_text": "", "digests": { "md5": "1db5591aea6600e2e77ed190e436921a", "sha256": "aa4b24ab539b96ead52d83ec223fb6e2c58d8b349f2954271ef8f430f8b9d75d" }, "downloads": -1, "filename": "Flask-KBPC-0.1.28.tar.gz", "has_sig": false, "md5_digest": "1db5591aea6600e2e77ed190e436921a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9834, "upload_time": "2019-09-14T15:15:47", "url": "https://files.pythonhosted.org/packages/3e/d8/46ad67dee9f9144b6503038c5316419cfdf65b5fef8f7eb8665f3364aa7f/Flask-KBPC-0.1.28.tar.gz" } ], "0.1.29": [ { "comment_text": "", "digests": { "md5": "b50936ca023d25e0272dd8e257a91bf3", "sha256": "9a290df0484b56dde20add5be5cd59fcc09d8c322112e1d8cae6baa0da4bc6f0" }, "downloads": -1, "filename": "Flask-KBPC-0.1.29.tar.gz", "has_sig": false, "md5_digest": "b50936ca023d25e0272dd8e257a91bf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9843, "upload_time": "2019-09-29T22:19:35", "url": "https://files.pythonhosted.org/packages/c4/18/a29fb02fdd41d9146f86aa872d2f35b8b0f8457b3efc89b70cbe5020d752/Flask-KBPC-0.1.29.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "54ab9caac9baad8dc7ba848e3efa84fb", "sha256": "27b51574d53e13035a3a2699165220209bf149700b86ebbb8e23760767d7b17d" }, "downloads": -1, "filename": "Flask-KBPC-0.2.0.tar.gz", "has_sig": false, "md5_digest": "54ab9caac9baad8dc7ba848e3efa84fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9893, "upload_time": "2019-10-01T00:27:58", "url": "https://files.pythonhosted.org/packages/ea/b5/cc0167965a5365c7ffcb2d455b717907672c48260e76b84c08545e07820a/Flask-KBPC-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "daff3c2effeda1cd56383cf98eaf8157", "sha256": "ab1f802b82f845da0241800f40dc94b2b45df2e710bfff9adb38cceb9b68b58e" }, "downloads": -1, "filename": "Flask-KBPC-0.2.1.tar.gz", "has_sig": false, "md5_digest": "daff3c2effeda1cd56383cf98eaf8157", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9902, "upload_time": "2019-10-01T02:12:21", "url": "https://files.pythonhosted.org/packages/91/f3/93ba700d617d21be82802e441a541f4012fa9e77c85cde8a608fbf6eb21f/Flask-KBPC-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "67968d248e110729cc123c3f5285db81", "sha256": "22b267d4e6dcd68867555c9174f5fbcacf2a640881baf9f7e52ecfc9b329fcee" }, "downloads": -1, "filename": "Flask-KBPC-0.2.2.tar.gz", "has_sig": false, "md5_digest": "67968d248e110729cc123c3f5285db81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9892, "upload_time": "2019-10-07T17:30:04", "url": "https://files.pythonhosted.org/packages/07/f6/f90966bd933ef9f263f146695dcba3868bbecb04342994f3fc5f072e019c/Flask-KBPC-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "493a73ea6dfde3d4a920400a5750b5d4", "sha256": "6d39b6fbc2e6d83e299ab09fb0d2a61ecae081e35a748b098d8cb8fee47958a1" }, "downloads": -1, "filename": "Flask-KBPC-0.2.3.tar.gz", "has_sig": false, "md5_digest": "493a73ea6dfde3d4a920400a5750b5d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9888, "upload_time": "2019-10-07T17:40:48", "url": "https://files.pythonhosted.org/packages/c2/bb/7c538c4028e5349786b431dede61a4733aabe3bd7fd6526d0fda8f43d5ff/Flask-KBPC-0.2.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "fd8064d3deaa07335d27e3fba37c4e82", "sha256": "0c79239100cf86004cdbdc2d6a57278b5231ed8f3886c2d95b8159817dc6ff09" }, "downloads": -1, "filename": "Flask-KBPC-0.3.1.tar.gz", "has_sig": false, "md5_digest": "fd8064d3deaa07335d27e3fba37c4e82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9913, "upload_time": "2019-10-09T20:26:11", "url": "https://files.pythonhosted.org/packages/6f/0a/8db957178a7dffd28943b05c36c5d698be57a130cc507ca9d5d1b478ec89/Flask-KBPC-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fd8064d3deaa07335d27e3fba37c4e82", "sha256": "0c79239100cf86004cdbdc2d6a57278b5231ed8f3886c2d95b8159817dc6ff09" }, "downloads": -1, "filename": "Flask-KBPC-0.3.1.tar.gz", "has_sig": false, "md5_digest": "fd8064d3deaa07335d27e3fba37c4e82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9913, "upload_time": "2019-10-09T20:26:11", "url": "https://files.pythonhosted.org/packages/6f/0a/8db957178a7dffd28943b05c36c5d698be57a130cc507ca9d5d1b478ec89/Flask-KBPC-0.3.1.tar.gz" } ] }