Skip to main content

Katsuba

Python bindings to the Katsuba libraries.

Error handling

Most errors are represented either as native Python exceptions where it makes sense, or as a katsuba.KatsubaError for custom errors from the Rust side.

Bindings

katsuba.op

Bindings to core functionality from the katsuba-object-property crate.

from katsuba.op import *
from katsuba.utils import string_id

# Open a type list from file system
type_list = TypeList.open("types.json")

# Configure serializer options
opts = SerializerOptions()
opts.flags |= STATEFUL_FLAGS
opts.shallow = False

# Construct the serializer
ser = Serializer(opts, type_list)

# Deserialize a file
with open("TemplateManifest.xml", "rb") as f:
    manifest = f.read()
    assert manifest[:4] == b"BINd"

manifest = ser.deserialize(manifest[4:])

# Make sure we deserialized the right object:
assert manifest.type_hash == string_id("class TemplateManifest")

# Iterate the templates in the resulting object:
for location in manifest["m_serializedTemplates"]:
    print(f"Template {location['m_id']} at {location['m_filename']}")

katsuba.wad

Bindings to core functionality from the katsuba-wad crate.

from katsuba.op import Serializer
from katsuba.wad import Archive

# See `katsuba.op` above.
s = Serializer(...)

# Open an archive memory-mapped:
a = Archive.mmap("/path/to/Root.wad")

print(f"{len(a)} files in archive!")

# Deserialize a file out of the given archive:
if "TemplateManifest.xml" in a:
    a.deserialize("TemplateManifest.xml", s)

# Iterate over files in the archive and get their contents:
for path in a:
    data = a[path]

# With a glob pattern for filtering files:
for path in a.iter_glob("ObjectData/**/*.xml"):
    data = a[path]

katsuba.utils

Bindings to useful components from the katsuba-utils crate.

For the time being, this features the hash functions djb2 and string_id.

Metadata

Release files for katsuba 0.7.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 katsuba 0.7.1
File Size Uploaded Provenance Actions
katsuba-0.7.1.tar.gz 82.7 kB Without provenance Details for katsuba-0.7.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for katsuba 0.7.1
File Actions
katsuba-0.7.1-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for katsuba-0.7.1-cp312-abi3-win_amd64.whl
katsuba-0.7.1-cp312-abi3-win32.whl CPython 3.12 abi3 Windows x86-32 Details for katsuba-0.7.1-cp312-abi3-win32.whl
katsuba-0.7.1-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for katsuba-0.7.1-cp312-abi3-manylinux_2_28_x86_64.whl
katsuba-0.7.1-cp312-abi3-manylinux_2_28_i686.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-32 Details for katsuba-0.7.1-cp312-abi3-manylinux_2_28_i686.whl
katsuba-0.7.1-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details for katsuba-0.7.1-cp312-abi3-manylinux_2_28_aarch64.whl
katsuba-0.7.1-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for katsuba-0.7.1-cp312-abi3-macosx_11_0_arm64.whl
katsuba-0.7.1-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for katsuba-0.7.1-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 5.9 MB

Release files / katsuba-0.7.1.tar.gz

Download URL katsuba-0.7.1.tar.gz
Size 82.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ab3ec9c633321e1697b71094e5253a26c0105ade9c8b9a8b72f19c7f1250b7be
BLAKE2b-256 checksum
How to use checksums
67cb6a2556de3c13e02c5e30f61632fa7d5d22dcf5b928682f9826b6df35fc4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / katsuba-0.7.1-cp312-abi3-win_amd64.whl

Download URL katsuba-0.7.1-cp312-abi3-win_amd64.whl
Size 818.7 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a4cde3eced239591cb1c654769823f5d52dc960b621e230c22c3e3dbfc9b56e4
BLAKE2b-256 checksum
How to use checksums
b6054fd9ec33f663864daee3f347e182d191441757f6c81a6c1b660a34ff8e98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / katsuba-0.7.1-cp312-abi3-win32.whl

Download URL katsuba-0.7.1-cp312-abi3-win32.whl
Size 717.2 kB
Tags CPython 3.12 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
bb214020c3d4047506a516e6417aa1b52d107e9c4c446ffe621470c009d8917b
BLAKE2b-256 checksum
How to use checksums
3aa63a992b7be55b84d2e5e03ee2b249595236a1a6ddf975dd72c7db35baf6da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / katsuba-0.7.1-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL katsuba-0.7.1-cp312-abi3-manylinux_2_28_x86_64.whl
Size 915.7 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
5f538a64b2e9ca6efe4e699929293e90812fa043b8a0aa1f88ac7cc9dda0a5e2
BLAKE2b-256 checksum
How to use checksums
c4ad75c306b143c056eaf3f315b80bf854befc7408a273b8373557f01f679fb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / katsuba-0.7.1-cp312-abi3-manylinux_2_28_i686.whl

Download URL katsuba-0.7.1-cp312-abi3-manylinux_2_28_i686.whl
Size 916.5 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-32 abi3
SHA-256 checksum
How to use checksums
5b14f6c4cf9decb232a9ecb90a36f6a1272c7018c635d3cfcf7dc22984a25589
BLAKE2b-256 checksum
How to use checksums
04cfc63bbc9e756609f97eb82e2c62583b8755b10e13083c319edb9167071ec8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / katsuba-0.7.1-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL katsuba-0.7.1-cp312-abi3-manylinux_2_28_aarch64.whl
Size 841.3 kB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
572b93b55cdc9e0feeb48592c0b03474dc4cb1af836e594cecc1b49a5e603c5a
BLAKE2b-256 checksum
How to use checksums
180c955b7b22fbbe40b59b4a6417fe3df6502cb8d7a031745a95b880a99655eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / katsuba-0.7.1-cp312-abi3-macosx_11_0_arm64.whl

Download URL katsuba-0.7.1-cp312-abi3-macosx_11_0_arm64.whl
Size 758.2 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
640fc35273cab1e6da390c65c97cdd0ccc360394ac520a2daa7ba3e256c0fd4d
BLAKE2b-256 checksum
How to use checksums
456ea0300ce7a8c3f0660e9b306581f102e61d9faf2c3713853f0a09b2b4eaf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / katsuba-0.7.1-cp312-abi3-macosx_10_12_x86_64.whl

Download URL katsuba-0.7.1-cp312-abi3-macosx_10_12_x86_64.whl
Size 853.4 kB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
453425d6519d6238c3027f01d3fbe24b980e6c84247e5ab3af63f8d010604f7e
BLAKE2b-256 checksum
How to use checksums
9186f17d769846c658920541e3ad594b6896206c90fc7f59f027fd12b80628d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Security for katsuba 0.7.1

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.

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