Skip to main content

Repickle

Repickle makes it possible to serialize Python constructs not supported by the default pickle module from the Python standard library. Repickle just extends cloudpickle and add support for load and dump to files.

Installation

The latest release of repickle is available from pypi:

pip install repickle

Examples

Pickling a lambda expression:

>>> import repickle
>>> squared = lambda x: x ** 2
>>> repickle.dump_to_file(squared, "pickled_lambda.pkl")

>>> new_squared = repickle.load_from_file("pickled_lambda.pkl")
>>> new_squared(2)
4

Pickling a function interactively defined in a Python shell session (in the __main__ module):

>>> CONSTANT = 42
>>> def my_function(data: int) -> int:
...     return data + CONSTANT
...
>>> import repickle
>>> repickle.dump_to_file(my_function, "pickled_lambda.pkl")
>>> depickled_function = repickle.load_from_file("pickled_lambda.pkl")
>>> depickled_function(43)
85

Metadata

Release files for repickle 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repickle 0.1.0
File Size Uploaded Provenance Actions
repickle-0.1.0.tar.gz 22.3 kB Without provenance Details for repickle-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for repickle 0.1.0
File Interpreter ABI Platform Actions
repickle-0.1.0-py3-none-any.whl Python 3 none any Details for repickle-0.1.0-py3-none-any.whl

Total release size: 46.3 kB

Release files / repickle-0.1.0.tar.gz

Download URL repickle-0.1.0.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6e53bf8581417a72ef4566a67011d164bbeeed9493aca1c6415650f69d947a59
BLAKE2b-256 checksum
How to use checksums
aafa607a9e49f3587e18b52f15321c84d70fbf5329746c61d51e1ae0208fed3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

Release files / repickle-0.1.0-py3-none-any.whl

Download URL repickle-0.1.0-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
544864c2663dd920ddbb935be42222f5fa7cc2724d9f0ff7a1d7d5858a74e8a9
BLAKE2b-256 checksum
How to use checksums
c3c42a657de8e74a35e4d69b44602ff0e32dabe9210277ad6c9e05dc7319805d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

Security for repickle 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page