Key-Value база данных на Tarantool и REST API к ней.

Related tags

RESTful APIkvmail
Overview

KVmail

Key-Value база данных на Tarantool и REST API к ней.

Документация к API доступна здесь.

Requiremrnts

  • ubuntu 16.04+
  • python3.6+
  • supervisord
  • nginx

Остальные пакеты монтируются при сборке.

Install

Для установки проекта склонируйте данный репозиторий:

git clone https://github.com/la9ran9e/kvmail.git

Build

Перед сборкой необходимо создать .env файл со следующими параметрами:

TARANTOOL_HOME=/tarantool # может быть другим
KV_USER={на усмотрение пользователя}
KV_PASS={на усмотрение пользователя}

Для сборки необходимо выполнить следующую команду:

make build

Для развертки API нам потребуются следующие пакеты:

  • supervisord
  • nginx

Линкуем конфиги:

ln -s ${PWD}/nginx.conf /etc/nginx/sites-enabled/kvmail.conf
ln -s ${PWD}/kvmail.conf /etc/supervisor/conf.d

Run

Проверяем правильность nginx-конфига и перезапускаем сервис:

nginx -t && service nginx restart

Теперь у нас есть сервер под 2048 портом, который проксирует все запросы отправляемые в location /api на unix-порт /tmp/uvicorn.sock. При rps>30 сервер возвращает статус код 429.

Теперь нам необходимо запустить приложение на Tarantool и API к нему. Для этого выполним следующие команды:

$ make start_tarantool_app
$ supervisorctl start kvmail_api

Логи по умолчанию пишутся в следующем порядке:

  • tarantool - ./tarantool.log
  • kvmail_api - ./api_out.log ./api_err.log
  • nginx - /tmp/access.log /tmp/error.log

Возникшие сложности

За неимение достаточного количества времени, было сложно разобрать, как подтянуть конфиги из файла в tarantool-приложение. Поэтому вы можете наблюдать, что приложение не запускается в supervisor'е.

Web APIs for Django. 🎸

Django REST framework Awesome web-browsable Web APIs. Full documentation for the project is available at https://www.django-rest-framework.org/. Fundi

Encode 24.7k Jan 04, 2023
Country-specific Django helpers, to use in Django Rest Framework

django-rest-localflavor Country-specific serializers fields, to Django Rest Framework Documentation (soon) The full documentation is at https://django

Gilson Filho 19 Aug 30, 2022
Async Python 3.6+ web server/framework | Build fast. Run fast.

Sanic | Build fast. Run fast. Build Docs Package Support Stats Sanic is a Python 3.6+ web server and web framework that's written to go fast. It allow

Sanic Community Organization 16.7k Dec 28, 2022
DRF-extensions is a collection of custom extensions for Django REST Framework

Django REST Framework extensions DRF-extensions is a collection of custom extensions for Django REST Framework Full documentation for project is avail

Gennady Chibisov 1.3k Dec 28, 2022
Transparently use webpack with django

Looking for maintainers This repository is unmaintained as I don't have any free time to dedicate to this effort. If you or your organisation are heav

2.4k Dec 24, 2022
Generate Views, Serializers, and Urls for your Django Rest Framework application

DRF Generators Writing APIs can be boring and repetitive work. Don't write another CRUDdy view in Django Rest Framework. With DRF Generators, one simp

Tobin Brown 332 Dec 17, 2022
Authentication Module for django rest auth

django-rest-knox Authentication Module for django rest auth Knox provides easy to use authentication for Django REST Framework The aim is to allow for

James McMahon 873 Dec 30, 2022
Swagger Documentation Generator for Django REST Framework: deprecated

Django REST Swagger: deprecated (2019-06-04) This project is no longer being maintained. Please consider drf-yasg as an alternative/successor. I haven

Marc Gibbons 2.6k Dec 23, 2022
Turn your API made with Django REST Framework(DRF) into a GraphQL like API.

Turn your API made with Django REST Framework(DRF) into a GraphQL like API.

Yezy Ilomo 575 Jan 05, 2023
Kong API Manager with Prometheus And Splunk

API Manager Stack Run Kong Server + Konga + Prometheus + Grafana + API & DDBB + Splunk Clone the proyect and run docker-compose up

Santiago Fernandez 82 Nov 26, 2022
A RESTful way to use your Notion tables as a database.

rest-notion-db A RESTful way to use your Notion tables as a database. Use-cases Form submissions or frontend websites, use one database that

Oorjit Chowdhary 42 Dec 27, 2022
Django-rest-auth provides a set of REST API endpoints for Authentication and Registration

This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST

Tivix 2.4k Dec 29, 2022
Little Library API REST

Little Library API REST py 3.10 The only one requeriment it's to have Flask installed.

Luis Quiñones Requelme 1 Dec 15, 2021
A RESTful whois

whois-rest A RESTful whois. Installation $ pip install poetry $ poetry install $ uvicorn app:app INFO: Started server process [64616] INFO: W

Manabu Niseki 4 Feb 19, 2022
Django Ninja is a web framework for building APIs with Django and Python 3.6+ type hints.

💨 Fast, Async-ready, Openapi, type hints based framework for building APIs

Vitaliy Kucheryaviy 3.8k Jan 04, 2023
Sanic-RESTPlus is an extension for Sanic that adds support for quickly building REST APIs.

Sanic RestPlus Sanic-RESTPlus is an extension for Sanic that adds support for quickly building REST APIs. Sanic-RESTPlus encourages best practices wit

Ashley Sommer 106 Oct 14, 2022
A light REST library for Django.

django-nap Read The Docs: https://django-nap.readthedocs.io/en/latest/ Change log: https://django-nap.readthedocs.io/en/latest/changelog.html An API l

Curtis Maloney 223 Dec 07, 2022
Django REST API with React BoilerPlate

This is a setup of Authentication and Registration Integrated with React.js inside the Django Templates for web apps

Faisal Nazik 91 Dec 30, 2022
RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.

RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.

Microsoft 1.8k Jan 04, 2023