Reusable Django and DRF abstractions for models, admin, and API views.
Project description
spider-core
spider-core is a reusable Django/DRF helper library extracted from the Spiderkube admin project.
It provides:
- Django model mixins and base classes
- DRF API abstractions for CRUD and list views
- serializer helpers
- admin base classes
- reusable decorators and exceptions
- caching helpers
- secure storage helpers
- JSON serializer utilities
- field validators
Installation
Install the package locally from the repository root:
pip install -e .
Install with optional admin helpers:
pip install -e .[admin]
Install with optional storage helpers:
pip install -e .[storage]
Install directly from GitHub:
pip install git+https://github.com/xooshe/spider-core.git
Install from PyPI:
pip install spider-core-x
Install with optional admin helpers from PyPI:
pip install spider-core-x[admin]
Install with optional storage helpers from PyPI:
pip install spider-core-x[storage]
CI / Publishing
A GitHub Actions workflow is included at .github/workflows/publish.yml. It:
- runs unit tests on push and pull request
- builds the package on push and pull request
- publishes to PyPI when a
v*tag is pushed
No secrets are needed—the workflow uses OIDC trusted publishing for PyPI authentication.
Git Hooks
This repository includes a versioned hook script at .githooks/pre-push, and the current checkout also installs the hook into .git/hooks/pre-push.
The hook validates tag pushes so tags starting with v must match the version defined in pyproject.toml (without the v prefix).
Install or reinstall the hook in a fresh clone with:
./scripts/install-git-hooks.sh
Alternatively, enable the repository hooks directory directly:
git config core.hooksPath .githooks
Use standard tag push syntax so the hook executes correctly:
git tag v0.1.1
git push origin v0.1.1
The workflow will automatically build and publish spider-core-x to PyPI.
Usage
from spider.api import ModelGetApi
from spider.models import AbstractBaseModel
from spider.serializers import ModelSerializer
from spider.decorators import api_response
Package structure
spider/apispider/adminspider/modelsspider/serializersspider/decoratorsspider/exeptionsspider/storagespider/utilsspider/validators
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 spider_core_x-0.0.3.tar.gz.
File metadata
- Download URL: spider_core_x-0.0.3.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f194e47e86b548384eb5ffbac01856600797d4acde0c775493fad7b81b8690d
|
|
| MD5 |
b24e7e4863d3173ba4cea920300c9c94
|
|
| BLAKE2b-256 |
7ddd1e7edfbe54caaa6a33360ceecb0fbb3f215098b91a3195e54785d85b9d3b
|
Provenance
The following attestation bundles were made for spider_core_x-0.0.3.tar.gz:
Publisher:
publish.yml on xooshe/spider-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spider_core_x-0.0.3.tar.gz -
Subject digest:
0f194e47e86b548384eb5ffbac01856600797d4acde0c775493fad7b81b8690d - Sigstore transparency entry: 1707577234
- Sigstore integration time:
-
Permalink:
xooshe/spider-core@51096a3e0b7628810bc92fd270099328ba59fa17 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/xooshe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@51096a3e0b7628810bc92fd270099328ba59fa17 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spider_core_x-0.0.3-py3-none-any.whl.
File metadata
- Download URL: spider_core_x-0.0.3-py3-none-any.whl
- Upload date:
- Size: 28.9 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 |
dd916c2f953c3a2b023bd83a477d24a9af2f654919d2d25ec172c7a97abd0abc
|
|
| MD5 |
56a1d0ce480aa54c18d56387cafb5d8c
|
|
| BLAKE2b-256 |
d10390ff16f8b1e6b7e8981432219d6db29cb9dc9a875a68ee01b2336eda9196
|
Provenance
The following attestation bundles were made for spider_core_x-0.0.3-py3-none-any.whl:
Publisher:
publish.yml on xooshe/spider-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spider_core_x-0.0.3-py3-none-any.whl -
Subject digest:
dd916c2f953c3a2b023bd83a477d24a9af2f654919d2d25ec172c7a97abd0abc - Sigstore transparency entry: 1707577349
- Sigstore integration time:
-
Permalink:
xooshe/spider-core@51096a3e0b7628810bc92fd270099328ba59fa17 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/xooshe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@51096a3e0b7628810bc92fd270099328ba59fa17 -
Trigger Event:
push
-
Statement type: