Skip to main content

Django plugin for Zato

Project description

django-zato-plugin

A client library for invoking Zato services from Django applications.

Zato is an integration platform that orchestrates and automates your to APIs, databases, queues, and other systems.

Learn more here: https://zato.io

With this plugin, Django delegates integration work to Zato - your views call Zato services, Zato handles the rest. Less code in Django, all integrations in one place.

Installation

pip install django-zato-plugin

Configuration

Add to your Django settings:

ZATO_URL = 'http://localhost:11223/django'
ZATO_USERNAME = 'django'
ZATO_PASSWORD = 'password' # Use your Zato password, e.g. from the Zato_Password env. variable

Usage

# views.py
from django.http import JsonResponse
from django_zato import client

def block_ip(request):

    # Get request data
    ip_address = request.POST['ip_address']
    reason = request.POST['reason']

    # Block on firewall
    client.invoke('firewall.block-ip', {'ip_address': ip_address})

    # Log incident in SIEM
    client.invoke('siem.log-incident', {
        'ip_address': ip_address,
        'reason': reason,
        'action': 'blocked',
    })

    return JsonResponse({'status': 'ok'})

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

django_zato_plugin-4.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

django_zato_plugin-4.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file django_zato_plugin-4.1.0.tar.gz.

File metadata

  • Download URL: django_zato_plugin-4.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.7

File hashes

Hashes for django_zato_plugin-4.1.0.tar.gz
Algorithm Hash digest
SHA256 4f00d97bf9647395d20cd72a0fa4f7c3c82f2e494af1d9d5dde331cabf316709
MD5 e60198d4137ead977525accb39cb2561
BLAKE2b-256 b5345c5e020475396c98098f083dfac899495e562eacf1dc10cfc6348ad89690

See more details on using hashes here.

File details

Details for the file django_zato_plugin-4.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_zato_plugin-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e90e74c8467769783feec26bea79051d7586918b36171d594211b3005a569c08
MD5 d517482dd802080c5b1032defdb4169b
BLAKE2b-256 9782044b791498dc595f81d670839479913fe7cb3610fa88cbbafe6f54bc00c7

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