Perseus RESTful API Client Python Library
Repository of classes that provide Pythonic interfaces to connect to a RESTful API server developed with Perseus RESTful API server framework.
Python Library Poster 0.8.1
Note: 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.
The 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:
if fileobj is not None and filesize is None:
# Try and determine the file size
try:
self.filesize = os.fstat(fileobj.fileno()).st_size
except (OSError, AttributeError):
try:
fileobj.seek(0, 2)
self.filesize = fileobj.tell()
fileobj.seek(0)
except:
raise ValueError("Could not determine filesize")
This 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 theio.UnsupportedOperation for fileno` on 2013-03-12:
try:
from io import UnsupportedOperation
except ImportError:
UnsupportedOperation = None
(...)
if fileobj is not None and filesize is None:
# Try and determine the file size
try:
self.filesize = os.fstat(fileobj.fileno()).st_size
except (OSError, AttributeError, UnsupportedOperation):
try:
fileobj.seek(0, 2)
self.filesize = fileobj.tell()
fileobj.seek(0)
except:
raise ValueError("Could not determine filesize")
However, the latest version of poster installable with pip is still 0.8.1.
Metadata
Release files for perseus-restful-api-client-library 1.4.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| perseus_restful_api_client_library-1.4.12.tar.gz | 25.1 kB | Without provenance | Details for perseus_restful_api_client_library-1.4.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| perseus_restful_api_client_library-1.4.12-py3-none-any.whl | Python 3 | none | any | Details for perseus_restful_api_client_library-1.4.12-py3-none-any.whl |
Total release size: 65.5 kB
Release files / perseus_restful_api_client_library-1.4.12.tar.gz
| Download URL | perseus_restful_api_client_library-1.4.12.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
830e8d8b3444c5cc01c5a7f6912adc24579553d92bef1acf859f0643b3fb918c
|
|
BLAKE2b-256 checksum How to use checksums |
bd77f4f02be46eb38095671eaa8a7c17c0d378d570ad96b411cde76f9b0220a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.6 Darwin/23.2.0
|
Release files / perseus_restful_api_client_library-1.4.12-py3-none-any.whl
| Download URL | perseus_restful_api_client_library-1.4.12-py3-none-any.whl |
|---|---|
| Size | 40.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
97c3061881d45e195b6d01ca6e67642af084f5d06bde1b65aa117a162b2bdf27
|
|
BLAKE2b-256 checksum How to use checksums |
7a7ec054889195e5d340cd47dd91c866cca9e72d7f14b14f59f2ceebb7dbbd57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.6 Darwin/23.2.0
|
Security for perseus-restful-api-client-library 1.4.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.