Giter VIP home page Giter VIP logo

ultra-api's Introduction

Ultra API

This is a optimized RESTful API. It's built with Flask,PostgresSQL,Redis and Docker.The aim is to show the different concepts of a backend(caching,security,...) that are sometimes considered as just CRUD operations.

Project stack

Stack Logo
Docker docker
Flask flask
AWS redis
PostgreSQL postgresql
Redis redis

Features

  • User registration and authentication and authorization(JWT+CORS)
  • CRUD operations for todos
  • Caching(with redis)
  • Pagination and search for todos
  • Rate limiting
  • Logging system(with CloudWatch)

Endpoints

  • /api/v1/user: Register a new user
  • /auth: Log in a user
  • /api/v1/todos: Get all todos for the current user
  • /api/v1/todo/<int:id_todo>: Get, update, or delete a specific todo

Installation

  1. Clone the repository: git clone https://github.com/yourusername/yourrepository.git

  2. Create .env file copy .env.sample contents and change the values(if you not change it,sending mail and logging system aren't running)

  3. You can use the docker-compose file it's so simple but you need that Docker installed in your device

  4. You can generate data by running gen_todos.py script who uses threading and generate 100k todo rows in your db

docker-compose up -d

Otherwise, you need to setup your own postgres server and also redis

Usage

To get all todos for the current user:

GET /api/v1/todos?page=1&per_page=10&query=test 

To update a specific todo:

PUT /api/v1/todo/1 Content-Type: application/json

{ "title": "New title", "description": "New description", "completed": true, "deadline": "12/31/21 23:59:59" }

Contributing

Pull requests are welcome CONTRIBUTING.

License

MIT

ultra-api's People

Contributors

bambadiagne avatar

Watchers

 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.