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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nuxt_payload-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e457484d0b497362e2417a92e37d469fd149ee36ff185015b255809e350c0b1a
MD5 2aa18ba969fd1bc2919970f6e8fbdb51
BLAKE2b-256 945bcd98e1739c8531cc37a03501b27e8f62d5def2bcc15cbfab281a56da6470

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