Skip to main content

pyjar

Move Python things to other modules, mostly for backward-compatibility, such as when you want to refactor your code but still need old pickles to be loadable, or particularly if you need the new pickles to be byte-for-byte-identical to the old ones.

installation

😄

You can pip install pyjar if you really want to, but you can also just copy this public-domain code from src/pyjar/__init__.py directly into your own project. You can even give it a name you like better.

usage

from pyjar import jar


@jar('.old_module_name)
def my_function_that_i_moved_here():
    ...

The function (or class, or whatever) will still be importable from its new location, but it will pickle as though it lives in the old location. And as long as the module that defines the function itself has been imported, old pickles pointing to the old location will successfully unpickle.

Metadata

Release files for pyjar 0.1.1

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

Source distribution (sdist)

Source distribution for pyjar 0.1.1
File Size Uploaded
pyjar-0.1.1.tar.gz 2.9 kB Details

Built distribution (wheel)

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

Total release size: 6.2 kB

Release files / pyjar-0.1.1.tar.gz

Download URL pyjar-0.1.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
69cbe29abb55324dcdcda456cfbe10196dd9e754bdbcb666cb0f9ff2e0293cde
BLAKE2b-256 checksum
How to use checksums
dd0e68947d41b20e53c2410a56cfdb419876203bb3c49eb7314fea2441291848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / pyjar-0.1.1-py3-none-any.whl

Download URL pyjar-0.1.1-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5c1538252e0f691e45ccdf1b2440731073a010e8207db66a776ba7fbe0d48df
BLAKE2b-256 checksum
How to use checksums
2399b26acad202ee30529921b173a57b93c73bf9366cca4e1063156b08ce45a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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