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.1.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.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_zato_plugin-4.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fa1a6ae0def2f3e2188a8e2dbb987ee0206ddee22f5dc76bad1bdf0c57240745
MD5 646311e118cfdd042051db737f721677
BLAKE2b-256 a22ec278eac1ae99888b83bfa8255729a2777879d7df84a13e238f3be9caa80e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_zato_plugin-4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12af7fd9f52e06ac5455d0824bb5bd7ddfc71427debd0f3e8a0e393c64daac2e
MD5 c09c43f2bf9f03fcd3e64ff0243056f9
BLAKE2b-256 d5c17d4a0b68084d32ca01f00f6a69559d590dd52d128beef25e117ca376ac61

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