Skip to main content

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/api
  • spider/admin
  • spider/models
  • spider/serializers
  • spider/decorators
  • spider/exeptions
  • spider/storage
  • spider/utils
  • spider/validators

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

spider_core_x-0.0.3.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

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

spider_core_x-0.0.3-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

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

Hashes for spider_core_x-0.0.3.tar.gz
Algorithm Hash digest
SHA256 0f194e47e86b548384eb5ffbac01856600797d4acde0c775493fad7b81b8690d
MD5 b24e7e4863d3173ba4cea920300c9c94
BLAKE2b-256 7ddd1e7edfbe54caaa6a33360ceecb0fbb3f215098b91a3195e54785d85b9d3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for spider_core_x-0.0.3.tar.gz:

Publisher: publish.yml on xooshe/spider-core

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

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

Hashes for spider_core_x-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dd916c2f953c3a2b023bd83a477d24a9af2f654919d2d25ec172c7a97abd0abc
MD5 56a1d0ce480aa54c18d56387cafb5d8c
BLAKE2b-256 d10390ff16f8b1e6b7e8981432219d6db29cb9dc9a875a68ee01b2336eda9196

See more details on using hashes here.

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

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