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.3.tar.gz (14.2 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.3-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for addressablestools-0.1.3.tar.gz
Algorithm Hash digest
SHA256 78d1f9c1a34de22b04e55a0576c41b9388b3d7e8f6d4d9909e4aea54374a5b11
MD5 f54cda9568d2cc58b7238e53a803fe75
BLAKE2b-256 069373f83107a44f427ca50f8953a8f4d213eff5aa3a2bc0f926e24c784674e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for addressablestools-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e04adb0d7f4e3b4e4030f37e149e3fb6bfb9979f596df0e2bbc32b8c861c0827
MD5 5f71d3c7a83d328664f2c48bba3b9075
BLAKE2b-256 c10270edfad07904440ba5c04ee24a550265648222720f0c45772c8a459d0571

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