Geospatial + tabular dataset upload, parsing (shapely) and slugging for simple_module apps
Project description
simple_module_datasets
Geospatial + tabular dataset upload module for simple_module apps. Users upload CSV/GeoJSON/Shapefile; the module parses, slugs a canonical name, and stores geometry using shapely.
Install
pip install simple_module_datasets
Also needs simple_module_file_storage + simple_module_background_tasks (declared as deps).
What it provides
POST /api/datasets— multipart upload; the file is staged viasimple_module_file_storage, then a Celery job parses it in the background.DatasetSQLModel record withname,slug(viapython-slugify),geometry_type,row_count,bbox.- Shapely-backed parsers for GeoJSON, CSV with lat/lon columns, and zipped Shapefiles.
- Admin UI for browsing + deleting datasets.
Usage
Upload from a form:
curl -X POST -F "file=@cities.geojson" http://localhost:8000/api/datasets
Query parsed datasets:
from datasets.service import DatasetService # type: ignore[import-not-found]
async def list_by_bbox(svc: DatasetService = Depends(DatasetService), ...):
return await svc.intersects(bbox=(-74.1, 40.6, -73.8, 40.9))
Depends on
simple_module_core,simple_module_db,simple_module_hostingsimple_module_file_storage,simple_module_background_tasksshapely>=2.0,python-slugify>=8.0,celery>=5.4
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
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 simple_module_datasets-0.0.2.tar.gz.
File metadata
- Download URL: simple_module_datasets-0.0.2.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c324d17048a2cd61db4546ac28305ed7f1d990210be99fc134fe35c2f509634a
|
|
| MD5 |
cb9352a89b34d221c029dcde7b8ed86f
|
|
| BLAKE2b-256 |
163d6c6d3466175436db21c912044c145538868de0b41ec81be8c4837e272d7c
|
Provenance
The following attestation bundles were made for simple_module_datasets-0.0.2.tar.gz:
Publisher:
release.yml on antosubash/simple_module_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_module_datasets-0.0.2.tar.gz -
Subject digest:
c324d17048a2cd61db4546ac28305ed7f1d990210be99fc134fe35c2f509634a - Sigstore transparency entry: 1391727870
- Sigstore integration time:
-
Permalink:
antosubash/simple_module_python@1a7e639ff44ab1e2ebf917e0a7f7148e947ca085 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/antosubash
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1a7e639ff44ab1e2ebf917e0a7f7148e947ca085 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file simple_module_datasets-0.0.2-py3-none-any.whl.
File metadata
- Download URL: simple_module_datasets-0.0.2-py3-none-any.whl
- Upload date:
- Size: 34.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df0456f93e25cb8126126e31c750cde122aeca8c42a33ce1b9a925253dfa0dd7
|
|
| MD5 |
a91306901f1ad7486f8dca3bb48108d8
|
|
| BLAKE2b-256 |
ede6c763106f3ef3b0bdfe168ce0c2f0ebfddd68a0a28c94598e1501c0c5bbcc
|
Provenance
The following attestation bundles were made for simple_module_datasets-0.0.2-py3-none-any.whl:
Publisher:
release.yml on antosubash/simple_module_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_module_datasets-0.0.2-py3-none-any.whl -
Subject digest:
df0456f93e25cb8126126e31c750cde122aeca8c42a33ce1b9a925253dfa0dd7 - Sigstore transparency entry: 1391727882
- Sigstore integration time:
-
Permalink:
antosubash/simple_module_python@1a7e639ff44ab1e2ebf917e0a7f7148e947ca085 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/antosubash
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1a7e639ff44ab1e2ebf917e0a7f7148e947ca085 -
Trigger Event:
workflow_dispatch
-
Statement type: