Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

What is an ISC?

ISC is RPC on steroids.

This is a framework for Python designed to build distributed applications. It is designed to play well with Django and helps you to quickly build architectures from scratch.

ISC stands for Inter-Service Communication. It is the library you missed to write scalable distributed systems using microservices pattern in Django.

It uses RabbitMQ as messaging broker and is compatible with gevent monkey patching.

Coverage Status Build Status Documentation Status

Django + ISC = ♥

ISC supports Django and makes it easy and intuitive to build a distributed system using. We're trying to make you capable of walking away from the monolythic architecture of typical Django apps.

The philosophy

  • Distribution. Service is an application (Python, Django, Flask or whatever) that performs a set of tasks, and performs them well.
  • Encapsulation. If service needs to perform the work that the other service is responsible for, it should ask the other service to do so.
  • Abstraction. All services are clients, irregardlessly of whether they provide functions or perform RPC calls to other services. Service doesn't need to know the address or specifications of each other. Services can also broadcast messages to multiple other services.

Psst: You can also write some of your services in NodeJS!

And of course they can communicate with your Django apps because they share the same protocol. How cool is that?

How does it work?

  1. You declare some services which are basically just classes with exposed methods.
  2. [Not required for Django] You instantiate & register your services.
  3. You run the worker that handles incoming requests and delivers function return values back to the caller (Classic RPC pattern.) For Django this is achieved by running ./ isc.
  4. [Django only] Apart from having the isc running, you'll now want to also start your web server with ./ runserver in a different terminal. Now you have 2 processes running: 1 for Django itself and 1 for ISC worker that will perform tasks asynchronously. Because isc is a Django management command, you can easily use all of Django's fascilities in your ISC services: ORM, templating etc. You can even send RPC calls from one services to the others.


  • pika
  • kombu
  • A running rabbitmq server.


The docs are available via ReadTheDocs.


pip install isclib

All-in-one example


#!/usr/bin/env python3.6

from isc.server import Node, expose, on, local_timer

class ExampleService(object):
    name = 'example'

    def foo(self):
        return 'bar'

    def dangerous_operation(self):
        raise Exception('BOOM')

    def private_method(self):
        print('Cannot call me!')

    def do_stuff(self, data):
        print(data['place'], 'exploded')

    def print_statistics(self):
        # Will be called every 5 seconds.
        print('Staying alive!')

service = ExampleService()
node = Node()

if __name__ == '__main__':


#!/usr/bin/env python3.6

from isc.client import Client, RemoteException

# `Client` is thread-safe, no need to perform any connection pooling.
client = Client()

# Call single method  # returns 'bar'

# Raises RemoteException

# Send a broadcast
client.notify('boom', dict(place='old_building'))

# Raises RemoteException

# Do not wait for result
future =
# ...or if you want, you can manually wait for it:

Playing with Django

Using ISC with Django is very simple.

In order to integrate ISC into your Django app, you need to perform those steps:

  1. Classically, add isc to INSTALLED_APPS.

  2. Add configuration for your services into your

ISC = {
    # Specify where your RabbitMQ lives.
    'url': os.getenv('RABBITMQ_URL', 'amqp://guest:guest@'),

    # Enumerate your service classes here
    'services': [

    # Hooks are methods that are evaluated when an RPC request is handler.
    # 'hooks': {
    #     'post_success': 'myapp.utils.handle_success'
    #     'post_error': 'myapp.utils.handle_error',
    # },
    # Size of worker thread pool for server
    # 'thread_pool_size': 8
  1. Start the worker that handles incoming requests to your services by running ./ isc and that's it!

  2. In order to test calling some ISC methods from the services you've just defined run ./ iscshell:

$ ./ iscshell
>>> print(
  1. You can now write other applications that retrieve data from your app via ISC. They can also host their own services.

Supported Python versions

ISC is supported on Python 2.7+ & 3.5+


Created by Andrew Dunai. Inspired by Nameko.