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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980ffe153638f37d90d455f5fa7d41217657f4e7fbd857bc1539a764148a07b8 |
|
MD5 | be81d6a3e1fc16c28c485be964761f47 |
|
BLAKE2b-256 | 15c190a54bd5bb8db3fc7fd73e937d48d6ecd3ef0dceababc425cb78d51b934a |
Hashes for django_microservice_request-0.1.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dd9c4204c92f5a6090e9fc882dddb06c09f798db7bb3b0c62bba593e9a9a476 |
|
MD5 | ea8a5c34eaf152af4311d918d4b72405 |
|
BLAKE2b-256 | 4dee8fdf519ee8ebd2f6d8fef459f8d887bca748b80517d0467621c3c61069fe |