Skip to main content

djangospice_framework

Application Runtime Framework for building Django apps

djangospice_framework is the application runtime for building modular Django applications.

It is designed to provide a consistent foundation for building large Django application ecosystems without repeatedly implementing the same infrastructure in every application.


Why djangospice_framework?

Large Django projects often accumulate infrastructure that gets duplicated across applications.

For example, individual applications may independently implement:

  • Base models
  • Event dispatching
  • Job handling
  • File handling
  • Import/export pipelines
  • Realtime broadcasting
  • Common service abstractions

djangospice_framework provides these capabilities as a shared runtime.

This gives applications a common architecture and allows modules to remain focused on their actual domain.

Design goals

djangospice_framework is designed around several principles:

  • Reusable — common functionality should be implemented once.
  • Modular — functionality should be composed through independent components.
  • Extensible — applications should be able to replace or extend framework behavior.
  • Django-native — use Django's existing ecosystem rather than reinventing it.
  • Developer-friendly — common application infrastructure should require minimal boilerplate.

Installation

Install djangospice_framework from PyPI:

pip install djangospice_framework

Basic Usage

Once installed, djangospice_framework components can be imported by Django applications and modules.

For example, using the common model infrastructure:

from djangospice_framework.db.models import BaseModel


class Customer(BaseModel):
    name = models.CharField(max_length=255)

The exact capabilities available depend on the components being used by the application.


Core Components

djangospice_framework is organized around reusable infrastructure rather than business-domain applications.

Database and Models

Common Django model abstractions provide a consistent foundation for application models.

from djangospice_framework.db.models import BaseModel

The database layer is intended to eliminate repetitive model infrastructure while preserving normal Django ORM behavior.


Events

The event system provides a decoupled mechanism for applications to communicate.

Instead of tightly coupling one application component to another, a component can dispatch an event and allow listeners to react to it.

Conceptually:

Application Action
       │
       ▼
     Event
       │
       ├── Listener
       ├── Listener
       └── Listener

This allows functionality such as notifications, auditing, integrations, and background processing to be attached without modifying the original application logic.


Broadcasting and Realtime Communication

The runtime provides abstractions for broadcasting application events and data to users or groups.

For example:

Broadcast.everyone(...)

or:

Broadcast.user(user, ...)

This infrastructure can be used by applications that need realtime updates through WebSockets or other supported transports.


Async Support

The runtime provides common abstractions for asynchronous application functionality.

This allows modules to use async operations where appropriate while keeping common infrastructure in one place.


Files

djangospice_framework provides common abstractions for file-related functionality, allowing applications to work with files without repeatedly implementing storage and file-handling patterns.


Imports and Exports

Reusable import/export infrastructure allows applications to implement data exchange consistently.

Typical use cases include:

  • CSV imports
  • Spreadsheet imports
  • Data exports
  • Bulk operations
  • Integration pipelines

Application Modules

djangospice_framework is not intended to be a standalone business application.

Instead, it provides the runtime used by applications and modules.

For example:

djangospice_framework
    │
    ├── billing
    ├── notification
    ├── workflow
    ├── documents
    ├── helpdesk
    ├── CRM
    ├── workforce

Each application can depend on the common runtime while retaining responsibility for its own domain.

This keeps domain logic out of the framework.


Example

A module can build its domain logic on top of djangospice_framework:

from djangospice_framework.db.models import BaseModel


class Invoice(BaseModel):
    number = models.CharField(max_length=50, unique=True)
    amount = models.DecimalField(
        max_digits=12,
        decimal_places=2,
    )

The module can then use other djangospice_framework infrastructure for events, notifications, UI, HTTP responses, tables, files, and other common functionality.

The result is a module that contains primarily business/domain logic, rather than infrastructure boilerplate.


License

This package is licensed under the MIT License.

See LICENSE for the full license text.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangospice_framework-0.1.0.tar.gz (67.1 kB view details)

Uploaded Source

Built Distribution

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

djangospice_framework-0.1.0-py3-none-any.whl (107.1 kB view details)

Uploaded Python 3

File details

Details for the file djangospice_framework-0.1.0.tar.gz.

File metadata

  • Download URL: djangospice_framework-0.1.0.tar.gz
  • Upload date:
  • Size: 67.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for djangospice_framework-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4de3440cfa06bdccef4009ece4a3d52b5cfa4c7a6113194256eb7677fdeb39b5
MD5 828569731a94a6223570bfe3ab7d96f2
BLAKE2b-256 5bfb3572970021a17c8089a3175eaa2c43813af7e6135232feb97eec831650f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for djangospice_framework-0.1.0.tar.gz:

Publisher: publish.yml on briansimpo/djangospice_framework

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

File details

Details for the file djangospice_framework-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for djangospice_framework-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f181921448e639dcf7e043d18a1413686267486d85eff2b2a94d3780ca0331a4
MD5 04d370116216e5d15a659a1ec3e1ca39
BLAKE2b-256 b4e00d03612bb2c16bbe304e1fffabf1121fe1678b8bc1470d7811369b1eb2b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for djangospice_framework-0.1.0-py3-none-any.whl:

Publisher: publish.yml on briansimpo/djangospice_framework

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

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

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