Skip to content

This project provides a RESTful API for managing student records using FastAPI and MySQL. The API supports CRUD operations to create, read, update, and delete student information.

License

Notifications You must be signed in to change notification settings

hfmartinez/vagrant_virtualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Management API

Overview

This project provides a RESTful API for managing student records using FastAPI and MySQL. All configurations and provisioning are automated with Ansible and Vagrant. The API supports CRUD operations to create, read, update, and delete student information.

Prerequisites

Before you begin, ensure you have the following installed:

Steps to Run

Important

Ensure that the Vagrant machine has access to the internet for package installations.

  1. Clone the Repository
    git clone https://github.com/yourusername/student-management-api.git
    cd student-management-api/app
  2. Update Database Credentials
  • Create a file named .env in the app directory with the following content:
    DB_USER=your_mysql_username
    DB_PASSWORD=your_mysql_password
    DB_HOST=localhost
    DB_DATABASE=universidad
    
  • Replace your_mysql_username and your_mysql_password with your desired MySQL credentials. The root password will also need to be set in the Ansible playbook.
  1. Run Vagrant
   vagrant up
  1. Access the API
  • Once the setup is complete, the API will be accessible at http://localhost:8000
  1. Stopping the Virtual Machine
vagrant halt
  1. Destroying the Virtual Machine
vagrant destroy

API Endpoints

  • POST /students/: Create a new student
  • GET /students/: Retrieve all students
  • GET /students/{student_id}: Retrieve a student by ID
  • PUT /students/{student_id}: Update a student's information
  • DELETE /students/{student_id}: Delete a student by ID

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This project provides a RESTful API for managing student records using FastAPI and MySQL. The API supports CRUD operations to create, read, update, and delete student information.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published