Skip to main content

1 Welcome to django-json-schema-model’s documentation!

Version:

0.1.0

Source:

https://github.com/maykinmedia/django-json-schema-model

Keywords:

<keywords>

PythonVersion:

3.10

Build status Code quality checks black Coverage status Documentation Status

python-versions django-versions pypi-version

A reusable Django app to store JSON schemas.

2 Features

  • JsonSchemaModel consisting of
    • name CharField

    • schema JsonField

    • validate(json) method to validate JSON against the schema.

3 Installation

3.1 Requirements

  • Python 3.10 or above

  • Django 4.2 or newer

  • A database supporting django.db.models.JSONField

3.2 Install

pip install django-json-schema-model

4 Usage

from django_json_schema_model.models import JsonSchema

class ProductType(models.Model):
    schema = models.ForeignKey(JsonSchema, on_delete=models.PROTECT)

class Product(models.Model):
    json = models.JsonField()
    type = models.ForeignKey(ProductType, on_delete=models.CASCADE)

    def clean(self):
        self.type.schema.validate(self.json)

5 Local development

To install and develop the library locally, use:

.. code-block:: bash

pip install -e .[tests,coverage,docs,release]

When running management commands via django-admin, make sure to add the root directory to the python path (or use python -m django <command>):

export PYTHONPATH=. DJANGO_SETTINGS_MODULE=testapp.settings
django-admin check
# or other commands like:
# django-admin makemessages -l nl

Metadata

Release files for django-json-schema-model 0.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-json-schema-model 0.1.0
File Size Uploaded Provenance
django_json_schema_model-0.1.0.tar.gz 8.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-json-schema-model 0.1.0
File Interpreter ABI Platform
django_json_schema_model-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / django_json_schema_model-0.1.0.tar.gz

Download URL django_json_schema_model-0.1.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
46df2680f2600d4f650b5b3ca44252cda90647c0bc315b51eeca911fc53b31af
BLAKE2b-256 checksum
How to use checksums
d17834bc8fca28086aa33d943b1e3b241f046fa2ad51231085bb5fb0494caaf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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 Jan 17, 2025.

Transparency log

Release files / django_json_schema_model-0.1.0-py3-none-any.whl

Download URL django_json_schema_model-0.1.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
410aab367b93186590f051f0f9a1566366ce850763ac8d51eacc41d08ba04fc3
BLAKE2b-256 checksum
How to use checksums
15e38a304ac57ba1c0aba4ae88b0cf27e236e74350c87321d21b211c0e7863c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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 Jan 17, 2025.

Transparency log

Security for django-json-schema-model 0.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_json_schema_model-0.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 Jan 17, 2025.

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

0.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