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.6-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nuxt_payload-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4b00552525a3882eb1cc7694f38cf70760bcde2ab3125bd07f2bcefb5402fd0c
MD5 d4a7dcf27cd6ce9ceb37fd0f92853dc1
BLAKE2b-256 eb050a24f9613e404113ca55a30e563d644706f035a70aa37c448715421857cf

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