Skip to main content

Implementation of annotatorjs's Storage/Search API.

Project description

django-annotator

Django implementation of annotatorjs Storage.

Implements most of the methods as per the Core Storage/Search API documentation (root, index, create, read, update,delete and search).

To see a working demo:

poetry install
poetry run python3 ./demo.py

This will run the tests, after which a demo. page will be available at /demo.

Installation

The package can be installed via poetry:

poetry add django-annotator

Following installation it can be added to any Django project by updating the INSTALLED_APPS, along with its dependencies:

INSTALLED_APPS = (
    ...
    "rest_framework",
    "django_filters",
    "annotator",
)

As per the integration documentation for django-filter, DEFAULT_FILTER_BACKENDS must also be added to settings.py:

REST_FRAMEWORK = {
    "DEFAULT_FILTER_BACKENDS": (
        "django_filters.rest_framework.DjangoFilterBackend",
    ),
},

Then run migrate to include the new tables from django-annotator:

poetry run python3 ./manage.py migrate

Annotator

The package relies on Annotator being installed in your project—see the documentation for details of its inclusion.

Settings

As per Annotator's documentation, the root endpoint will return information in the format:

{
    "name": "django-annotator-store",
    "version": "2.1.0"
}

The name returned can be configured by setting ANNOTATOR_NAME in your settings (defaulting to the above).

django-cors-headers

If you have any issues with Cross-origin resource sharing (CORS), consider installing django-cors-headers.

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

django_annotator-2.2.15.tar.gz (90.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_annotator-2.2.15-py3-none-any.whl (91.9 kB view details)

Uploaded Python 3

File details

Details for the file django_annotator-2.2.15.tar.gz.

File metadata

  • Download URL: django_annotator-2.2.15.tar.gz
  • Upload date:
  • Size: 90.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_annotator-2.2.15.tar.gz
Algorithm Hash digest
SHA256 c63c2025547cee85dffb32d9a5a3fdf5379801968ced297b6a94ecae7143e406
MD5 ec993944c815ee9108f778d59bcc220e
BLAKE2b-256 189db83c96bdd2393be4e13886b58cfd4f99bf74b1cb5c4b2b297c4a045feae8

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_annotator-2.2.15.tar.gz:

Publisher: bump-release.yml on PsypherPunk/django-annotator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_annotator-2.2.15-py3-none-any.whl.

File metadata

File hashes

Hashes for django_annotator-2.2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 3fa6705dc9106ac3a50ee8c50738ca713c0e3e9a29f6abe440b67c19ccdc1612
MD5 196a5a99b3b032a83cd070da74ea9b15
BLAKE2b-256 2b6b8b17c5832deb3231c665a228296e2300d3a7fca1e37c9cf413acf8ad79fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_annotator-2.2.15-py3-none-any.whl:

Publisher: bump-release.yml on PsypherPunk/django-annotator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page