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.2.tar.gz (31.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.2-py3-none-any.whl (48.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for zibanu_django_state_machine-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a968f6faf29859f0be868d46df46c6c35ac3c809fbe3eefad56f703732d6f8a9
MD5 025c33ea9e96895dc3104d9322548918
BLAKE2b-256 f48ad5ff163b9e85f0d392ccef659b59a487c002bfce3c6476dce2d141cd9f5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zibanu_django_state_machine-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7d3d4c93b41c3e7422056c4102fd6e1570fab5b22c37707f5d16a7bf78545a6f
MD5 0f6cfcaa5f0f29047ff39a26affbcae9
BLAKE2b-256 6ff3eb646bd0adab21f6ecfc662d1a5e18c90aa3271466521e6c3cce7db54bba

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