{ "info": { "author": "Aalaap Ghag", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: PHP", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "![PyPi Status](https://img.shields.io/pypi/status/wraphper.svg) ![PyPi Python Version](https://img.shields.io/pypi/pyversions/wraphper.svg) ![PyPi Downloads](https://img.shields.io/pypi/dm/wraphper.svg) ![GitHub Issues](https://img.shields.io/github/issues-raw/aalaap/wraphper.svg) ![GitHub Commit Activity](https://img.shields.io/github/commit-activity/y/aalaap/wraphper.svg) ![PyPi License](https://img.shields.io/pypi/l/wraphper.svg) ![PyPi Version](https://img.shields.io/pypi/v/wraphper.svg)\n\n# wraphper\n\nPython wrappers for PHP functions, when you just can't shake it.\n\n## Why?\n\nIf you're coming from PHP, you'll take a bit of time getting used to the new names or methods in Python. You could look up something like `\"python str_replace\"` everytime you want to do so, or you could just save time and use `php.str_replace('Hello', 'Goodbye', 'Hello, world!')`.\n\nWhy not?\n\n## Installation\n\nPip it.\n\n```\n$ pip install wraphper\n```\n\n## Usage\n\nImport the module and then fulfil your PHP fantasies in Python:\n\n```python\nimport wraphper as php\n\na = [1, 2, 3]\nphp.count(a)\n# outputs: 3\n```\n\n## Supported functions\n\nThis module is a work in progress. Not all functions are supported yet. The current list includes:\n\n- [count](http://php.net/manual/en/function.count.php)\n- [str_replace](http://php.net/manual/en/function.str-replace.php)\n\nPRs with more functions are welcome!\n\n## Performance and Security\n\nwraphper doesn't internally call PHP to run these functions, it simply provides you a PHP-like function name that runs the Python equivalent. As such, performance is unaffected because only Python is running.\n\nSimilarly, there are no implications of this on security.\n\n## Contributing\n\nFollow these rules with contributed functions:\n\n- The function must be an [native PHP function](http://php.net/manual/en/funcref.php), not from a third-party library. \n- The name of the function must match the original exactly. Otherwise, the purpose of this module is defeated.\n- The function should take the exact same number of arguments as the original.\n- The argument types must match the PHP types as closely as possible, so `string` is `str`, `int` is `int`, `array` is `list` or `dict`, etc.\n- The function must throw an appropriate exception with the exact same error message from the PHP function.\n- The function should avoid any pre- or post-processing of the argument or return value. The goal is not to match PHP functions' inputs and outputs, but to provide a PHP-familiar syntax for Python developers.\n\n## Testing\n\nTests can be run by the following command:\n\n```\n$ python tests.py\n```\n\n## Compatibility\n\nwraphper has been checked with Python 2.7 and 3.6, but there's no reason why it shouldn't work with older versions.\n\n## Changelog\n\n### 0.0.2 - 2019-01-29\n\n- Added `str_replace`\n\n### 0.0.1.post2 - 2019-01-28\n\n- **BREAKING** Removed class to make it easier to import and use\n- Added tuple support\n- Added more tests\n- Added changelog\n\n### 0.0.1.post1 - 2019-01-26\n\n- Added tests\n\n### 0.0.1 - 2019-01-26\n\n- Initial release with `count` function\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/aalaap/wraphper", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "wraphper", "package_url": "https://pypi.org/project/wraphper/", "platform": "", "project_url": "https://pypi.org/project/wraphper/", "project_urls": { "Homepage": "https://github.com/aalaap/wraphper" }, "release_url": "https://pypi.org/project/wraphper/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Python wrappers for PHP functions, when you just can't shake it.", "version": "0.0.2" }, "last_serial": 4753342, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7f5a196e8f6910a64bd08fa2456704af", "sha256": "2df88a3b1649f7436e4a26b8f699b9438b63dfa0c4206c4f004fe5be3b846803" }, "downloads": -1, "filename": "wraphper-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7f5a196e8f6910a64bd08fa2456704af", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3478, "upload_time": "2019-01-25T10:36:21", "url": "https://files.pythonhosted.org/packages/36/cb/1ca2ec36a36a208215e1c256e4cfe53604ee1194b941430209dc38399aef/wraphper-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6025bef0b283388b124b447c63bdab0b", "sha256": "5b7219ad39973d42e4677e41ad13d79feda7331c70c646e63b454a97dccce64e" }, "downloads": -1, "filename": "wraphper-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6025bef0b283388b124b447c63bdab0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2535, "upload_time": "2019-01-25T10:36:23", "url": "https://files.pythonhosted.org/packages/3c/8a/4d0b4a1b5c84608bc0e0baf902b30a43ea39bdb5467ff556007af1b493c5/wraphper-0.0.1.tar.gz" } ], "0.0.1.post1": [ { "comment_text": "", "digests": { "md5": "9d96b9f10380d0d3bcb7f6346a8e87b5", "sha256": "2e2346fa65c3ee335f90fe607e1765383d17b5c6b3df610bd0cf0da979c5053e" }, "downloads": -1, "filename": "wraphper-0.0.1.post1-py3-none-any.whl", "has_sig": false, "md5_digest": "9d96b9f10380d0d3bcb7f6346a8e87b5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3721, "upload_time": "2019-01-25T12:48:09", "url": "https://files.pythonhosted.org/packages/39/5e/8ef8d111dea6610d4ac2d191620d7928685f8e0c1a506b9a5a54ac4019b3/wraphper-0.0.1.post1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5c92d6e16eb00f21a8144fd841093b90", "sha256": "1b77ee455b05aeb3205ea5646e95ac3ad3eb7bd0c5b336f58219b03d499cdc82" }, "downloads": -1, "filename": "wraphper-0.0.1.post1.tar.gz", "has_sig": false, "md5_digest": "5c92d6e16eb00f21a8144fd841093b90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2780, "upload_time": "2019-01-25T12:48:10", "url": "https://files.pythonhosted.org/packages/0c/ce/efbf75d4312f3f69c438d7c5e62808a54be82796eee8e2e36a5eb59bc13c/wraphper-0.0.1.post1.tar.gz" } ], "0.0.1.post2": [ { "comment_text": "", "digests": { "md5": "d7148b2efcbb8d832056c528d66313b2", "sha256": "3ef274c41ceed3fa2b8204529a4e74cbfea171addcd58ee2fe2e7bee73e0dc55" }, "downloads": -1, "filename": "wraphper-0.0.1.post2-py3-none-any.whl", "has_sig": false, "md5_digest": "d7148b2efcbb8d832056c528d66313b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3772, "upload_time": "2019-01-28T12:12:03", "url": "https://files.pythonhosted.org/packages/06/d6/816a641a039ed1b39242a950f244ad808ff33133f671fcf8a08b7c6906cc/wraphper-0.0.1.post2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ba10934c87954c2465da1e70486ade1", "sha256": "d490ef28a7d9cd36628b60b4d1cd4a5916d6e442d2782b2bae4b43ba11b5d0de" }, "downloads": -1, "filename": "wraphper-0.0.1.post2.tar.gz", "has_sig": false, "md5_digest": "0ba10934c87954c2465da1e70486ade1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2866, "upload_time": "2019-01-28T12:12:05", "url": "https://files.pythonhosted.org/packages/e0/6f/607990bcc69dcb06e755d7c8dc726fa38b557887f13016070979d826dd83/wraphper-0.0.1.post2.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "2c0d327cac40acaa499c20365e5b87e6", "sha256": "746cb6f4432f5b0485ae731f47e68916a13b1c5c13420bb215f933dc72288ba9" }, "downloads": -1, "filename": "wraphper-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2c0d327cac40acaa499c20365e5b87e6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4239, "upload_time": "2019-01-29T06:20:04", "url": "https://files.pythonhosted.org/packages/0e/27/f39b5504cbe9c8072ec1620b26952b5a7c1da291310c1f654615b48eecca/wraphper-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b8defac5ec182179d4410e8f8bef2d6", "sha256": "25eb399f170241ba44546babd5f4d0a7d75a31c39f8d6f3d3f1abaed38c5f88c" }, "downloads": -1, "filename": "wraphper-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0b8defac5ec182179d4410e8f8bef2d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3378, "upload_time": "2019-01-29T06:20:05", "url": "https://files.pythonhosted.org/packages/c4/18/e9d3125b98e34c975f034891d81d9805ab9fc4634f199ef8bad52ce77e6f/wraphper-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2c0d327cac40acaa499c20365e5b87e6", "sha256": "746cb6f4432f5b0485ae731f47e68916a13b1c5c13420bb215f933dc72288ba9" }, "downloads": -1, "filename": "wraphper-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2c0d327cac40acaa499c20365e5b87e6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4239, "upload_time": "2019-01-29T06:20:04", "url": "https://files.pythonhosted.org/packages/0e/27/f39b5504cbe9c8072ec1620b26952b5a7c1da291310c1f654615b48eecca/wraphper-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b8defac5ec182179d4410e8f8bef2d6", "sha256": "25eb399f170241ba44546babd5f4d0a7d75a31c39f8d6f3d3f1abaed38c5f88c" }, "downloads": -1, "filename": "wraphper-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0b8defac5ec182179d4410e8f8bef2d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3378, "upload_time": "2019-01-29T06:20:05", "url": "https://files.pythonhosted.org/packages/c4/18/e9d3125b98e34c975f034891d81d9805ab9fc4634f199ef8bad52ce77e6f/wraphper-0.0.2.tar.gz" } ] }