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.0.tar.gz (26.3 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.0-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for zibanu_django_state_machine-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7f84234bf0a26aaca51f15e624e0212acb9db3fde6164e5f153a6b293286fe84
MD5 4596cf2137581837898259f2019700ed
BLAKE2b-256 ee77335a80a5aa675c862ed3b7ea19be881ec4330f776b900bf45735bf2b1346

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zibanu_django_state_machine-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6f7cbad5e3fd4d5b73cd43668da2fea37d4cd5e07422594e4aedc1689fdb09a
MD5 00420d266ee498c384e27e20f4ddcf15
BLAKE2b-256 ed2466bd7ae7aa21df986b2fb9f32b6849f4a1b87fc2ff337e3a2315b59381c6

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