Skip to main content

JSON Parser and Collection for Render Engine

Project description

Render Engine JSON

JSON Parser and Collection Module for Render Engine

Installation

pip install render_engine_json

Usage

The render-engine-json extends render-engine to allow you to build pages and collections using JSON.

The JSONPageParser class can be used to parse a single JSON page and the JSONCollection class can be used to parse a single collection of JSON pages.

NOTE The JSONCollection class is designed to work with a single JSON file that contains an array of JSON Objects or a JSON Hash where the keys are the slugs. If you want to work with multiple JSON files you can use a regular Collection and the JSONPageParser as the parser.

Single JSON Page Entry

To create a json entry you will need the JSONPageParser class as the Parser for your Page Object.

You can pass the page a json string or a json file path.

As a string

from render_engine import Page, Site
from render_engine_json import JSONPageParser

site = Site()

json_page = """
{
    "title": "My JSON Page",
    "content": "This is my json page"
}
"""

@site.page
class JSONStringPage(Page):
    parser = JSONPageParser
    content = json_page

As a file

@site.page
class JSONFilePage(Page):
    parser = JSONPageParser
    content_path = "path/to/json/file.json"


Project details


Download files

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

Source Distribution

render_engine_json-2025.3.1.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

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

render_engine_json-2025.3.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file render_engine_json-2025.3.1.tar.gz.

File metadata

  • Download URL: render_engine_json-2025.3.1.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for render_engine_json-2025.3.1.tar.gz
Algorithm Hash digest
SHA256 cb9505537d42793d764722cc693d7cb89a7458733b73983395c32e6b60962eb4
MD5 49c57611d7d30c5d72f8e5780d74a2f7
BLAKE2b-256 a00b7c0e5fbfe0c5a1b1cb849bbdc74db110979d3c5846c895f0cae830f256b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for render_engine_json-2025.3.1.tar.gz:

Publisher: publish.yml on kjaymiller/render-engine-json

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file render_engine_json-2025.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for render_engine_json-2025.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5935edb3d291fbbbd9fe2c12bae54c0cba8328f1b770c68914f9dbea11544b0
MD5 5d2376f754e3c4e076852aed3ff28149
BLAKE2b-256 0edb2d66e35f5591169c946fe9543274e9dbd806425c3dd47def28ff107aa9c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for render_engine_json-2025.3.1-py3-none-any.whl:

Publisher: publish.yml on kjaymiller/render-engine-json

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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