Coder Social home page Coder Social logo

next-python's Introduction

next-python

First python project

Contacts API

This is my first Python project, developed alongside a Next.js frontend application. This project demonstrates a simple contacts management API built using Flask, Flask_SQLAlchemy, and Flask_CORS. The API allows you to create, read, update, and delete contact information, complete with status validation and role assignments.

Features

  • CRUD Operations: Create, Read, Update, and Delete contacts.
  • Status Validation: Ensures contacts have valid status types (Customer, Personal, Employees, Office, Staff).
  • Field Management: Includes additional fields like phone number, role, and company name.
  • CORS Support: Enabled via Flask-CORS to allow cross-origin requests, useful for frontend integration.

Technologies Used

  • Backend: Flask, Flask_SQLAlchemy, Flask_CORS
  • Frontend: Next.js (to be developed/integrated)

Endpoints

  • GET /: Retrieve all contacts.
  • GET /contact/{id}: Retrieve a single contact by ID.
  • POST /contact: Create a new contact.
  • PUT /contact/{id}: Update an existing contact by ID.
  • DELETE /contact/{id}: Delete a contact by ID.

Run the backend

  1. Clone the repository:

    git clone https://github.com/dhiraj512/next-python.git
    cd next-python/backend
  2. install dependencies:

    pip install -r requirements.txt
  3. Run the application:

    python main.py
  4. Test the API using Postman or any other API client.

Run the frontend

    cd next-python/frontend
    npm install
    npm run dev

Contributing

Feel free to fork this project, make your changes, and submit a pull request. Any contributions to improve this project are welcome!

next-python's People

Contributors

dhiraj512 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.