Skip to main content

No project description provided

Project description

SCF_FSM_PACKAGE

A resuable django application that can handle transition and workflow's in your project .

Authors

Installation

Install scf_fsm_package with pip

pip install finflo

In your django application , browse to installed_apps section in settings.py and add this ,

INSTALLED_APPS = [
    'finflo',
    'rest_framework'
]

if you want party you can customize by adding this finflo section in your settings.py NOTE : The FINFLO section is required

FINFLO = {
    'FROM_PARTY' : 'django_app.model_name', # example

    'FROM_PARTY' : 'accounts.party',
    'TO_PARTY' : 'accounts.party'
}

or else simple mention None ,

FINFLO = {
    'FROM_PARTY' : None,
    'TO_PARTY' : None
}

now navigate to the middleware section and add the finflo middleware

MIDDLEWARE = [
    'finflo.middleware.TransitionUserMiddleware',
]

Api urls

In your application's urls.py , you can include finflo's api urls for browsable api's

** make sure that you have installed DjangoRestFramework

Now add this peice of code in your urls.py

urlpatterns = [
    path('', include('finflo.urls'))
]

Usage

  1. import your transition function

    from finflo.transitions import FinFlotransition
    
  2. The transition function requires 4 positional arguments :

  3. Arguments Data_Type
    type str
    action str
    stage int
    t_id (optional) int

Example 1 : generic

from finflo.transition import FinFlotransition

myhandler = FinFlotransition()

# example function

def index():
    myhandler.transition(type = "PROGRAM",action = "submit" ,stage = 0)
    return HttpResponse({"data"})

Example 2 : customizable

  1. Browse to /api/transition/
  2. send your type , action , stage , t_id(optional) in body
    Screenshot

Tech Stack

1. Python
2. Django==3.2.5
3. Django-rest-framework

Additional API's

Api urls

Api URL's METHOD QUERY_PARAMS
localhost/model/ GET ?type=PROGRAM
localhost/action/ GET NONE
localhost/action/ POST NONE
localhost/workflowitems/ GET NONE
localhost/workevents/ GET NONE

Support

For support, email support@venzo.com .

Future

  1. postgres support
  2. next_Avail_transitions
  3. customizable workflowitems and workflowevents

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

finflo-1.5.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

finflo-1.5.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file finflo-1.5.1.tar.gz.

File metadata

  • Download URL: finflo-1.5.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for finflo-1.5.1.tar.gz
Algorithm Hash digest
SHA256 30542bbfc8790c322c4933fca98cb7c2317d76944e34fedf6a155cd7ef8277fa
MD5 7fda0e3af3ece5b43d508dfbe35dea72
BLAKE2b-256 f1f9ba6d3d8265ec42e3062b2e52d5fc3a4137d5342dcddd90d9fc99b14d1109

See more details on using hashes here.

File details

Details for the file finflo-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: finflo-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for finflo-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0529a7d9a8d678834862d1d0b193bd531f274500fda430643baa43bffcc6d3ab
MD5 d104c810edf80d76345a3e688ec5828a
BLAKE2b-256 ba6f5f8d587c3dbeceadcd260390fd954254c14d53ed687c77e3362ed66b3e37

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page