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.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 katsuba 0.7.0
File Size Uploaded Provenance Actions
katsuba-0.7.0.tar.gz 82.6 kB Without provenance Details for katsuba-0.7.0.tar.gz

Built distributions (wheels)

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

Total release size: 5.9 MB

Release files / katsuba-0.7.0.tar.gz

Download URL katsuba-0.7.0.tar.gz
Size 82.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0dc3199534cebe8e7b1f74b887282d8f0a84f3d0acb109cf078fcd7eda31298f
BLAKE2b-256 checksum
How to use checksums
d36522a7fee8c18f622eaf66ec2fce4dc2336ccde625738e11e2d1382c9cdbe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

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

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

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

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

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

Download URL katsuba-0.7.0-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
50e1a464b574cb988e6eb158c7d082d51845ddde8cbc6a839a1da6ad310faf3d
BLAKE2b-256 checksum
How to use checksums
41d412aca60956654e7b99e54d986463b7880b91d62406d73c9cef995ec38d1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

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

Download URL katsuba-0.7.0-cp312-abi3-manylinux_2_28_i686.whl
Size 915.2 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-32 abi3
SHA-256 checksum
How to use checksums
9a63cd6c3e6bfcf3ab95c4d4088e9e4eb3723f64b691aad11afd441709eee816
BLAKE2b-256 checksum
How to use checksums
90cb475949007c8ada67a14ee92ba4c31e63887b61fc7579bbac7f471c284254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

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

Download URL katsuba-0.7.0-cp312-abi3-manylinux_2_28_aarch64.whl
Size 842.6 kB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
632267bc31d19cf61d546013722462b3f7c7838fcd462d78228a7a69b4aedfcd
BLAKE2b-256 checksum
How to use checksums
8350d3f05d3303b47c5e94e30f5ac349d7441fd3421a8e8826a2ab45f2ba0f42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

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

Download URL katsuba-0.7.0-cp312-abi3-macosx_11_0_arm64.whl
Size 757.7 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5cc0b719f481a22c7ee4fd228f45d8af3d18cc8051423682f9e9d58cc1ecabb2
BLAKE2b-256 checksum
How to use checksums
d7189a949b1305e38ebfbc6b80cc239b20e2fad2af5f60332b91f9fe627df5f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

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

Download URL katsuba-0.7.0-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
1212a1356db705af18b3078f15a2fdc650c881798f0d527c862f3fd7e5206f5f
BLAKE2b-256 checksum
How to use checksums
4d0004c78b7c72311fb533d8fc6f0823ded1e3fc07d80bab097fcbaff1d3a2f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Security for katsuba 0.7.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.

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