Skip to main content

SampleSift

SampleSift provides spatial search for geolocated records. Django collections store typed fields in derived PostgreSQL tables. The Lit frontend displays filters, result tables, and clustered MapLibre tiles. An optional Jupyter widget embeds the frontend in notebooks.

Installation

Use Python 3.12 or newer. Install the integration for your application:

pip install 'samplesift[django]'
# Or install the notebook wrapper:
pip install 'samplesift[jupyter]'

pip install samplesift installs the base package without optional integrations. Spatial Django collections require PostGIS. The Jupyter wrapper currently requires a running frontend server and collection API.

Try the OBIS example

The repository includes a Django backend with 9,900 OBIS occurrence records. The frontend uses that backend for filters, results, and map clusters.

Install Node.js 22.12 or newer, npm, Task, and Docker Compose 2.24.4 or newer. From the repository root:

task frontend:setup
task dev

Open the Vite URL from the terminal. API documentation is at http://127.0.0.1:8002/samplesift/docs. Ctrl-C stops the development servers. The database volume remains available.

See development tasks for individual servers, ports, and checks. See the OBIS example for dataset details and standalone Docker setup.

Use SampleSift in Django

Declare collections in an installed app's samplesift.py:

from samplesift.django import Point, SampleSiftCollection, registry

from .models import Sample


@registry.register
class SampleCollection(SampleSiftCollection):
    fields = ["lat", "lon", "temperature", "species_name"]
    geometry = Point(longitude="lon", latitude="lat")

    class Meta:
        model = Sample
        api_name = "samples"

    class Query:
        default_ordering = ["-temperature"]

This example assumes those fields exist on your Sample model. Django ORM saves and deletes synchronise collection rows after the source transaction commits. Bulk updates, raw SQL, and related-object changes do not synchronise automatically.

Follow Django collections for app registration, database configuration, schema setup, and API routes. Use typed properties and resolvers for computed or related fields. Use JSON metadata properties for values inside a JSONB field. The spatial query API documents CQL2 filters, pagination, and vector tiles over HTTP QUERY.

Use SampleSift in Jupyter

From a source checkout, install the notebook environment:

task jupyter:setup

Keep task dev running in one terminal. Open the example notebook in another terminal:

task jupyter:lab

The example notebook demonstrates filters, polygon searches, linked sliders, and DataFrame exports. See Jupyter setup and limits for widget configuration and Python bindings.

Documentation

Topic Guide
Django declarations, resolvers, API, and settings Django collections
Cache configuration, invalidation, and prewarming Tile caching
Frontend setup and embedding Frontend guide
Frontend state, events, and collection API Component API
Frontend and backend development tasks Development tasks
Themes and styling Frontend styling
Notebook setup and Python bindings Jupyter wrapper
Python dependencies, Git hooks, and lint Development checks
Component package validation and publishing Frontend release guide
Longer-term design Spatial collection architecture

Development

Install Python development dependencies and the Git hook:

uv sync --locked
task hooks:install

Use task jupyter:setup instead of uv sync for notebook development. Run task lint for the pinned pre-commit checks. Run task frontend:check for frontend lint, types, and unit tests. See development checks for hook setup details. See Django verification for PostGIS tests.

The Python package lives in src/samplesift/. The npm workspace lives in frontend/. Python and frontend packages have independent release cycles.

Metadata

Release files for samplesift 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 samplesift 0.1.0
File Size Uploaded Provenance Actions
samplesift-0.1.0.tar.gz 2.4 MB With provenance Details for samplesift-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for samplesift 0.1.0
File Interpreter ABI Platform Actions
samplesift-0.1.0-py3-none-any.whl Python 3 none any Details for samplesift-0.1.0-py3-none-any.whl

Total release size: 4.9 MB

Release files / samplesift-0.1.0.tar.gz

Download URL samplesift-0.1.0.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
6ccf1bbb5e598170e7378c62cc82082f1e9c3c2c66d1155f9a57ce739de8d3a8
BLAKE2b-256 checksum
How to use checksums
2e0a0104b049c34a39ca0c4baeee35694cd9a3b6cf25a61c98d3c89d2f63676c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

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

Download URL samplesift-0.1.0-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b5bdcd9a97a3ea92f879fbb4082ac5a20bdcf6cf20199e5217a0c564027a7ca9
BLAKE2b-256 checksum
How to use checksums
f8157cf990ea6f0b040f5fcea1a317ac2cb5abf4585bd8bb1639667917c50058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 12, 2026.

Transparency log

Security for samplesift 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for samplesift-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 Nov 12, 2026.

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