A simple backend API built with Python and Flask for managing user data. This project supports basic CRUD (Create, Read, Update, Delete) operations for user management and is perfect for learning the fundamentals of backend development in Python. Built with dependency management using Poetry.
- 🌐 RESTful Endpoints: Easily manage user data with a set of intuitive endpoints.
- 📦 Flask Framework: Lightweight and easy to extend for more complex functionalities.
- 🛡️ Input Validation: Ensures valid data and handles errors gracefully.
- 💾 Extensible: Simple structure for further enhancements, like adding a database or authentication.
Follow these steps to set up the project on your local machine:
- Python 3.7+
- Poetry (for dependency management)
git clone https://github.com/your-username/user-management-api.git
cd user-management-apiUse Poetry to install all the necessary packages:
poetry installpoetry shellIn Windows :
python main.pyIn Linux :
python3 main.pyThe API will run on http://127.0.0.1:5000. You can now make requests to the available endpoints.
- GET /user: Retrieve a list of all users.
- POST /user: Create a new user. Requires name, email, and age in the request body.
- GET /user/: Retrieve a specific user by ID.
- PUT /user/: Update a user's information.
- DELETE /user/: Delete a user by ID.
curl -X POST http://127.0.0.1:5000/users -H "Content-Type: application/json" -d '{
"name": "John Doe",
"email": "[email protected]",
"age": 30
}'curl http://127.0.0.1:5000/usersFeel free to fork this project, create a branch, and submit a pull request! Any contributions are welcome.
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request
- Email: [email protected]
- GitHub: AxierPer
Thanks to the Python and Flask communities for providing great tools and documentation! Special shoutout to anyone who inspired you.
Enjoy building and happy coding! 🎉