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

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

Built distribution (wheel)

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

Total release size: 4.9 MB

Release files / samplesift-0.1.1.tar.gz

Download URL samplesift-0.1.1.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
6fc4127f99a48cf786d23f5b1995fd9f66d1d0948f1dbb0a16e94ad8061acea2
BLAKE2b-256 checksum
How to use checksums
5f1b62cf1ec8d0f810162fe430ff8093df9558dafb7647b71b276ca3bef6473d
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.1-py3-none-any.whl

Download URL samplesift-0.1.1-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f30d77d0c2c0b35c25a182208d07b7ff484c723e2600ae3a090f7f91899bdde9
BLAKE2b-256 checksum
How to use checksums
bc026ff8c03220c39645320bdd8c6177c4dd2c9fce198ef69da3ca274224e0c8
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.1

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