{ "info": { "author": "Kevin Wurster", "author_email": "wursterk@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "========\nstr2type\n========\n\nConvert the string representation of a Python type to its native type.\n\n.. image:: https://travis-ci.org/geowurster/str2type.svg?branch=master\n :target: https://travis-ci.org/geowurster/str2type?branch=master\n\n.. image:: https://coveralls.io/repos/geowurster/str2type/badge.svg?branch=master\n :target: https://coveralls.io/r/geowurster/str2type?branch=master\n\n\nWhy?\n====\n\nWhen building commandline utilities the syntax ``--arg key=val`` is useful,\nespecially when ``key`` and ``val`` will be used as ``Class(key=val)`` internally.\nThis module was built specifically to be used with the CLI framework `click `_, and the\nincluded extensions play nicely, but the ``str2type.str2type()`` function can be\nused elsewhere.\n\n\nExamples\n========\n\nSee the ``examples`` directory for `click integration examples `_. Everything else is primarily handled\nby a single function:\n\n.. code-block:: python\n\n >>> from str2type import str2type\n >>> print(str2type(\"1.23\"))\n 1.23\n >>> print(str2type(\"1.\")\n 1.0\n >>> print(str2type(\".2\"))\n 0.2\n >>> print(str2type(\"None\"))\n None\n >>> print(str2type('String'))\n 'String'\n\n\nSupported Types\n===============\n\nOnly the standard builtin Python types plus JSON strings are supported:\n\n- ``int``\n- ``float``\n- ``None``\n- ``True``\n- ``False``\n- ``JSON``\n\n\n\nInstalling\n==========\n\nVia pip:\n\n.. code-block:: console\n\n $ pip install str2type\n\nFrom master branch:\n\n.. code-block:: console\n\n $ git clone https://github.com/geowurster/str2type\n $ cd str2type\n $ pip install .\n\n\nDeveloping\n==========\n\nInstall:\n\n.. code-block:: console\n\n $ pip install virtualenv\n $ git clone https://github.com/geowurster/str2type\n $ cd str2type\n $ virtualenv venv\n $ source venv/bin/activate\n $ pip install -r requirements-dev.txt -e .\n $ nosetests --with-coverage\n $ pep8 --max-line-length=95 str2type\n", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/geowurster/str2type", "keywords": null, "license": "New BSD License", "maintainer": null, "maintainer_email": null, "name": "str2type", "package_url": "https://pypi.org/project/str2type/", "platform": null, "project_url": "https://pypi.org/project/str2type/", "project_urls": { "Homepage": "https://github.com/geowurster/str2type" }, "release_url": "https://pypi.org/project/str2type/0.4.1/", "requires_dist": null, "requires_python": null, "summary": "Convert a string representation of an int, float, None, True, False, or JSON to its native type. For None, True, and False, case is irrelevant.", "version": "0.4.1" }, "last_serial": 1525047, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4327410d2b502a5baab4ebfd7ef02adf", "sha256": "d2220b01a977dad6a20530d606901534be6d798d4dedfb8e3c8ac4c94cd2a90f" }, "downloads": -1, "filename": "str2type-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4327410d2b502a5baab4ebfd7ef02adf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3862, "upload_time": "2015-01-23T07:10:15", "url": "https://files.pythonhosted.org/packages/13/34/733c94cbed24f8b23d0a7fa49604a4677360448edb167080418375a948ca/str2type-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "85bea273fa9bd86baf2abc3f95d957ef", "sha256": "db0b2dae9c29cfefb7cfa59b95b37ef142e15de0a6178ec66875e499963c8a28" }, "downloads": -1, "filename": "str2type-0.1.1.tar.gz", "has_sig": false, "md5_digest": "85bea273fa9bd86baf2abc3f95d957ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3955, "upload_time": "2015-01-24T03:35:32", "url": "https://files.pythonhosted.org/packages/1f/71/780ee124e8f6f213fbbb856e0bc9ff72ac7b9fe627edd1ff656d3de26731/str2type-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7917b1b83b1b40b28010558b59d3e2c7", "sha256": "c4907002a3ecd26adfae01ab3c8e47e8987033d97a9a8e03afdb07b1c95f4f47" }, "downloads": -1, "filename": "str2type-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7917b1b83b1b40b28010558b59d3e2c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4317, "upload_time": "2015-01-27T02:22:01", "url": "https://files.pythonhosted.org/packages/04/16/c486aa5c04eb2ba0bdc9a40cabf56ae5b853db5c60640d52339355643cb6/str2type-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "03a3cc938f6fa4fe3176655bff764e12", "sha256": "50268ecd7d2142887c8e9b25c231e7b2e685bef2a1b47359ac36e7cba30a8273" }, "downloads": -1, "filename": "str2type-0.1.3.tar.gz", "has_sig": false, "md5_digest": "03a3cc938f6fa4fe3176655bff764e12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4045, "upload_time": "2015-01-27T03:41:54", "url": "https://files.pythonhosted.org/packages/e4/0a/2a60a57a9ec615e3da955631738d84ce83d786483f2f8b3951256791fae5/str2type-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "1747977996fcdd0224de75b93538e46c", "sha256": "33226e10394d94a2cd512ca0ebdf4675ffe2b59bb26180c814fe454f08235103" }, "downloads": -1, "filename": "str2type-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1747977996fcdd0224de75b93538e46c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4708, "upload_time": "2015-02-06T03:24:13", "url": "https://files.pythonhosted.org/packages/6d/81/8667ba2bc21599432561261b6f97b8a2dec389b30ddadaa68225cf061240/str2type-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2551b55c4c225597adea98eafae054ae", "sha256": "aac9d55fa9aba06c01765d48f6423d7f5b505fc55ce986903dbbe1924d013242" }, "downloads": -1, "filename": "str2type-0.3.0.tar.gz", "has_sig": false, "md5_digest": "2551b55c4c225597adea98eafae054ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5257, "upload_time": "2015-02-10T22:16:43", "url": "https://files.pythonhosted.org/packages/24/c0/0ff9fc1fbc03c3ff2f09ba1a76ff2e55bdaabd7ad255c164196043a6aba7/str2type-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "4227da8809aa2548b2e0e65ae46fedad", "sha256": "9edf2293a5bcc6fbe95b4ff474385451637946f8f94128f0384a0e7df7702643" }, "downloads": -1, "filename": "str2type-0.3.1.tar.gz", "has_sig": false, "md5_digest": "4227da8809aa2548b2e0e65ae46fedad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5215, "upload_time": "2015-02-10T22:32:50", "url": "https://files.pythonhosted.org/packages/de/c0/a04dc4f4a54925bf8a6ddaea8d9295dab713536352e33ac9705769432654/str2type-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "84b468a3d4bdcc0965407cc066b8a52a", "sha256": "efa6018dc9e305ee63a4be2cc37fc0b39fbd1b28a2fbc02d0d82c8cc2cf0f919" }, "downloads": -1, "filename": "str2type-0.4.0.tar.gz", "has_sig": false, "md5_digest": "84b468a3d4bdcc0965407cc066b8a52a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5730, "upload_time": "2015-04-28T03:57:59", "url": "https://files.pythonhosted.org/packages/e3/ec/1c8ed31219a81da884565575f949c971f0c4beea161b6459c7e3692b2da6/str2type-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "8f02c42ca866161c54b498779411384c", "sha256": "f0682f079c225ff88006b12fa37f64e121c2b9e2d538a4611e4ef4a3ef982c05" }, "downloads": -1, "filename": "str2type-0.4.1.tar.gz", "has_sig": false, "md5_digest": "8f02c42ca866161c54b498779411384c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7206, "upload_time": "2015-04-28T18:56:33", "url": "https://files.pythonhosted.org/packages/30/28/cf1f21ab9e42161fa61298b39ab34b4c7882e680424739484a1380b61d5f/str2type-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8f02c42ca866161c54b498779411384c", "sha256": "f0682f079c225ff88006b12fa37f64e121c2b9e2d538a4611e4ef4a3ef982c05" }, "downloads": -1, "filename": "str2type-0.4.1.tar.gz", "has_sig": false, "md5_digest": "8f02c42ca866161c54b498779411384c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7206, "upload_time": "2015-04-28T18:56:33", "url": "https://files.pythonhosted.org/packages/30/28/cf1f21ab9e42161fa61298b39ab34b4c7882e680424739484a1380b61d5f/str2type-0.4.1.tar.gz" } ] }