4Geeks logo
4Geeks logo

Bootcamps

Explore our extensive collection of courses designed to help you master various subjects and skills. Whether you're a beginner or an advanced learner, there's something here for everyone.

Academy

Learn live

Join us for our free workshops, webinars, and other events to learn more about our programs and get started on your journey to becoming a developer.

Upcoming live events

Learning library

For all the self-taught geeks out there, here is our content library with most of the learning materials we have produced throughout the years.

It makes sense to start learning by reading and watching videos about fundamentals and how things work.

Full-Stack Software Developer - 16w

Data Science and Machine Learning - 16 wks

Search from all Lessons


LoginGet Started
← Back to Projects

Queue Managment API

Difficulty

  • intermediate

Average duration

8 hrs

Technologies

  • Static File Storage

  • Python

  • json

  • Logging

  • Flask

  • Queue

Difficulty

  • intermediate

Average duration

8 hrs

Technologies

Signup and get access to similar projects

We will use it to give you access to your account.
Already have an account? Login here.

Difficulty

  • intermediate

Average duration

8 hrs

Technologies

Difficulty

  • intermediate

Average duration

8 hrs

Technologies

Weekly Coding Challenge

Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!

Start the Challenge

Podcast: Code Sets You Free

A tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.

Listen the podcast

alt text SMS Queue Management System

Lets create a Queue System: Queue system are heavily used in Goverment institutions, airports, banks and many other venues looking to organize the incoming traffic. Queue systems can also be used to load balancing for different applications like:

  • Stablishing priorities in web servers incoming requests.
  • Inmigration and visa applicantions that need to be prioritized.
  • Network packages.
  • etc.

🌱 How to start this project

Do not clone this repository.

The first step to start coding is cloning the python boilerplate on your local computer or opening it using gitpod.

a) If using Gitpod (recommended) you can clone the boilerplate by clicking here.

b) If working locally type the following command from your command line:

1https://github.com/4GeeksAcademy/flask-rest-hello`

πŸ’‘ Important: Remember to create a new repository, update the remote (git remote set-url origin <your new url>), and upload the code to your new repository using add, commit and push.

πŸ“ Instructions

  • The API has to integrate with Twillio API to be able to send SMS to notify users when their turn has arrived.
  • Create an API that allows clients to manage a simple Queue, use the following data-structure to implement the queue:
1class Queue: 2 3 def __init__(self): 4 self._queue = [] 5 # depending on the _mode, the queue has to behave like a FIFO or LIFO 6 self._mode = 'FIFO' 7 8 def enqueue(self, item): 9 def dequeue(self): 10 def get_queue(self): 11 def size(self): 12 return len(self._queue)

Example worlflow

  1. The API receives a request tp add Bob into the queue (POST /new) with any particular priority (FIFO or LIFO).
  2. The API ads Bob and notifies him with an SMS confirmation, the SMS must say how many people are in front of him on the line.
  3. The system now waits until the enpoint GET /next gets executed to process the person on the queue.
  4. Every time a GET /next request is received, the next person on the queue gets processed until it is Bob's turn.
  5. When Bob is processed, the system sends him another SMS to let him know that his turn has arrived and deletes him from the list.

More details

  1. You have to create 3 endpoints for your API:
  • POST /new: Will recive information about a user and ad him into the queue.
  • GET /next: Will process one spot of the queue.
  • GET /all: Will return a list with everyone that is pending to be processed (the current queue) .

πŸ“– Fundamentals

This exercise will make you practice the following fundamentals:

  1. Here you can find the information on how to send an sms with twillio, you will have to register and account (free) and also register a number (free)
  2. Building an RESTful API
  3. Complex Data Structures.
  4. Queue (FIFO vs FILO)
  5. SMS.

Difficulty

  • intermediate

Average duration

8 hrs

Technologies

Difficulty

  • intermediate

Average duration

8 hrs

Technologies

Signup and get access to similar projects

We will use it to give you access to your account.
Already have an account? Login here.

Difficulty

  • intermediate

Average duration

8 hrs

Technologies

Difficulty

  • intermediate

Average duration

8 hrs

Technologies

Weekly Coding Challenge

Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!

Start the Challenge

Podcast: Code Sets You Free

A tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.

Listen the podcast