Skip to main content

pickleslicer: Automatic slicer and unslicer of pickle files

The pickleslicer package provides a convenient way to create and load pickle files in scenarios where storing many small files is preferable to storing a single large file.

The pickleslicer package wraps Python's built-in pickle package and has a very similar usage pattern.

Installation

The package distribution is hosted on PyPI and can be installed via pip:

pip install pickleslicer

Creating sliced pickle files

To create sliced pickle files, call pickleslicer.dump():

import pickleslicer

obj = {}   # obj can be any Python object
pickleslicer.dump(obj, "myfilename.pickle")

This will create sliced pickle files named myfilename.pickle.1, myfilename.pickle.2, etc., with each file having a maximum size of 10 MB.

To customize the maximum file size, specify the max_size parameter:

pickleslicer.dump(obj, "myfilename.pickle", max_size=50*1024*1024)  # 50 MB

Loading sliced pickle files

To load sliced pickle files that have previously been created, call pickleslicer.load():

import pickleslicer

obj = pickleslicer.load("myfilename.pickle")

This will load sliced pickle files named myfilename.pickle.1, myfilename.pickle.2, etc. The unpickled Python object is returned.

Release files for pickleslicer 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 pickleslicer 0.1.0
File Size Uploaded
pickleslicer-0.1.0.tar.gz 2.6 kB Details

Built distribution (wheel)

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

Total release size: 6.4 kB

Release files / pickleslicer-0.1.0.tar.gz

Download URL pickleslicer-0.1.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b8685a060771184738db9d412a0e3c26babd2097d8ba034ab1636b59e31cc865
BLAKE2b-256 checksum
How to use checksums
f31c9fd68bb7a686dbc7dc7c6bf0e7c8cd7f29ebabe8048027d64effee2ad00e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.3

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

Download URL pickleslicer-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bf384c0b1024af2055cf2b3bcf85c177ab6ea6a9e49bae91453f29a44104fb2
BLAKE2b-256 checksum
How to use checksums
e6639200527db6dab320e24c0c0a5ed79bf3ac36173b6d63c51db2293906f11e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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