{ "info": { "author": "Daniel CAUNE", "author_email": "daniel.caune@majormode.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Perseus RESTful API Client Python Library\n\nRepository of classes that provide Pythonic interfaces to connect to a RESTful API server developed with Perseus RESTful API Framework.\n\n## Python Library `Poster 0.8.1`\n\nNote: this library includes a modified version of `poster 0.8.1`, which original version provides a set of classes and functions to facilitate making HTTP POST (or PUT) requests using the standard multipart/form-data encoding.\n\nThe original library `poster 0.8.1` cannot be used to upload file uploaded into memory (i.e., stream-to-memory), like for instance django `InMemoryUploadedFile`. The reason is that such file-like object doesn't support the method `fileno()` used by the `poster 0.8.1` to determine the size of the file-like object to upload in Python module `poster.encode`:\n\n```python\nif fileobj is not None and filesize is None:\n # Try and determine the file size\n try:\n self.filesize = os.fstat(fileobj.fileno()).st_size\n except (OSError, AttributeError):\n try:\n fileobj.seek(0, 2)\n self.filesize = fileobj.tell()\n fileobj.seek(0)\n except:\n raise ValueError(\"Could not determine filesize\")\n```\n\nThis code raises the exception `io.UnsupportedOperation` that `poster 0.8.1` doesn't catch. Chris AtLee included Alon Hammerman's patch in the tag `tip` of the library ``poster`, for catching the`io.UnsupportedOperation for fileno` on 2013-03-12:\n\n```python\ntry:\n from io import UnsupportedOperation\nexcept ImportError:\n UnsupportedOperation = None\n\n(...)\n\nif fileobj is not None and filesize is None:\n # Try and determine the file size\n try:\n self.filesize = os.fstat(fileobj.fileno()).st_size\n except (OSError, AttributeError, UnsupportedOperation):\n try:\n fileobj.seek(0, 2)\n self.filesize = fileobj.tell()\n fileobj.seek(0)\n except:\n raise ValueError(\"Could not determine filesize\")\n```\n\nHowever, the latest version of `poster` installable with `pip` is still `0.8.1`.\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": "", "keywords": "", "license": "Copyright (C) 2019, Majormode", "maintainer": "", "maintainer_email": "", "name": "perseus-restful-api-client-library", "package_url": "https://pypi.org/project/perseus-restful-api-client-library/", "platform": "any", "project_url": "https://pypi.org/project/perseus-restful-api-client-library/", "project_urls": null, "release_url": "https://pypi.org/project/perseus-restful-api-client-library/1.2.11/", "requires_dist": [ "perseus-core-library" ], "requires_python": ">=3", "summary": "Perseus RESTful API Client Python Library", "version": "1.2.11" }, "last_serial": 5894670, "releases": { "1.2.11": [ { "comment_text": "", "digests": { "md5": "cad44e7427ab892caae1b391cb5e7de8", "sha256": "5e7a337ef8c0a1a2a9abc5a5f5c9e268fda167fbe39754eddd36028333876fbc" }, "downloads": -1, "filename": "perseus_restful_api_client_library-1.2.11-py3-none-any.whl", "has_sig": false, "md5_digest": "cad44e7427ab892caae1b391cb5e7de8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 45890, "upload_time": "2019-09-26T10:11:15", "url": "https://files.pythonhosted.org/packages/07/c8/faf61625988438770fabc8cf24057731f7434542ee33c6b2507a534dc852/perseus_restful_api_client_library-1.2.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ace851604734834e88c83b12461ce96", "sha256": "6ba3020db1648e052366f374cfb5b45f1681bbd8573131514e8c012eb4111843" }, "downloads": -1, "filename": "perseus-restful-api-client-library-1.2.11.tar.gz", "has_sig": false, "md5_digest": "0ace851604734834e88c83b12461ce96", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 29793, "upload_time": "2019-09-26T10:11:17", "url": "https://files.pythonhosted.org/packages/07/1b/81480b087739bdaca9d6ee122ae542116807499e73654c1ce72b3c39efaf/perseus-restful-api-client-library-1.2.11.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cad44e7427ab892caae1b391cb5e7de8", "sha256": "5e7a337ef8c0a1a2a9abc5a5f5c9e268fda167fbe39754eddd36028333876fbc" }, "downloads": -1, "filename": "perseus_restful_api_client_library-1.2.11-py3-none-any.whl", "has_sig": false, "md5_digest": "cad44e7427ab892caae1b391cb5e7de8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 45890, "upload_time": "2019-09-26T10:11:15", "url": "https://files.pythonhosted.org/packages/07/c8/faf61625988438770fabc8cf24057731f7434542ee33c6b2507a534dc852/perseus_restful_api_client_library-1.2.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ace851604734834e88c83b12461ce96", "sha256": "6ba3020db1648e052366f374cfb5b45f1681bbd8573131514e8c012eb4111843" }, "downloads": -1, "filename": "perseus-restful-api-client-library-1.2.11.tar.gz", "has_sig": false, "md5_digest": "0ace851604734834e88c83b12461ce96", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 29793, "upload_time": "2019-09-26T10:11:17", "url": "https://files.pythonhosted.org/packages/07/1b/81480b087739bdaca9d6ee122ae542116807499e73654c1ce72b3c39efaf/perseus-restful-api-client-library-1.2.11.tar.gz" } ] }