A Django app for set connections between microservices.
Project description
Application for make sync requests (REST API) between microservices .
For testing you should have access to 2 or more projects (at least 1 project - should be Django Project)
If you don’t have any microservice yet, please follow the link https://github.com/bandirom/DjangoTemplateWithDocker
And deploy the project use the instruction in a link above
Quick start
- Install the package
pip install django-microservice-request
Add “microservice_request” to your INSTALLED_APPS:
INSTALLED_APPS = [ ... 'microservice_request', ]
In settings.py set the follow settings:
# Custom api key header API_KEY_HEADER = os.environ.get('API_KEY_HEADER', 'X-Custom-Header') # Custom api key API_KEY = os.environ.get('API_KEY', 'api-secret-key') # Requested header will be: # Authorization: X-Custom-Header api-secret-key
For key generating recommend to use https://florimondmanca.github.io/djangorestframework-api-key/
- For example you have 2 deployed projects. First project will be ApiGateway and second will be ArticleBlog
Create a new application for set separated route:
docker-compose exec web python manage.py startapp router_article
or
python manage.py startapp router_article
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-microservice-request-0.1.4.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6615a8dcd65666fe2f69a8ec2c6d18ae5fcb1262260237fb922b13b900a2062b |
|
MD5 | d503354828c56f34d3b624ad88d64980 |
|
BLAKE2b-256 | f0c80551c9bef5d56422cb722100d27108ccfb6f82ce4689373cddc0eeb8a031 |
Hashes for django_microservice_request-0.1.4.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46c7956e7852fc3e9bfa9814ca7d73a473d0416dda8e8b6c1a81ece73a1cf4a2 |
|
MD5 | b0c09b09808b6b589a2b55d5789e791b |
|
BLAKE2b-256 | 41ea425a4a5fe57771c9bc48da8e33337362253e2e1cae5306ae57fb3e756004 |