{ "info": { "author": "Evgeny V. Bogodukhov", "author_email": "b@evbg.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "[![Latest version on\nPyPi](https://badge.fury.io/py/evc.svg)](https://badge.fury.io/py/evc)\n[![Supported Python\nversions](https://img.shields.io/pypi/pyversions/evc.svg)](https://pypi.org/project/evc/)\n[![Code style:\nblack](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n\n# evc\n\n**evc** - a simple wrapper over \"requests\" HTTP library, which uses json format for transferring, with automatic decoding to the Python dictionary and back when executing HTTP requests to the REST-API server based on the \"Eve\" framework.\n\n---\n\n*Contents:*\n**[Installation](#installation)** |\n**[Requirements](#requirements)** |\n**[Running the tests](#running-the-tests)** |\n**[Example of usage](#example-of-usage)** |\n**[Versioning](#versioning)** |\n**[Authors](#authors)** |\n**[License](#license)**\n\n---\n\n## Getting Started\n\n### Installation\n\n#### From pip\n```\npip install --upgrade evc\n```\n\n#### Manual install\n```\ngit clone https://github.com/evbg/evc.git\ncd evc\npython setup.py install\n```\n\n#### Installing directly from the [repository](https://github.com/evbg/evc) on GitHub.com\n```\npip install git+https://github.com/evbg/evc.git\n```\n\n\n### Requirements\n\nevc requires [requests](https://pypi.org/project/requests/) and [simplejson](https://pypi.org/project/simplejson/) libraries.\n\n\n## Running the tests\n\nEvc has been tested on the following versions of Python: 2.7, 3.4, 3.5, 3.6, 3.7, pypy, pypy3.\n\n### Integration tests with the Eve framework\n\n#### Prerequisites\n\nTo run tests on a localhost, it is necessary that the MongoDB service is started with access control disabled.\n\n#### Running the tests via [tox](https://tox.readthedocs.io/) tool\n```\ngit clone https://github.com/evbg/evc.git\ncd evc\ntox\n```\n\n\n## Example of usage\n\nThe following example shows the use of evc through the Python interactive shell:\n\n### First, run the server \"Eve\"\n\n```\n Python 2.7.5 (default, Mar 9 2014, 22:15:05)\n [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n >>> from eve import Eve\n >>> settings = {'XML': False, 'JSON': True, 'SERVER_NAME': '127.0.0.1:5555', 'MONGO_DBNAME': 'evc_test'}\n >>> settings['RESOURCE_METHODS'] = ['GET', 'POST', 'DELETE']\n >>> settings['ITEM_METHODS'] = ['GET', 'PATCH', 'PUT', 'DELETE']\n >>> settings['DOMAIN'] = {'persons': {'versioning': True, 'allow_unknown': True, 'schema': {}}}\n >>> app = Eve(settings=settings)\n >>> app.run()\n * Running on http://127.0.0.1:5555/ (Press CTRL+C to quit)\n```\n\n### Second, run the client \"Evc\"\n\n```\n Python 2.7.5 (default, Mar 9 2014, 22:15:05)\n Type \"copyright\", \"credits\" or \"license\" for more information.\n\n IPython 5.1.0 -- An enhanced Interactive Python.\n ? -> Introduction and overview of IPython's features.\n %quickref -> Quick reference.\n help -> Python's own help system.\n object? -> Details about 'object', use 'object??' for extra details.\n\n In [1]: from evc import Evc\n\n In [2]: REST = Evc('http://127.0.0.1:5555')\n\n In [3]: type(REST.response)\n Out[3]: NoneType\n\n In [4]: REST.get()\n Out[4]: {u'_links': {u'child': [{u'href': u'persons', u'title': u'persons'}]}}\n\n In [5]: type(REST.response)\n Out[5]: requests.models.Response\n\n In [6]: REST.response.text\n Out[6]: u'{\"_links\": {\"child\": [{\"href\": \"persons\", \"title\": \"persons\"}]}}'\n\n In [7]: REST.response.json\n Out[7]: >\n\n In [8]: REST.response.json()\n Out[8]: {u'_links': {u'child': [{u'href': u'persons', u'title': u'persons'}]}}\n\n In [9]: REST.post('persons', {'name': 'Bob', 'email': 'bob@bobmail.com'})\n Out[9]:\n {u'_created': u'Tue, 25 Oct 2016 10:46:39 GMT',\n u'_etag': u'90d02265b8d7c832247fcaeacf11d1f4bbf8f0bc',\n u'_id': u'580f380fa7a3497495d72bd4',\n u'_latest_version': 1,\n u'_links': {u'self': {u'href': u'persons/580f380fa7a3497495d72bd4',\n u'title': u'Person'}},\n u'_status': u'OK',\n u'_updated': u'Tue, 25 Oct 2016 10:46:39 GMT',\n u'_version': 1}\n\n In [10]: REST.patch('persons', '580f380fa7a3497495d72bd4', '90d02265b8d7c832247fcaeacf11d1f4bbf8f0bc', {'name': 'Bob', 'email': 'bob2@bobmail.com'})\n Out[10]:\n {u'_created': u'Tue, 25 Oct 2016 10:46:39 GMT',\n u'_etag': u'50da6d8e759eeb0a32eaf0bd820dcfb729cdf5d9',\n u'_id': u'580f380fa7a3497495d72bd4',\n u'_latest_version': 2,\n u'_links': {u'self': {u'href': u'persons/580f380fa7a3497495d72bd4',\n u'title': u'Person'}},\n u'_status': u'OK',\n u'_updated': u'Tue, 25 Oct 2016 10:48:20 GMT',\n u'_version': 2}\n\n\n In [11]: REST.delete('persons', '580f380fa7a3497495d72bd4', '50da6d8e759eeb0a32eaf0bd820dcfb729cdf5d9')\n Out[11]: u''\n\n In [12]: REST.get('persons', '580f380fa7a3497495d72bd4')\n Out[12]:\n {u'_items': [],\n u'_links': {u'parent': {u'href': u'/', u'title': u'home'},\n u'self': {u'href': u'persons', u'title': u'persons'}},\n u'_meta': {u'max_results': 25, u'page': 1, u'total': 0}}\n```\n\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning.\n\n\n## Authors\n\n* **Evgeny V. Bogodukhov** - *Initial work* - [evbg](https://github.com/evbg)\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\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/evbg/evc", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "evc", "package_url": "https://pypi.org/project/evc/", "platform": "", "project_url": "https://pypi.org/project/evc/", "project_urls": { "Homepage": "https://github.com/evbg/evc" }, "release_url": "https://pypi.org/project/evc/0.5.0/", "requires_dist": [ "requests", "simplejson" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "evc - Simple client for the EVE Python REST API Framework", "version": "0.5.0" }, "last_serial": 5267009, "releases": { "0.4.4": [ { "comment_text": "", "digests": { "md5": "0f1c56dfa5f96e0ff887d656f2665c46", "sha256": "5de8da64a2689da6f4ae5f05032d421a1ff697f4ed8628c2f03d76bd6ac2a7d3" }, "downloads": -1, "filename": "evc-0.4.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0f1c56dfa5f96e0ff887d656f2665c46", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 7922, "upload_time": "2019-05-13T23:18:32", "url": "https://files.pythonhosted.org/packages/63/90/af4c76e5172e7af8f70967b7f45b505e0a567f15cbd8fb13a663d4d9768a/evc-0.4.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "08c81229d06aacf651f6c307d0444598", "sha256": "8f3cc855bbca147625664d4934f1c6a27987e8843a5253cd1080a84f4ad9d693" }, "downloads": -1, "filename": "evc-0.4.4.tar.gz", "has_sig": false, "md5_digest": "08c81229d06aacf651f6c307d0444598", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8002, "upload_time": "2019-05-13T23:18:35", "url": "https://files.pythonhosted.org/packages/e3/85/1e76d9f94ae5733df5975fc7a057e7baba04307fec32389967d87958d4a8/evc-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "d428ab0362ca772237515dd7d51b23c4", "sha256": "c83bea9ec4ff1d6f461f819c085eca81d66111d77d97627a06e6ffb2ca761c14" }, "downloads": -1, "filename": "evc-0.4.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d428ab0362ca772237515dd7d51b23c4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8173, "upload_time": "2019-05-14T09:55:41", "url": "https://files.pythonhosted.org/packages/3a/77/77773a5d9c8c2c9b6484032dc3efd4846913abc044d8152c1f469e49e953/evc-0.4.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df7f5138223277be87f0dacef3845f90", "sha256": "9dfb703462522b06c69d109b526b6f4b6eebea9e874646b7a942b65a54dd59be" }, "downloads": -1, "filename": "evc-0.4.5.tar.gz", "has_sig": false, "md5_digest": "df7f5138223277be87f0dacef3845f90", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8501, "upload_time": "2019-05-14T09:55:43", "url": "https://files.pythonhosted.org/packages/d5/3d/dada34dd049764b45a6b28e3fae7a184347fc4c2fbec988b24427c825875/evc-0.4.5.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "e3beb132241a42a02196b08381d378bf", "sha256": "efb7bf9c3afe6880dce52c46f86d864aecb748c4e4b9bd17b16e83f421a05f01" }, "downloads": -1, "filename": "evc-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e3beb132241a42a02196b08381d378bf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8192, "upload_time": "2019-05-14T11:52:02", "url": "https://files.pythonhosted.org/packages/bb/7b/84a92d281482a205085e65db658331a13b9ee39a0dd5acb08df6d131a128/evc-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d98902810ce4930914ea7e5f236fcdbb", "sha256": "94053a9604ae6a795ee85032defa63a1497131333f724b136daad0153563d920" }, "downloads": -1, "filename": "evc-0.5.0.tar.gz", "has_sig": false, "md5_digest": "d98902810ce4930914ea7e5f236fcdbb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8532, "upload_time": "2019-05-14T11:52:04", "url": "https://files.pythonhosted.org/packages/2f/a3/1726af61a99772830da1bc84a5d9952b2b55b2c7b3a798ab64df758738aa/evc-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e3beb132241a42a02196b08381d378bf", "sha256": "efb7bf9c3afe6880dce52c46f86d864aecb748c4e4b9bd17b16e83f421a05f01" }, "downloads": -1, "filename": "evc-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e3beb132241a42a02196b08381d378bf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8192, "upload_time": "2019-05-14T11:52:02", "url": "https://files.pythonhosted.org/packages/bb/7b/84a92d281482a205085e65db658331a13b9ee39a0dd5acb08df6d131a128/evc-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d98902810ce4930914ea7e5f236fcdbb", "sha256": "94053a9604ae6a795ee85032defa63a1497131333f724b136daad0153563d920" }, "downloads": -1, "filename": "evc-0.5.0.tar.gz", "has_sig": false, "md5_digest": "d98902810ce4930914ea7e5f236fcdbb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 8532, "upload_time": "2019-05-14T11:52:04", "url": "https://files.pythonhosted.org/packages/2f/a3/1726af61a99772830da1bc84a5d9952b2b55b2c7b3a798ab64df758738aa/evc-0.5.0.tar.gz" } ] }