A simple messaging RestAPI written in python
The service can be reached at https://herolo.duckdns.org
Flask as wsgi frameworkgunicorn as wsgi serverThe app is deployed in AWS on a EC2 instance with Docker engine installed. the instance is configured as a swarm with a single manager node in order to enable to scale the app.
stack details:

Note a user can send a message to more then one receiver hence the meny-to-many between users and messages
/users endpoint/users/<username>/token endpoint
now that your user is set up and you have a token you can send and get messagesBase https://herolo.duckdns.org
/users
POST{ username:<>, email:<>, password:<> }/users/<username>/token
POST{ password:<string> }/users/<username>/messages
POSTAuthorization: Bearer <token> - the Bearer token{ receiver:<string - the receiver username>, subject:<string>, message:<string> }/users/<username>/messages?unread="true"&per_page=20%page=1
GETAuthorization: Bearer <token> - the Bearer tokenunread=<"true"|"false"> - optional
unread="true" return only unread messagesunread="false" return only messages that have been readper_page=<int> - optional (default 20)
page=<int> - optional (default 1)
which page of result to return
/users/<username>/messages/<message_id>
Authorization: Bearer <token> - the Bearer tokenPATCH
{ read:<"true"|"false">}Delete
Content type
Image
Digest
Size
352.5 MB
Last updated
over 5 years ago
docker pull nissy34/herolo