A virtual environment is an isolated Python environment that can have its own packages and dependencies. Īnother advantage of Pyenv is that it allows you to create and manage virtual environments for each version of Python. It allows installing and switching between different Python versions, as well as creating and managing virtual environments for each version.Įxample: One of your projects requires Python 2.7 while another requires Python 3.8, you can use Pyenv to switch between versions without worrying about conflicts or compatibility issues. Pyenv is a simple tool to manage multiple versions of python on your local machine. After a lot of searching, I found a tool/library that helps manage multi versions of Python on a local machine quite efficiently and cleanly – named Pyenv (it’s quite similar to nvm on Nodejs if you’ve ever used it) Pyenv Since it’s heavy on disk and hard to control when working on projects with different Python versions, version overlap can also lead to unexpected errors. With the experience of working and fixing bugs on python caused by version errors, sometimes just changing the version (from 3.6 to 3.8) can fix the error and it comes with the fact that we have many versions on the local machine. Python has many versions and each version has its own features and characteristics, along with the libraries that come with and support in that version. approach many other frameworks in the ecosystem (personal experience hehe, everyone can use another way) 2. You can skip it if you want to write an API with FastAPI right away, but in my experience this is also a pretty important thing, if you have a clean environment, easy to switch versions will help you breathe easier and more confident if you continue. The most common is using django-rest-framework, with Swagger using django-rest-swagger with python2.x, using drf-yasg with python3.xīefore getting to the simple FastAPI implementation, let’s go through the environment setup that makes it easier to deploy and test with FastAPI later on. ![]() No – this is a limitation of a microframework compared to real frameworksĭjango is huge and therefore a bit complicated to learnįlask is easy to learn and quite simple to use It works better than DjangoįastAPI is one of the fastest web frameworks with native asynchronous support for added, highest performance among current python frameworks.įastAPI provides native asynchronous support It’s not the best in terms of performanceįlask is a micro web framework. mainĭjango’s community is now quite large and old with > 70k stars on Githubįlask’s community is also big now but not as big as Django’s with > 63k stars on GithubįastAPI’s community is fairly new with >57k stars on Github
0 Comments
Leave a Reply. |