Skip to content

ErickOF/CRUD-Flask-SQLServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRUD Flask and SQL Server

Contributors Forks Stargazers Issues MIT License LinkedIn


Template for a CRUD (Create, Read, Update, and Delete) using Flask (Python) and Microsoft SQL Server
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This template is a CRUD (Create, Read, Update. and Delete) built with Flask and Microsoft SQL Server. This contains only a User Table:

User
id_card: INT
id_user: INT
[name]: VARCHAR(30)
last_name: VARCHAR(30)
phone_number: INT
email: VARCHAR(100)

back to top

Built With

Python Flask SQLServer

back to top

Getting Started

Prerequisites

  • Python 3.12.
  • SQL Server 2022.
  • Microsoft SQL Management Studio 20.

Installation

  1. Clone the repo

    git clone https://github.com/ErickOf/CRUD-Flask-SQLServer.git
  2. Install Python packages

    pip install -r requirements.txt
  3. Create a DB in Microsoft SQL Management Studio.

  4. Update JSON file in API/config/development.json with DB configuration:

{
    "user": "<db-user>",
    "password": "<db-password>",
    "host": "localhost",
    "port": 3306,
    "database": "<db-name>"
}

back to top

Usage

There are stored procedures for each CRUD operation:

  • Create: createNewUser
  • Read: getUsers and getUserByID
  • Update: updateUser
  • Delete: deleteUser

and they are called from API:

  • Create:
    • <hostname>:<port>/users/create (POST Method)
  • Read:
    • <hostname>:<port>/users/<_id> (GET Method)
    • <hostname>:<port>/users (GET Method)
  • Delete:
    • <hostname>:<port>/users/<_id> (DELETE Method)
  • Update:
    • <hostname>:<port>/users/<_id> (PUT Method)

back to top

Roadmap

See the open issues for a full list of proposed features (and known issues).

back to top

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your feature branch (git checkout -b feature-<feature-name>)
  3. Commit your changes (git commit -m 'Add some <feautre>')
  4. Push to the branch (git push origin feature-<feature-name>)
  5. Open a pull request

back to top

License

Distributed under the MIT License. See LICENSE.txt for more information.

back to top

Contact

Erick Andrés Obregón Fonseca - erickobregonf@gmail.com

Project Link: https://github.com/ErickOF/CRUD-Flask-SQLServer

back to top

Acknowledgments

back to top

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published