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.2

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

Built distributions (wheels)

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

Total release size: 5.9 MB

Release files / katsuba-0.7.2.tar.gz

Download URL katsuba-0.7.2.tar.gz
Size 82.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3841996ef4e2900360fd2e0474164fb30dac73e7d49e1dd99bc20656c09757d6
BLAKE2b-256 checksum
How to use checksums
deb4d898efdd9fae22228feaa87c180f15308df61585384e1526974a6e442447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

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

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

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

Download URL katsuba-0.7.2-cp312-abi3-win32.whl
Size 716.3 kB
Tags CPython 3.12 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
24c1d96d22dadb333ba77ad6f531e4e1bdd42e24943dc659800fd973b1a413f4
BLAKE2b-256 checksum
How to use checksums
587759a647b42da99eb1b9384817e2b7548f5da6038e6713854d57f9a85f2915
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

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

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

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

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

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

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

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

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

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

Download URL katsuba-0.7.2-cp312-abi3-macosx_10_12_x86_64.whl
Size 853.3 kB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
22fb64b3856efd8f43bb0b14004601cac68cfee54cecad0e33b269d116786191
BLAKE2b-256 checksum
How to use checksums
04b14d89859f69ae3120ebaf94118910404d41bc095ed505c0d3e84c50b9205e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Security for katsuba 0.7.2

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