Skip to main content

Describe your database index in json files into your apps

Detailed documentation is in the “docs” directory.

Quick start

  1. Add “json_dbindex” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = (
        ...
        'json_dbindex',
    )
  2. Run python manage.py list_jsindex to list all defined indexes.

Create indexes

Create a file in you app directory called dbindex_create.json with following contents

[{“name”: “django_site_composite_idx”,
“table”: “django_site”,
“columns”: [“domain”,”name”],
“predicat”: “WHERE id > 1000”,
“using”: “btree”,
“database”: “default”,
“unique”: yes},
{“name”: “django_site_name_idx”,
“table”: “django_site”,
“columns”: [{“name”: “gist_trgm_ops”}],
“using”: “gist”,
“extension”: “pg_trgm”}]

Trying to create an existing index will not generate an error, only a logging at level notice will be raised.

Drop indexes

Create a file in you app directory called dbindex_drop.json with following contents.

[{“name”: “django_site_composite_idx”},
{“name”: “django_site_domain_idx”}]

Only the name is required. In the above example two indexes will be dropped. Trying to drop a non existing index will not generate an error, only a logging at level notice will be raised.

Metadata

Release files for django-json-dbindex 1.2.3

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-dbindex 1.2.3
File Size Uploaded Provenance
django-json-dbindex-1.2.3.tar.gz 10.4 kB Without provenance Details

Release files / django-json-dbindex-1.2.3.tar.gz

Download URL django-json-dbindex-1.2.3.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fcf0a4f8dde4c552bea98a73817d5f37720a94cc7eaca9d586104bef7cb70380
BLAKE2b-256 checksum
How to use checksums
8449faa22081bbb0154e8d2c470bb13f755b29fe85a660dd2d17cd22ece12c7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-json-dbindex 1.2.3

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.

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