An easy to use postgres hstore field that is based on django-hstore-widget
Project description
django-hstore-field
An easy to use postgres hstore field that is based on django-hstore-widget
Requirements
- Python 3.10 and Up ( well technically any python version from 3.6 should work )
- Django 3.2 and Up
- Modern browsers ( Chrome 112+, Firefox 117+, Safari 16.5+ or any browsers supporting css nesting )
Installation
pip install django-hstore-field
Usage
Option 1:
Include django-hstore-widget in your settings.py's INSTALLED_APPS:
# settings.py
INSTALLED_APPS = [
...,
'django_hstore_widget',
...
]
Option 2:
Include django-hstore-widget's migration to any of your model's migration:
# Generated migration file
from django.db import migrations, models
import django.contrib.postgres.fields
class Migration(migrations.Migration):
dependencies = [
("django_hstore_widget", "__latest__"),
]
operations = [
...
]
and then use it:
# yourapp/models.py
from django.db import models
from django_hstore_field import HStoreField
class ExampleModel(models.Model):
data = HStoreField()
Indexing
You should use GIN indexing for 99% of the use case, create an index like this:
# models.py
from django.db import models
from django.contrib.postgres.indexes import GinIndex
from django_hstore_field import HStoreField
class ExampleModel(models.Model):
data = HStoreField()
class Meta:
indexes = [
GinIndex(fields=["data"], name="example_data_gin"),
]
Example:
Check the cat directory
[!NOTE]
If you want a lower level implementation, please check django-hstore-widget.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_hstore_field-0.0.5.tar.gz.
File metadata
- Download URL: django_hstore_field-0.0.5.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8486c1cfabecd0c52b4f9a2b1a406e714e17410e2757401bc47bef9544cf04e
|
|
| MD5 |
ae73fc1abdade0c0dfcff78a33c58b73
|
|
| BLAKE2b-256 |
912fe787b2d62332c94957003828f665496afc7550e95ec85a1609753be72a80
|
Provenance
The following attestation bundles were made for django_hstore_field-0.0.5.tar.gz:
Publisher:
CI.yaml on baseplate-admin/django-hstore-field
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_hstore_field-0.0.5.tar.gz -
Subject digest:
b8486c1cfabecd0c52b4f9a2b1a406e714e17410e2757401bc47bef9544cf04e - Sigstore transparency entry: 1017956486
- Sigstore integration time:
-
Permalink:
baseplate-admin/django-hstore-field@4377635292776a0bc9e7e7f3d75aaeda24e1340d -
Branch / Tag:
refs/tags/0.0.5 - Owner: https://github.com/baseplate-admin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yaml@4377635292776a0bc9e7e7f3d75aaeda24e1340d -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_hstore_field-0.0.5-py3-none-any.whl.
File metadata
- Download URL: django_hstore_field-0.0.5-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d093c25dee8037f6a06816180072e003335ba27849337ff3be18df9200982532
|
|
| MD5 |
15990bb298725f3e3219ca65c0175e8f
|
|
| BLAKE2b-256 |
4b374fba08c39ea903875e10ee3b1abbaaa4e1b7f29cd5d3c240b8b7041fb315
|
Provenance
The following attestation bundles were made for django_hstore_field-0.0.5-py3-none-any.whl:
Publisher:
CI.yaml on baseplate-admin/django-hstore-field
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_hstore_field-0.0.5-py3-none-any.whl -
Subject digest:
d093c25dee8037f6a06816180072e003335ba27849337ff3be18df9200982532 - Sigstore transparency entry: 1017956514
- Sigstore integration time:
-
Permalink:
baseplate-admin/django-hstore-field@4377635292776a0bc9e7e7f3d75aaeda24e1340d -
Branch / Tag:
refs/tags/0.0.5 - Owner: https://github.com/baseplate-admin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yaml@4377635292776a0bc9e7e7f3d75aaeda24e1340d -
Trigger Event:
push
-
Statement type: