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

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

Built distributions (wheels)

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

Total release size: 5.9 MB

Release files / katsuba-0.7.3.tar.gz

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

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

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

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

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

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

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

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

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

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

Download URL katsuba-0.7.3-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
0fcdb0565ac4d203ddce0b6389512a788c5199a16fc95347f7af02deff8eb30f
BLAKE2b-256 checksum
How to use checksums
105832d2a6980e9c50824267f8905075ce51230d33707e455f6d8c278ce014ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

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

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

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

Download URL katsuba-0.7.3-cp312-abi3-macosx_10_12_x86_64.whl
Size 853.7 kB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8d9cc8be915ded346a7fefcc65c78d957247b57220a5c9c9f4680aa428d07f3b
BLAKE2b-256 checksum
How to use checksums
64961e514581d40499e460ec780e565b50e54b8af55d74b644f48202131a52f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Security for katsuba 0.7.3

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