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.6.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.6.0
File Size Uploaded Provenance Actions
katsuba-0.6.0.tar.gz 70.6 kB Without provenance Details for katsuba-0.6.0.tar.gz

Built distributions (wheels)

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

Total release size: 5.4 MB

Release files / katsuba-0.6.0.tar.gz

Download URL katsuba-0.6.0.tar.gz
Size 70.6 kB
Tags Source
SHA-256 checksum
How to use checksums
128c5a8b1cdc5323c2ebeb5f9dd85fa1f7245c7fea74d9e7a408aa774eb8c5d5
BLAKE2b-256 checksum
How to use checksums
a74fcf57eb9a2709ea7780637cac560e2b0a4277a160ea3301fcfac0a63d4aa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

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

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

Download URL katsuba-0.6.0-cp312-abi3-win32.whl
Size 648.1 kB
Tags CPython 3.12 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
3d9729a2ddd1e50f37e8129c625737ff7937f5ab3f50c504f50aef5b3d5d1e93
BLAKE2b-256 checksum
How to use checksums
96bb707e17988fb3a9a520fa13f7c20f1fbc25bf3db4dd41b9cce1fab9641cc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL katsuba-0.6.0-cp312-abi3-manylinux_2_28_x86_64.whl
Size 842.5 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
cdac04a65dfac7ce89fdc36f4e8c52403c4a4759953a94eadff45a41492af5da
BLAKE2b-256 checksum
How to use checksums
3ebb930cf3de22a2c08d49ab75cd17ce8eec63521b5291f4aad78023d4223abf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL katsuba-0.6.0-cp312-abi3-manylinux_2_28_i686.whl
Size 839.9 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-32 abi3
SHA-256 checksum
How to use checksums
ec67a206b1f9281e77d5b8eea14b7498cd512c35816d854152d514f3a2835e9d
BLAKE2b-256 checksum
How to use checksums
14133d2dd633b56328cd3420e0a30b3d2dbfbf67b5e488023fd90ba96ffbcf93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL katsuba-0.6.0-cp312-abi3-manylinux_2_28_aarch64.whl
Size 775.3 kB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
1c31f44565f487665dd489b8876e11a1272d91886bb36b40d9486fd7c794f13f
BLAKE2b-256 checksum
How to use checksums
d1b691d0f6d9254605feeef5e572b727598051c31266c259c7bba9b027e52b97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL katsuba-0.6.0-cp312-abi3-macosx_11_0_arm64.whl
Size 697.0 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2980ae744e55ba980982585a3bcbc18cb2201dec9a46f2e62e498192d497ad61
BLAKE2b-256 checksum
How to use checksums
5339badd376c9dfe8427192fbb8ad6a1d8d9303fdfa0b7687470e4652266b5b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL katsuba-0.6.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 784.5 kB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
12c3d0c492266998a462b3e4c58bf047f57731d7aea2bc4bf48a228829740ce2
BLAKE2b-256 checksum
How to use checksums
5d44e0f07fe6f144b6b23f2b3da96ae2d91b0d740105d10116443bc8944f7d7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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