Memento-client

Latest version: v0.6.1

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.6.1

This release contains major updates with some bug fixes to the library and new unit tests.

0.5.3

- support for Python 3.5
- fix for defect whereby a nonexistent live URI is processed differently on Linux vs OSX
- workaround for a defect in the requests library where it acts differently on Linux vs OSX

Enjoy the new py-memento-client the next time you need to use Memento in Python.

0.5.2

- support for Python 3.5
- fix for defect whereby a nonexistent live URI is processed differently on Linux vs OSX

Enjoy the new py-memento-client the next time you need to use Memento in Python.

0.5.1

- support for Python 2.7 and 3.4
- a MementoClient class that, by default, uses the Memento Aggregator as a TimeGate
- the MementoClient class provides the following methods:
- get_memento_info - performs datetime negotiation using inputs URI-R and Accept-Datetime; output resembles the JSON API documented at http://timetravel.mementoweb.org/guide/api/memento-json
- get_native_timegate_uri - issues request to URI-R and extracts value for URI-G from Link header (used for CMS systems)
- get_original_uri - issues request to URI and extracts value of URI-R from Link header
- the MementoClient class provides the following optional initialization parameters:
- user-supplied timegate (URI-G) for use in datetime negotiation
- boolean to turn off the use of native TimeGates supplied in Memento headers, so one can override the TimeGate information supplied by a CMS
- configurable number of redirects to follow (default is 30)
- in addition, here is a short list of some of the static functions available:
- is_timegate - determines if a given URI, or user-supplied HTTP response, is a TimeGate by examining the Link headers
- is_memento - determines if a given URI, or user-supplied HTTP response, is a Memento by examining the headers
- parse_link_header - parses the link header to return any and all information available as a Python dictionary
- get_uri_dt_for_rel - pivots the output of parse_link_header to form a dictionary whose keys are relations

By our next version, we will provide the ability to perform as a client for TimeMaps, providing functionality for parsing and interacting with TimeMaps.

Enjoy the new py-memento-client the next time you need to use Memento in Python.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.