Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Latest commit

 

History

History
53 lines (32 loc) · 1.09 KB

README.rst

File metadata and controls

53 lines (32 loc) · 1.09 KB

myr.client

https://travis-ci.org/Vnet-as/myr-client.svg?branch=master

Client for myr-stack

Installation

Development

Create virtualenv and activate it, then proceed to install myr-client for development:

$ git clone https://github.com/Vnet-as/myr-client.git
$ cd myr-client
$ pip install -e .

Usage

import celeryconf
from celery import Celery

app = Celery()
app.config_from_object(celeryconf)

from myr.client import Client

client = Client()

# conntact myr-discovery service to get the task/procedures definitions
client.discover()

# Now if ``invoicing.tasks.add_item`` was discovered in previous call
# we can call it by ``client.rpc``
client.rpc.invoicing.tasks.add_item(*args, **kwargs)