Skip to main content

Test PyPI License: MIT

django-structured-metaobjects

User-defined, typed JSON objects for Django — built on top of django-structured-json-field.

Editors define meta types in the admin (a list of typed field definitions). Each MetaInstance then picks one of those types and the admin form / REST API automatically adapts to the schema declared by the chosen type.

Features

  • Field kinds: string, html, number, boolean, date, datetime, select, ref (single FK), queryset (list of FKs), group (nested object), list (repeating group), with optional translated=True per-field.
  • Runtime Pydantic compiler with per-MetaType caching, invalidated on save.
  • Admin form rebuilds the data widget for the selected meta type.
  • DRF MetaTypeViewSet / MetaInstanceViewSet with schema/ action.
  • Typed access on instance.obj.<field> returning the parsed Pydantic model — FK / queryset fields lazily resolve to real Django objects with structured-json-field's caching.

Install

pip install django-structured-metaobjects

Add to INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    "structured",
    "structured_metaobjects",
]

Wire the REST endpoints into your router:

from rest_framework import routers
from structured_metaobjects.views import MetaTypeViewSet, MetaInstanceViewSet

router = routers.DefaultRouter()
router.register(r"meta-types", MetaTypeViewSet, "meta-types")
router.register(r"meta-instances", MetaInstanceViewSet, "meta-instances")

Field kinds

kind Python type built by the compiler Notes
string str Supports multiline, min_length, max_length, placeholder.
html str Rich-text. Supports placeholder.
number float / int Set integer=True for int. Supports minimum, maximum.
boolean bool
date datetime.date
datetime datetime.datetime
select str Requires choices (list of {value, label}).
ref <TargetModel> Requires target_model="app.Model".
queryset List[<TargetModel>] Requires target_model="app.Model".
group nested Pydantic model from children Requires children.
list List[<group model>] from children Requires children.

Setting translated=True wraps the field in Dict[str, T] so the value is a per-language map.

Typed access

instance = MetaInstance.objects.get(pk=1)
obj = instance.obj                # cached Pydantic instance
obj.title                         # typed string
obj.related_page                  # real Django model instance (lazy/cached)
obj.gallery                       # list of real Django model instances

Metadata

Release files for django-structured-metaobjects 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-structured-metaobjects 1.1.0
File Size Uploaded Provenance
django_structured_metaobjects-1.1.0.tar.gz 20.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-structured-metaobjects 1.1.0
File Interpreter ABI Platform
django_structured_metaobjects-1.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 49.8 kB

Release files / django_structured_metaobjects-1.1.0.tar.gz

Download URL django_structured_metaobjects-1.1.0.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bad5a51190133c0be9e2dcb231be028ad3c6831008b5ec81c76088b97cff6583
BLAKE2b-256 checksum
How to use checksums
032a664a454148e93d3674672a001c35202a4cdab72ea37374eeadf2048fb8ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release files / django_structured_metaobjects-1.1.0-py2.py3-none-any.whl

Download URL django_structured_metaobjects-1.1.0-py2.py3-none-any.whl
Size 29.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9bf8f83045a036132ddcfd6ad52112c9cc1e1059f0218c200478a452ef174232
BLAKE2b-256 checksum
How to use checksums
dd780bb1703a1020af47f15185e985adf08897dfe70448679b5b1ccd28d38fc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Security for django-structured-metaobjects 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_structured_metaobjects-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page