Giter VIP home page Giter VIP logo

chatapi-dispatcher's Introduction

Dispatcher of Messages

A microservice that sanitizes, verifies requests and provides precise feedback

Introduction

This is a project made at work, of which the .git folder has been removed to delete any records of sensible information (like credentials) of the past, that way this doesn't violate any conditions! The responsibility of this microservice is to comply to a standard, named and defined as MessageDTO (specified with the help of Pydantic in src/schemas/message_dto.py), so a certain number of fields is expected in an exact way at /v1/messages. These fields are looked up into the POSTed request's body. In the documentation (more details further below) plenty of valid examples are included!

Development Technologies Used

  • Docker
  • Pipenv
  • Unittest
  • Pytest
  • Make

Deployment

To deploy to any of the current environments, first you will have to create a properly written .env file in src/. To know what to write in it, there's an .envtemplate file that provides the correct guidance!

In production though, you would usually prefer to not write an .env file but to write the env variables in a yml file instead.

Production

$ docker image build --tag testing:1 .
$ docker container run --publish 8001:8001 --rm -it testing:1

Development

These commands will install the dependencies and start a local development server.

$ pipenv shell
$ pipenv install
$ make dev

Usage

Tests

$ make tests

Coverage

$ make coverage

Code-check

There's a make statement that uses mypy, flake8, and pylint to check the code recursively. This project is entirely typed and mypy compliant.

$ make check

Documentation

Go to localhost:8001/docs and you will see plenty of examples to test out!

This project is fully documented and 100% test-covered.

chatapi-dispatcher's People

Contributors

nievadev avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.