{ "info": { "author": "Jeremiah Paige", "author_email": "ucodery@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# F-yeah!\n#### Reusable f-strings\nShed all outdated format sytles from your code.\nWith F-yeah Just add parentheses and be on your way.\n\n## Usage\n#### No more copying around f-strings\nKeep your templates DRY without reverting to older format styles.\n```python\ndef action1(value):\n assert isinstance(value, int), 'Expected value to be an integer, got {type(value)} instead'\n return value * value\n\ndef action2(value):\n assert isinstance(value, int), 'Expected value to be an integer, got {type(value)} instead'\n return value ** value\n```\nJust write the template once to get consistent strings that stay in sync.\n```python\nfrom fyeah import f\nbad_check = 'Expected value to be an integer, got {type(value)} instead'\n\ndef action1(value):\n assert isinstance(value, int), f(bad_check)\n return value * value\n\ndef action2(value):\n assert isinstance(value, int), f(bad_check)\n return value ** value\n```\n----\n#### No more format calls, ever!\nConsolidate on f-string style format for all templates, local or global.\n```python\nbad_check = 'expected value to be an integer, got {type(value)} instead'\n\ndef action1(value):\n assert isinstance(value, int), bad_check.format(value=value)\n return value * value\n\ndef action2(value):\n assert isinstance(value, int), bad_check.format(value=value)\n return value ** value\n```\nJust use the same format string as a reusable f-string instead.\n```python\nfrom fyeah import f\nbad_check = 'Expected value to be an integer, got {type(value)} instead'\n\ndef action1(value):\n assert isinstance(value, int), f(bad_check)\n return value * value\n\ndef action2(value):\n assert isinstance(value, int), f(bad_check)\n return value ** value\n```\n\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/ucodery/fyeah", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "f-yeah", "package_url": "https://pypi.org/project/f-yeah/", "platform": "", "project_url": "https://pypi.org/project/f-yeah/", "project_urls": { "Homepage": "https://github.com/ucodery/fyeah" }, "release_url": "https://pypi.org/project/f-yeah/0.1.0/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Reusable f-strings", "version": "0.1.0" }, "last_serial": 5573025, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "02ee767c443074658d6d8b833055fa64", "sha256": "a324245beac1aeabff25c28804db14cd7942bd467d71766060f7c6f02f99a8d0" }, "downloads": -1, "filename": "f_yeah-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "02ee767c443074658d6d8b833055fa64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 3099, "upload_time": "2019-07-23T15:23:25", "url": "https://files.pythonhosted.org/packages/87/e8/57a89912f3d1207a3022755cfe97fdf5bb34c7df67572b6c909b3f7e14dd/f_yeah-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02d276a619d97702c654513929f0ecde", "sha256": "68fa17c31ee0a67424e88cc79a6fcf694ff7424b093164f131f3c704f6cdbd01" }, "downloads": -1, "filename": "f-yeah-0.1.0.tar.gz", "has_sig": false, "md5_digest": "02d276a619d97702c654513929f0ecde", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1782, "upload_time": "2019-07-23T15:23:31", "url": "https://files.pythonhosted.org/packages/ef/59/aa9869e0b16598c45a7bc7557b04089e58d923b196eac2c78b7d137588b4/f-yeah-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "02ee767c443074658d6d8b833055fa64", "sha256": "a324245beac1aeabff25c28804db14cd7942bd467d71766060f7c6f02f99a8d0" }, "downloads": -1, "filename": "f_yeah-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "02ee767c443074658d6d8b833055fa64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 3099, "upload_time": "2019-07-23T15:23:25", "url": "https://files.pythonhosted.org/packages/87/e8/57a89912f3d1207a3022755cfe97fdf5bb34c7df67572b6c909b3f7e14dd/f_yeah-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02d276a619d97702c654513929f0ecde", "sha256": "68fa17c31ee0a67424e88cc79a6fcf694ff7424b093164f131f3c704f6cdbd01" }, "downloads": -1, "filename": "f-yeah-0.1.0.tar.gz", "has_sig": false, "md5_digest": "02d276a619d97702c654513929f0ecde", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1782, "upload_time": "2019-07-23T15:23:31", "url": "https://files.pythonhosted.org/packages/ef/59/aa9869e0b16598c45a7bc7557b04089e58d923b196eac2c78b7d137588b4/f-yeah-0.1.0.tar.gz" } ] }