semvec/pypi-packages huggingface dataset:
bitninja-ninjarpc 1.1.0
RabbitMQ RPC server and client by BitNinja.io
Requires Python: >=3.6
Keywords: bitninja,ninjarpc,rpc,rabbitmq

# BitNinjaIO NinjaRPC

RabbitMQ rpc server and client by [BitNinja.io](https://bitninja.io) based on [PHP implementation](https://packagist.org/packages/bitninja/ninjarpc)

## Usage

The package contains a client, and a server as well, which can communicate with each other.

### Server

```python
# import the package
from ninjarpc import Server
from ninjarpc.Encoders import JsonEncoder
from ninjarpc.Routers import SimpleRouter
from ninjarpc.QueueManagers import RabbitMQ

def endpoint_handler(params):
    print(f'endpoint was called with {params} parameters.')

if __name__ == '__main__':
    queue_manager = RabbitMQ(host='hostname',
                             port='port',
                             username='username',
                             password='password')
    encoder = JsonEncoder()
    endpoints = {"endpoint": endpoint_handler}
    router = SimpleRouter(endpoints)

    server = Server('TEST_SERVICE', queue_manager, encoder, router)

    while True:
        server.listen()
```

### Client

```python
# import the package
from ninjarpc import Client
from ninjarpc.Encoders import JsonEncoder
from ninjarpc.Exceptions import CallTimeoutException
from ninjarpc.QueueManagers import RabbitMQ

if __name__ == '__main__':
    queue_manager = RabbitMQ(host='hostname',
                             port='port',
                             username='username',
                             password='password')
    encoder = JsonEncoder()
    client = Client(queue_manager, encoder)
    
    call = client.async_call(service_name='TEST_SERVICE',
                             method_name='endpoint',
                             parameters=())
    try: 
        result = call.wait()
    except CallTimeoutException as e:
        print('Call timeouted')

```
django-terra-settings 1.0.3
Common settings and utils for terra apps.
Requires Python: >=3.6

[![Build Status](https://travis-ci.org/Terralego/django-terra-settings.svg?branch=master)](https://travis-ci.org/Terralego/django-terra-settings)
[![codecov](https://codecov.io/gh/Terralego/django-terra-settings/branch/master/graph/badge.svg)](https://codecov.io/gh/Terralego/django-terra-settings)
[![Maintainability](https://api.codeclimate.com/v1/badges/186dad418b5c5cdb9cf8/maintainability)](https://codeclimate.com/github/Terralego/django-terra-settings/maintainability)


https://django-terra-settings.readthedocs.io/en/latest/

Helpers and default configuration endpoints for terralego application.


CHANGELOG
=========

1.0.3          (2021-04-13)
---------------------------

* Fix bug caused missing "tiles" key when creating or updating a mabpox baselayer


1.0.2          (2021-02-16)
---------------------------

* Fix French translations


1.0.1          (2021-02-02)
---------------------------

  * Add terra permissions

1.0.0          (2020-11-18)
---------------------------

* Remove functions backport in opp


0.1.3          (2020-11-16)
---------------------------

* Tiles is not required anymore for add / edit mapbox base layer


0.1.2          (2020-11-03)
---------------------------

* API enhancement
  * Manage raster tiles urls
  * Add TileJSON url in MapBoxBaseLayerSerializer


0.1.1          (2020-10-12)
---------------------------

* Fix typo preventing BaseLayerSerializer from working properly


0.1.0          (2020-10-06)
---------------------------

* First release of django-terra-settings