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.0a1.tar.gz (32.9 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.0a1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file render_engine_json-2025.3.0a1.tar.gz.

File metadata

  • Download URL: render_engine_json-2025.3.0a1.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for render_engine_json-2025.3.0a1.tar.gz
Algorithm Hash digest
SHA256 1f29b4003f8f02221bfc5baa286e368f8d07d2281987a2546f60596e5463fc2d
MD5 d020026d20c6026f92de950b4d9f5f10
BLAKE2b-256 e63fbf88469f0fb160ebd462291194b5d35e3dfd75fd8058aeff3ab2c7423155

See more details on using hashes here.

File details

Details for the file render_engine_json-2025.3.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for render_engine_json-2025.3.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad2148d1314cf450a1762d24854164720042294545666ea64f174d5b731dddbe
MD5 4573973c53f634238bda1d5742e62eb7
BLAKE2b-256 618c428b159c8ec2c8978f9a8717a7002064f56fa703ab9218f9ff89328b4782

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