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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nuxt_payload-0.1.4-py3-none-any.whl.
File metadata
- Download URL: nuxt_payload-0.1.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d83be284105db4cbfd1bde5670b62b7ae8cbb91d0a6bb338d7a4057fc60be73d
|
|
| MD5 |
fcf6a9547071eab97657b61bef5658d0
|
|
| BLAKE2b-256 |
8a72ccd241164e631ac067c75116d9cec0049276830dcede1c1f5adb13a5c2fd
|