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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nuxt_payload-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7863eb6d3529ff21e61a4f3774fefea1df0aae43ade324cdcd73b329b9340183
MD5 36226a5fb3bafa065120f5baad26a58c
BLAKE2b-256 83fd0533e2c2e33cc444fd8124bfee40abdb1aefb10e83e73b7450ffb0828cb7

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