Skip to main content

A lightweight Python library to parse and lazily resolve Nuxt 3 _payload.json files.

Project description

nuxt-payload

A lightweight Python library to parse and lazily resolve Nuxt 3 _payload.json files.

Installation

pip install nuxt-payload

Usage

from nuxt_payload import load_payload

# Load a Nuxt 3 _payload.json file
data = load_payload("_payload.json")

# Access elements lazily
first_item = data[0]

# If the item contains LazyRef, force resolution
print(first_item["id"].resolve())

# Iterate over a lazy dictionary
for key, value in first_item.items():
    print(key, value.resolve() if hasattr(value, "resolve") else value)

License

This project is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0).

See LICENSE for details.

Authors

See AUTHORS.md for the list of contributors.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

nuxt_payload-0.1.5-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file nuxt_payload-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nuxt_payload-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nuxt_payload-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a48a69e52216f26256845b211e141428e2f98db2847f03e8262dc82458e575f6
MD5 e63a4637c52288fa8dc10a25d7e1fe51
BLAKE2b-256 241f4e70103793b2e46ef8868e2a863eb138e008bcce224ff47616c4160ab112

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