What does _name_ do? Every Python module has a name, and _name_ used in a module contains the name of that module. This is a quick option for those who have operating systems or Python distributions. Install the version of scikit-learn provided by your operating system or Python distribution. It will provide a stable version and pre-built packages are available for most platforms. These double-underscore entities are referred to with the slang dunder. This is the best approach for most users. Python has many double-underscore entities, and they always have this pattern: two underscores, a word, and two underscores. The value of that new variable, Flask(_name_), is a new object that inherits from the class Flask - meaning it gets all the attributes and methods built into that class, which we have imported. The second line, which is new to you, begins with a new variable, app, which will be used in every Flask app. If your Python Flask project does not already have a virtual environment, then you can run the following commands to create one named 'venv' and activate it. As always, case matters, so note the lowercase f and the uppercase F. Uppercase Flask is a class from that library, and it must be imported. However, deploying a flask application that has been built with your main Python installation can be a. Lowercase flask is a Python library, which you have installed. Your website is now ready to deploy to an online server. The first line is a typical Python import statement. From flask import Flask app = Flask ( _name_ )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |