Skip to main content

Zibanu State Machine package for django projects

Project description

Zibanu Django State Machine

zibanu.django.state_machine

zibanu.django.state_machine is a Django application that provides a reusable state machine system for Zibanu Django projects.

It includes database models, Django admin integration, API endpoints, and helper modules to define workflows based on states and transitions. It can be used to model business processes such as document approval, order lifecycle, request validation, or any other entity that moves through a controlled sequence of states.

Installation

Install the package with pip:

bash pip install zibanu-django-state-machine

Dependencies

This package is intended to be used together with the Zibanu Django base package.

Getting started

Add the application to INSTALLED_APPS in your Django settings:

INSTALLED_APPS += ["zibanu.django.state_machine"]

If you want to expose the built-in API endpoints, include the package URLs in your project URL configuration.

Package structure

The application is organized into the following modules and subpackages.

Main application

  • zibanu.django.state_machine

Main Django application package for the state machine system.

Models

  • zibanu.django.state_machine.models

Contains the core models used by the package:

  • StateMachine
  • State
  • Transition
  • TransitionGroup
  • StateMachineProxy
  • StateLog

These models define the workflow structure and allow transitions and history tracking across states.

Admin

  • zibanu.django.state_machine.admin

Registers the main models in the Django admin site.

Admin views

  • zibanu.django.state_machine.admin_views

Contains the custom admin classes used to manage state machine components.

Available modules:

  • state
  • state_log
  • state_machine
  • transitions

API

  • zibanu.django.state_machine.api

Namespace for API-related components.

Serializers

  • zibanu.django.state_machine.api.serializers

Serialization layer for API operations.

Available modules:

  • state
  • state_machine

Services

  • zibanu.django.state_machine.api.services

Service and view layer used to expose package functionality through HTTP endpoints.

Available modules:

  • state
  • state_machine

Internal library

  • zibanu.django.state_machine.lib

Internal helper package used by the application.

Classes

  • zibanu.django.state_machine.lib.classes

Support classes related to state machine logic.

Fields

  • zibanu.django.state_machine.lib.fields

Custom model field helpers.

Available modules:

  • foreignkey_field

Managers

  • zibanu.django.state_machine.lib.managers

Custom managers and queryset helpers.

Available modules:

  • transition

Utils

  • zibanu.django.state_machine.lib.utils

Utility functions used internally by the package.

Available modules:

  • get_auth_user

Migrations

  • zibanu.django.state_machine.migrations

Contains the Django migration files for the package models.

Localization

  • zibanu.django.state_machine.locale

Translation resources for the application.

Available API endpoints

The package provides the following endpoints:

  • state-machine/summary/
  • state-machine/get/
  • state/summary/
  • state/next/

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

zibanu_django_state_machine-1.0.1.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

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

zibanu_django_state_machine-1.0.1-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

Details for the file zibanu_django_state_machine-1.0.1.tar.gz.

File metadata

File hashes

Hashes for zibanu_django_state_machine-1.0.1.tar.gz
Algorithm Hash digest
SHA256 acc5f808d46ef5e769eb470f3babec8696cab2ff0bfac1cf0a0b60e60f0d8eea
MD5 d003f31631952d0d19c6bd975d92c73d
BLAKE2b-256 2e6adf72486d2ee88ee5cd6f1f294d668990c3723db0732ac3504f3e6e69cac5

See more details on using hashes here.

File details

Details for the file zibanu_django_state_machine-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for zibanu_django_state_machine-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51562e92c0ebda713f25859fc5eaefd1ebe0f2429ecf44094faf830ec6c983a7
MD5 e723a59fd88a3b2b12d0d08d34110a01
BLAKE2b-256 7d9fe3b2e8d879e46998004bb8f109f5f8709ea53902fa87fbcf7a780c6f2be0

See more details on using hashes here.

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