{ "info": { "author": "Shawn McElroy", "author_email": "shawn@skift.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "===========\nChange Case\n===========\n\nWhat is this for?\n=================\n\nAs simple as it is, I was surprised that there was no libraries in pypi that purely handled changing of casing from one\nstyle to another. Sure simple .title() is easy. But this library allows you to easily take any casing type and go from\none to the other.\n\nTypes supported\n\n* `camelCase`_ (lower camel case)\n* `PascalCase`_ (upper camel case)\n* `WikiCase`_\n* `snake_case`_\n* param-case (for url's)\n\n.. _camelCase: http://en.wikipedia.org/wiki/CamelCase\n.. _PascalCase: http://c2.com/cgi/wiki?PascalCase\n.. _WikiCase: http://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_%28capitalization%29\n.. _snake_case: http://en.wikipedia.org/wiki/Snake_case\n\nPython Version Support\n======================\n\nI only plan on supporting python 3, as that is what I primarily use. It works on python 3.3+. I have not tested on\nolder versions.\n\nUsage\n=====\n\nChange Case is easy to use. You simply pass a string to get the new value. Example, if you want to convert a\n``camelCasedString`` to a ``snake_cased_string``, you would simply run::\n\n old = \"camelCasedString\"\n new = ChangeCase.camel_to_snake(old)\n print(new)\n # camel_cased_string\n\nTo see what is possibly, simply view the main file. You can run tests by running the file directly. You can also look at\nthe tests to see the usage and response of each one.\n\nTests\n=====\n\nYou can easily run tests one of two ways. You can run the change_case.py file manually with python, and it will run the\ntest.::\n\n python3 change_case.py\n\nor you can do this as well::\n\n In [1]: from change_case import ChangeCase\n\n In [2]: ChangeCase.run_tests()\n camel_to_upper_camel tests passed.\n camel_to_pascal tests passed.\n camel_to_wiki tests passed.\n camel_to_snake tests passed.\n camel_to_param tests passed.\n pascal_to_camel tests passed.\n pascal_to_upper_camel tests passed.\n pascal_to_wiki tests passed.\n pascal_to_snake tests passed.\n pascal_to_param tests passed.\n wiki_to_camel tests passed.\n wiki_to_upper_camel tests passed.\n wiki_to_pascal tests passed.\n wiki_to_snake tests passed.\n wiki_to_param tests passed.\n snake_to_camel tests passed.\n snake_to_upper_camel tests passed.\n snake_to_pascal tests passed.\n snake_to_wiki tests passed.\n snake_to_param tests passed.\n param_to_camel tests passed.\n param_to_upper_camel tests passed.\n param_to_pascal tests passed.\n param_to_wiki tests passed.\n param_to_snake tests passed.\n\nContributing and Bugs\n=====================\n\nYou can file any issues you find here:\n\nhttps://github.com/SkiftCreative/python-change-case/issues\n\nIt is fairly simple to add new case types. Simply add the methods to ``ChangeCase`` and add the tests to\n``ChangeCase.run_tests()``\n\n=======\nLICENSE\n=======\n\nThe MIT License (MIT)\n\nCopyright (c) [2015] [Shawn McElroy]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "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/SkiftCreative/python-change-case", "keywords": null, "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "change_case", "package_url": "https://pypi.org/project/change_case/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/change_case/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/SkiftCreative/python-change-case" }, "release_url": "https://pypi.org/project/change_case/0.5.2/", "requires_dist": null, "requires_python": null, "summary": "change between one type of casing and another", "version": "0.5.2" }, "last_serial": 1553796, "releases": { "0.5.1": [ { "comment_text": "", "digests": { "md5": "72d88bbcf8722dd70a313b352a70e163", "sha256": "f14030f3462dbf3733dd98574351c0cedf874ecbe6a401f28df8a52d36869bf4" }, "downloads": -1, "filename": "change_case-0.5.1.tar.gz", "has_sig": false, "md5_digest": "72d88bbcf8722dd70a313b352a70e163", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8067, "upload_time": "2015-05-19T21:01:33", "url": "https://files.pythonhosted.org/packages/f9/88/45a7b93c75d11299f9d0aa465e1e9e0935f27cd5ff5ad97daebfcd1aee99/change_case-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "92b6497ddf86279d5558a77d1fc57911", "sha256": "6096ac5c888ec0baa1d5a1ba10e2a8e0e431a8fd586bb78f18f4a32eb1e063d9" }, "downloads": -1, "filename": "change_case-0.5.2.tar.gz", "has_sig": false, "md5_digest": "92b6497ddf86279d5558a77d1fc57911", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8591, "upload_time": "2015-05-19T21:37:03", "url": "https://files.pythonhosted.org/packages/86/4f/3d5dc5107163201db73f66bfd0d00fa5e3e32bb0d13ffab364f28138fad1/change_case-0.5.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "92b6497ddf86279d5558a77d1fc57911", "sha256": "6096ac5c888ec0baa1d5a1ba10e2a8e0e431a8fd586bb78f18f4a32eb1e063d9" }, "downloads": -1, "filename": "change_case-0.5.2.tar.gz", "has_sig": false, "md5_digest": "92b6497ddf86279d5558a77d1fc57911", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8591, "upload_time": "2015-05-19T21:37:03", "url": "https://files.pythonhosted.org/packages/86/4f/3d5dc5107163201db73f66bfd0d00fa5e3e32bb0d13ffab364f28138fad1/change_case-0.5.2.tar.gz" } ] }