{ "info": { "author": "Daniel CAUNE", "author_email": "daniel.caune@majormode.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "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-place-restful-api-client-library", "package_url": "https://pypi.org/project/perseus-place-restful-api-client-library/", "platform": "any", "project_url": "https://pypi.org/project/perseus-place-restful-api-client-library/", "project_urls": null, "release_url": "https://pypi.org/project/perseus-place-restful-api-client-library/1.0.2/", "requires_dist": null, "requires_python": ">=3", "summary": "Perseus Place RESTful API Client Python Library", "version": "1.0.2" }, "last_serial": 5680792, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "aedf1cafdd1228c9281fa7319668cc7d", "sha256": "27780fa2d410ebab0f70c66fb1ad98fe9bc019326994741370613b0bf9c40155" }, "downloads": -1, "filename": "perseus_place_restful_api_client_library-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "aedf1cafdd1228c9281fa7319668cc7d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 10287, "upload_time": "2019-08-15T02:29:28", "url": "https://files.pythonhosted.org/packages/f4/12/76d9a38f506ab5eaabcfdda3d40a23cd0132308c4db3001fc0d7367169cc/perseus_place_restful_api_client_library-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88dd28a31b81e5220d5d02283922cef0", "sha256": "5f693e2f369832d5a98a0763ed658ba188eb9f663c9df9a93acb9bd46268faab" }, "downloads": -1, "filename": "perseus-place-restful-api-client-library-1.0.1.tar.gz", "has_sig": false, "md5_digest": "88dd28a31b81e5220d5d02283922cef0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 7179, "upload_time": "2019-08-15T02:29:31", "url": "https://files.pythonhosted.org/packages/54/e7/c8f039eab9094971d49b8b00b088bf52677ccfe19ce483f5ccb1e076452a/perseus-place-restful-api-client-library-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "d660739be5ef23b5a1dde70a8551a642", "sha256": "f8526cdbd15871881e611ca933cd2115c612beed5a8e651b09c4f7f61df479c6" }, "downloads": -1, "filename": "perseus_place_restful_api_client_library-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d660739be5ef23b5a1dde70a8551a642", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 10381, "upload_time": "2019-08-15T06:25:12", "url": "https://files.pythonhosted.org/packages/e8/6c/898839b35084e9ce9a47c611c02c0bd6a4704dd69a50a541f418b06d92b2/perseus_place_restful_api_client_library-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ba83f52c46b7ca56f47a23f53e6e39e", "sha256": "cfc353301d330aed392afaa97eabfbdc88031f99ea9da84025267f04e255ec25" }, "downloads": -1, "filename": "perseus-place-restful-api-client-library-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2ba83f52c46b7ca56f47a23f53e6e39e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 7283, "upload_time": "2019-08-15T06:25:13", "url": "https://files.pythonhosted.org/packages/f7/34/94d712c3d3d8b98f0499839d7beebd159e4c78bea8a50c285f5cbb940313/perseus-place-restful-api-client-library-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d660739be5ef23b5a1dde70a8551a642", "sha256": "f8526cdbd15871881e611ca933cd2115c612beed5a8e651b09c4f7f61df479c6" }, "downloads": -1, "filename": "perseus_place_restful_api_client_library-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d660739be5ef23b5a1dde70a8551a642", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 10381, "upload_time": "2019-08-15T06:25:12", "url": "https://files.pythonhosted.org/packages/e8/6c/898839b35084e9ce9a47c611c02c0bd6a4704dd69a50a541f418b06d92b2/perseus_place_restful_api_client_library-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ba83f52c46b7ca56f47a23f53e6e39e", "sha256": "cfc353301d330aed392afaa97eabfbdc88031f99ea9da84025267f04e255ec25" }, "downloads": -1, "filename": "perseus-place-restful-api-client-library-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2ba83f52c46b7ca56f47a23f53e6e39e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 7283, "upload_time": "2019-08-15T06:25:13", "url": "https://files.pythonhosted.org/packages/f7/34/94d712c3d3d8b98f0499839d7beebd159e4c78bea8a50c285f5cbb940313/perseus-place-restful-api-client-library-1.0.2.tar.gz" } ] }