r/learnpython • u/chinwikhlwi • 2h ago
Building My Own Postman Clone in Python
My first Python project: Postman Clone
I’ve been working on a small project called postman_clone to practice Python and learn more about how APIs and HTTP requests actually work.
I didn’t start with all these features at once. I started with the basics, then kept adding things as I learned. I worked with functions, conditions, user input, JSON, error handling, and HTTP requests, and little by little the project started becoming more complete.
Right now, my project can handle:
- GET
- POST
- PUT
- DELETE
- JSON request bodies
- An optional header
- An optional query parameter
- Basic error handling for requests and JSON
There’s still a lot I want to improve. I want to make the code cleaner, add support for multiple headers and query parameters, improve the error handling, and make the whole thing feel more like an actual API testing tool.
I’m still learning, so I’m posting the code here to get some feedback from people who have more experience with Python.
If you see something I could improve, or if there’s something you think I should add next, I’d really appreciate the advice 🙌
This is still a work in progress, but I’m happy with how far I’ve gotten so far.
1
u/throwaway980825152 2h ago
you're off to a cracking start, just watch out for how you're building the URL string manually with the query param, it'll bite you when you get to multiple params or ones with special characters
1
u/chinwikhlwi 1h ago
Thanks! Yeah, I see what you mean. I’ll keep that in mind and improve how I build the URL, especially for multiple query params and special characters.
1
u/chinwikhlwi 2h ago