Skip to main content

Python copy of AddressablesTools

Project description

AddressablesToolsPy

Python copy of AddressablesTools

Only reading is implemented

Usage

pip install addressablestools
from pathlib import Path
from AddressablesTools import parse


def main():
    data = Path("tests/samples/catalog.json").read_text("utf-8")
    catalog = parse(data)
    for key, locs in catalog.Resources.items():
        if not isinstance(key, str):
            continue
        if not key.endswith(".bundle"):
            continue
        res_loc = locs[0]
        print(
            f"Bundle {key}, Crc: {res_loc.Data.Object.Crc}, Hash: {res_loc.Data.Object.Hash}"
        )

    print("-" * 50)

    asset_locs = catalog.Resources[
        "Assets/Paripari/AddressableAssets/VFX Texture Assets/ParticleTextures/sparkle.png"
    ]
    dep_key = asset_locs[0].DependencyKey
    print(f"Dependency of {asset_locs[0].PrimaryKey}: {dep_key}")
    dep_bundle = catalog.Resources[dep_key][0]
    print(f"ProviderId of {dep_bundle.PrimaryKey}: {dep_bundle.ProviderId}")
    print(f"InternalId of {dep_bundle.PrimaryKey}: {dep_bundle.InternalId}")


if __name__ == "__main__":
    main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

addressablestools-0.1.1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

addressablestools-0.1.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file addressablestools-0.1.1.tar.gz.

File metadata

  • Download URL: addressablestools-0.1.1.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.8

File hashes

Hashes for addressablestools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 610d4c8dcf833c276f7cb1aef25961b095e6359d53f6c53d37cf5b8828e97b01
MD5 9f4017c93d736210335918d30c5c0259
BLAKE2b-256 c409b13eb4ea22d436d2231d17a3d8edcb1f868d27ea2c739868463d3ad4623e

See more details on using hashes here.

File details

Details for the file addressablestools-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for addressablestools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6c162641a955515f92a1e6d08e560a5edd10c2cdefcb5f1b61edbc86667bfe3
MD5 f4d4b2c30c61a2345af75746594738bc
BLAKE2b-256 61c23d225a8e9a853dabc86df87d0bca9d8752d6b806df94c27a69a796e7d3dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page