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.1a2.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.1a2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: render_engine_json-2025.3.1a2.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.1a2.tar.gz
Algorithm Hash digest
SHA256 ef13fb3d5a3cd7e9748e29398607d757afec66942d1dc75e5b81a232e4519535
MD5 9764e1d1d26bf176a71bc72f26a335f4
BLAKE2b-256 4ffa9602ee4e7ac01380c075085e532a697cdd3c97a832d254f258cf392e121a

See more details on using hashes here.

Provenance

The following attestation bundles were made for render_engine_json-2025.3.1a2.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.1a2-py3-none-any.whl.

File metadata

File hashes

Hashes for render_engine_json-2025.3.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 e7170baa8d4d05aa3073afd402d0c27d061067e1e6c53e4a43499ec2af81cfc7
MD5 0cc7030181d62f45df23bc5e9d9947f6
BLAKE2b-256 de98b1977b530f620bfe79afec4afc0fc42d9bd6124e1c88a7790ac2ba14f71c

See more details on using hashes here.

Provenance

The following attestation bundles were made for render_engine_json-2025.3.1a2-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