Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

django-dict-field

PyPI version Python Version PyPI license test typing & lint

⚠️ This project under active developing.

Django extension for storing dict data in relation database field with fast performance and flex schema.

📍 Purpose

Sometimes we need to store some key value data in storages. Often it also need to be efficient for work with big data and have some validation and another features.

django-dict-field is a tool build around amazing msgspec serialization and validation library for solving this problems like a charm ✨

DictField vs JSONField Benchmark

Operations on 100 000 size dict on PostgreSQL DB. Script here.

DictField vs JSONField Benchmark

🚀 Quick start

  1. Install django-dict-field.
pip install django-dict-field
  1. Add DictField to your model.
from django.db.models import Model, CharField, DateTimeField
from django_dict_field import DictField

class Car(Model):
    model = CharField()
    creation_data = DateTimeField()
    configuration = DictField()  # for storing a lot of configuration settings
  1. Work with it!
# create
car = Car.objects.create(
    model="Toyota Camry",
    creation_data=datetime(2021, 3, 15),
    configuration={
        "capacity": 2.5,
        "drive": "FWD",
        "consumption": 6.8,
    }
)

# read
assert car.configuration["drive"] == "FWD"

# update
car.configuration["capacity"] = 2.8

# delete
del car.configuration["doors"]

🤗 Author

Made with love by @skv0zsneg

Metadata

Release files for django-dict-field 0.1.0a1

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-dict-field 0.1.0a1
File Size Uploaded Provenance Actions
django_dict_field-0.1.0a1.tar.gz 3.2 kB Without provenance Details for django_dict_field-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-dict-field 0.1.0a1
File Interpreter ABI Platform Actions
django_dict_field-0.1.0a1-py3-none-any.whl Python 3 none any Details for django_dict_field-0.1.0a1-py3-none-any.whl

Total release size: 7.2 kB

Release files / django_dict_field-0.1.0a1.tar.gz

Download URL django_dict_field-0.1.0a1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f5561dec7c35c68ece9e2bed5d2a3de7d0d5fb699c3541050533334ef6d27bb5
BLAKE2b-256 checksum
How to use checksums
b23b80c81c385e1d1ac49dd1311a3bd51db4daf4c6ec39027d7431004eb8f64e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.0 CPython/3.12.12 Linux/6.11.0-1018-azure

Release files / django_dict_field-0.1.0a1-py3-none-any.whl

Download URL django_dict_field-0.1.0a1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abc943138b45c63f677ad66d78293376850b7a82d5193aeef9a2a28dd2c1dc73
BLAKE2b-256 checksum
How to use checksums
d91601dea662fe8513c5fef08d79389c57601a061b9a8dc8a7c3b04351873474
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.0 CPython/3.12.12 Linux/6.11.0-1018-azure

Security for django-dict-field 0.1.0a1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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