{ "info": { "author": "Kang Hyojun", "author_email": "ed@spoqa.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 :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. warning::\n\n **This project is abandoned.**\n\n We recommend you to use typeguard_ instead. It has been well maintained,\n and provides the mostly same API to tsukkomi so that ``typeguard`` module\n is drop-in replacement of ``tsukkomi.typed`` module.\n\n----\n\ntsukkomi\n~~~~~~~~\n\n\ndo `tsukkomi`_ for python types.\n\n.. _tsukkomi: https://en.wikipedia.org/wiki/Glossary_of_owarai_terms#tsukkomi\n.. _typeguard: https://github.com/agronholm/typeguard\n\n\nWhat is tsukkomi?\n=================\n\ntsukkomi is a japanese word means straight man in the comedy duos of western\nculture. As straight man react partner's ridiculous behaviors, ``tsukkomi``\nwill react incorrect types.\n\n\nHow to use tsukkomi?\n====================\n\n``tsukkomi`` take type hints from `typing`_. write code with annotation,\ndecorate all callable objects with ``tsukkomi.typed.typechecked``.\nFYI generic types are not supported, see `tsukkomi dosen't support generic`_\nsection for the detail.\n\n\n.. code-block:: python\n\n from typing import Sequence\n\n from tsukkomi.typed import typechecked\n\n @typechecked\n def greeting(name: str) -> str:\n return name\n\n greeting('a') # it is ok\n greeting(1) # this will raise `TypeError`\n\n\n.. _typing: https://docs.python.org/3/library/typing.html\n\n\ntsukkomi dosen't support generic\n================================\n\ntsukkomi dosen't support `generic`_ type checking, includes types already\ninherited a generic type like `typing.Sequence`, `typing.Mutable` and etc.\nfollowing example codes can be passed by `tsukkomi.typed.typechecked`.\n\n\n.. code-block:: python\n\n import typing\n\n from tsukkomi.typed import typechecked\n\n\n T = typing.TypeVar('T')\n\n\n class Boke(typing.Generic[T]):\n\n @typechecked\n def stupid(self, word: T) -> T:\n return type(word)\n\n @typechecked\n def correction(self, words: Sequence[T]) -> T:\n return random.sample(words, 1)[0]\n\n\n @typechecked\n def boke_and_tsukkomi(stupid_words: Sequence[str],\n correction: Sequence[str]) -> bool:\n return any(s == c for s, c in zip(stupid_words, correction)))\n\n\n boke = Boke[str]()\n print(boke.stupid('hello world'))\n print(boke.correction([1, 2, 3]))\n print(boke_and_tsukkomi([1, 2], [1.0, 2.0]))\n\n\n.. _generic: https://docs.python.org/3/library/typing.html#user-defined-generic-types\n\nChangelogs\n==========\n\n0.0.5 --- 2016-05-19\n--------------------\n\nModified\n````````\n\n- Interpret None as type(None)", "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/spoqa/tsukkomi", "keywords": null, "license": "Public Domain", "maintainer": null, "maintainer_email": null, "name": "tsukkomi", "package_url": "https://pypi.org/project/tsukkomi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tsukkomi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/spoqa/tsukkomi" }, "release_url": "https://pypi.org/project/tsukkomi/0.0.6/", "requires_dist": null, "requires_python": null, "summary": "make tsukkomi for python types", "version": "0.0.6" }, "last_serial": 2610835, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4ba08b7de9bf90b00e98c7acf5d6551b", "sha256": "153809f613fea86755addef6c4121d3a105cd42ef9f6a129e22fad0111f5782c" }, "downloads": -1, "filename": "tsukkomi-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4ba08b7de9bf90b00e98c7acf5d6551b", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5929, "upload_time": "2016-03-28T04:12:58", "url": "https://files.pythonhosted.org/packages/48/ad/c724c2a88093846a77e1610cab555797a598946d15ea11b8e67aae5970e4/tsukkomi-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "662413bd12dd635ee054f85440bf43a0", "sha256": "3ef0e9791b2762649c0d8e39e50bf589a769187d6ab9b4ccc3e3e5a95b40ea99" }, "downloads": -1, "filename": "tsukkomi-0.0.1.tar.gz", "has_sig": false, "md5_digest": "662413bd12dd635ee054f85440bf43a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4125, "upload_time": "2016-03-28T04:12:47", "url": "https://files.pythonhosted.org/packages/35/2f/9d1d0267029fd7d9957d2af81f699acdce513e7fdf0793c440f316f31d05/tsukkomi-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "d81b15789c1dcf1f3613d89010dbb3bf", "sha256": "c93dd9e3fe641448da677d3d8adbb0c3982480cde2678cb5c2b19e3c3f3085c6" }, "downloads": -1, "filename": "tsukkomi-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d81b15789c1dcf1f3613d89010dbb3bf", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5938, "upload_time": "2016-04-27T13:27:46", "url": "https://files.pythonhosted.org/packages/8b/83/fcb057ec6f878b6f12b79734dfbe789faa8503588ce128fa7fa576f4f7e1/tsukkomi-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "99717b245251c3088fad42a5b815403c", "sha256": "981c88e6f8de173c73574adbcf1784aad516ebb976caeccc5b4e79ff383c6a05" }, "downloads": -1, "filename": "tsukkomi-0.0.2.tar.gz", "has_sig": false, "md5_digest": "99717b245251c3088fad42a5b815403c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4107, "upload_time": "2016-04-27T13:29:29", "url": "https://files.pythonhosted.org/packages/87/df/95454978f5a6804bb20dc13748fb1c22f7b99dcc0481aaa20d90f229e818/tsukkomi-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "8a35593d3e893c43847da38252196100", "sha256": "0f16572b2daf2bd264d14c59faf6e05c30be5d98d36417c809046296dac34302" }, "downloads": -1, "filename": "tsukkomi-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "8a35593d3e893c43847da38252196100", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5969, "upload_time": "2016-04-27T13:46:09", "url": "https://files.pythonhosted.org/packages/28/24/a10df39c84d81f9835a6656d0ff325e35cbcad1f532c767c9312e0e896f1/tsukkomi-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a0c2c25c1346a99861c9224758008c2", "sha256": "0a5b57ab8680339d1323cca60ab6a7cac16721d1c94a2b691b3c7f9f26f8e6b5" }, "downloads": -1, "filename": "tsukkomi-0.0.3.tar.gz", "has_sig": false, "md5_digest": "5a0c2c25c1346a99861c9224758008c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4140, "upload_time": "2016-04-27T13:45:45", "url": "https://files.pythonhosted.org/packages/bb/70/550663e9df14dfcf4068451389c89854593f60c7f95d934203e0817ff881/tsukkomi-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "2a2cd934294e245f98b297132aeb75c0", "sha256": "c974526788915b4103c7beb24d3ed93ff85c8b43df96629724dd9d1ee0a74a00" }, "downloads": -1, "filename": "tsukkomi-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "2a2cd934294e245f98b297132aeb75c0", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6078, "upload_time": "2016-05-09T03:45:45", "url": "https://files.pythonhosted.org/packages/13/21/99d5f3ca08f444dd4ccf8ff9cdf8e9000a41666f0ed9685b19a097f1fc8b/tsukkomi-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41fdd0a7d0f9042527a5c7835646dc4c", "sha256": "f778d561a7bb58df5e35463e71f3ae504be06e4af77e173ad1f92bf343918c35" }, "downloads": -1, "filename": "tsukkomi-0.0.4.tar.gz", "has_sig": false, "md5_digest": "41fdd0a7d0f9042527a5c7835646dc4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4300, "upload_time": "2016-05-09T03:45:33", "url": "https://files.pythonhosted.org/packages/4e/ba/1d466e6940d32d1189a76806ac2882c413a0a40352188cb30152080887df/tsukkomi-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "55de437fe4b3fd65c0dc1809dab48cde", "sha256": "da78cb20cb9bde5168b5da31505ce7d9e2f0490547909e52fb99e60d945c1136" }, "downloads": -1, "filename": "tsukkomi-0.0.5.tar.gz", "has_sig": false, "md5_digest": "55de437fe4b3fd65c0dc1809dab48cde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4415, "upload_time": "2016-05-19T12:28:03", "url": "https://files.pythonhosted.org/packages/15/41/ba10377204684fa7648e21b268d72cb0ee73cf6c981be2ff69b1bdf8c4d8/tsukkomi-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "b1deb511f23ca6951b38fa0ce5665db4", "sha256": "f549db3a0f0a3bacaf55a01981671c7640693e63eaaab51c63aacf4980e6dab5" }, "downloads": -1, "filename": "tsukkomi-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "b1deb511f23ca6951b38fa0ce5665db4", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6410, "upload_time": "2016-08-20T01:08:19", "url": "https://files.pythonhosted.org/packages/ba/2b/6faa5d09d7dd516a7c452a01459bfc297c7ed9155bf0fb2f4b521ef50112/tsukkomi-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff53cb46663a3b5f404f63fe163f3282", "sha256": "52ea2c4df408226c8827d41c8e06b1e025e293a1495b52a522c61f77e4c78b29" }, "downloads": -1, "filename": "tsukkomi-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ff53cb46663a3b5f404f63fe163f3282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4793, "upload_time": "2016-08-20T01:08:15", "url": "https://files.pythonhosted.org/packages/9b/fa/9c60201bb422fb7159f23fcc35458b127f17367c3599f36a55f0d666f300/tsukkomi-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b1deb511f23ca6951b38fa0ce5665db4", "sha256": "f549db3a0f0a3bacaf55a01981671c7640693e63eaaab51c63aacf4980e6dab5" }, "downloads": -1, "filename": "tsukkomi-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "b1deb511f23ca6951b38fa0ce5665db4", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6410, "upload_time": "2016-08-20T01:08:19", "url": "https://files.pythonhosted.org/packages/ba/2b/6faa5d09d7dd516a7c452a01459bfc297c7ed9155bf0fb2f4b521ef50112/tsukkomi-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff53cb46663a3b5f404f63fe163f3282", "sha256": "52ea2c4df408226c8827d41c8e06b1e025e293a1495b52a522c61f77e4c78b29" }, "downloads": -1, "filename": "tsukkomi-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ff53cb46663a3b5f404f63fe163f3282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4793, "upload_time": "2016-08-20T01:08:15", "url": "https://files.pythonhosted.org/packages/9b/fa/9c60201bb422fb7159f23fcc35458b127f17367c3599f36a55f0d666f300/tsukkomi-0.0.6.tar.gz" } ] }