Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Application Development with PyCharm

You're reading from   Hands-On Application Development with PyCharm Build applications like a pro with the ultimate python development tool

Arrow left icon
Product type Paperback
Published in Oct 2023
Publisher Packt
ISBN-13 9781837632350
Length 652 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Quan Nguyen Quan Nguyen
Author Profile Icon Quan Nguyen
Quan Nguyen
Bruce M. Van Horn II Bruce M. Van Horn II
Author Profile Icon Bruce M. Van Horn II
Bruce M. Van Horn II
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Part 1: The Basics of PyCharm
2. Chapter 1: Introduction to PyCharm – the Most Popular IDE for Python FREE CHAPTER 3. Chapter 2: Installing and Configuring PyCharm 4. Part 2: Improving Your Productivity
5. Chapter 3: Customizing Interpreters and Virtual Environments 6. Chapter 4: Editing and Formatting with Ease in PyCharm 7. Chapter 5: Version Control with Git in PyCharm 8. Chapter 6: Seamless Testing, Debugging, and Profiling 9. Part 3: Web Development in PyCharm
10. Chapter 7: Web Development with JavaScript, HTML, and CSS 11. Chapter 8: Building a Dynamic Web Application with Flask 12. Chapter 9: Creating a RESTful API with FastAPI 13. Chapter 10: More Full Stack Frameworks – Django and Pyramid 14. Chapter 11: Understanding Database Management in PyCharm 15. Part 4: Data Science with PyCharm
16. Chapter 12: Turning On Scientific Mode 17. Chapter 13: Dynamic Data Viewing with SciView and Jupyter 18. Chapter 14: Building a Data Pipeline in PyCharm 19. Part 5: Plugins and Conclusion
20. Chapter 15: More Possibilities with Plugins 21. Chapter 16: Your Next Steps with PyCharm 22. Index 23. Other Books You May Enjoy

Working with PyCharm’s HTTP Requests

When we generated our project, PyCharm created two files. It created main.py, which we have already examined. It also created a file called test_main.http. This file is unique to PyCharm. Let’s examine the file shown in Figure 9.7:

Figure 9.7: The HTTP test file generated by PyCharm as part of a FastAPI project

Figure 9.7: The HTTP test file generated by PyCharm as part of a FastAPI project

You’ll find the file itself directly next to main.py (1). We mentioned this as one of the popular conventions for the placement of test files – right next to the file we’re testing. It is called test-main.http, which lets us know exactly what is being tested. The main.py file will contain endpoints and test_main.http will then contain tests for all the endpoints.

This http test file isn’t code, as we saw in Chapter 6, Seamless Testing, Debugging, and Profiling. This is a specification for HTTP requests. Positions (3) and (4) reveal one test per endpoint in main.py...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime