Configure projects in PyCharm
Whatever you do in PyCharm, you do that in the context of a stick out. A project is an organizational unit that represents a complete software solution. It serves as a basis for coding aid, bulge refactoring, coding expressive style consistency, and therefore on .
A project in PyCharm is represented in the Directory Based Format. A project directory is marked with icon. such stick out directory contains the .idea directory, with the follow files :
- .iml file that describes the project structure.
- workspace.xml file that contains your workspace preferences .
- A number of xml files. Each xml file is responsible for its own set of settings, that can be recognized by its mention : projectCodeStyle.xml, encodings.xml, vcs.xml, and thus on. frankincense, for exercise, adding a new run/debug shape and changing encoding will affect two different xml files. This helps avoid unite conflicts when the project settings are stored in a adaptation master system and modified by the different team members .
All the settings files in the .idea directory should be put under adaptation control except workspace.xml, which stores your local preferences. The workspace.xml charge should be marked as ignored by VCS. .idea directory is not visible in the Project opinion of the Project tool window.
The directory structure of each project contains the .idea directory for the PyCharm-specific settings and the stick out file, and libraries. PyCharm suggests the follow types of projects :
- Pure Python plan is intended for pure Python scheduling. The directory structure of such project contains the .idea directory for the PyCharm-specific settings and the project charge, and libraries. Create a plain Python project as described in the Create a Python plan section. Python must be installed on your machine .
- Django project. This stick out type provides particular infrastructure of the Django applications, and all the necessary files and settings. Create a Django application as described in the Create a Django project section. Working with Django applications requires a database. Using SQLite is preferred, since it is pre-configured. If you are using a different database locomotive, make certain it is installed and configured by rights .
- Google App Engine project. This project type provides specific infrastructure of the Google App Engine application, and all the necessity files and settings. Create project as described in the Creating Google App Engine Project section .
- Flask undertaking. This project type provides specific infrastructure of a Flask lotion, and all the necessary files and settings. Create stick out as described in the Creating a Flask Project part .
- Pyramid project. This plan type provides specific infrastructure of a Pyramid application, and all the necessary files and settings. Create project as described in the Creating Pyramid Project section .
- Client-side projects HTML5 Boilerplate, Bootstrap, and Foundation. For the client-side applications, PyCharm creates particular infrastructure, with the compulsory files and directories. Create a project .
PyCharm Edu projects
This functionality is available in the PyCharm Educational ( Edu ) edition. You can enable it for PyCharm Community and PyCharm Professional via the EduTools plugin .
- educational project is intended for students, who want to learn Python. An educational project consists of the take after entities : The process of creating such a visualize is described in the Learner Start Guide .
- Course is intended for the educators. A course consists of the following entities :
- A run is just a project of a extra type. It consists of lessons .
- A lesson is a directory where the undertaking files are stored. Each moral can contain respective tasks .
- A job is a directory where the be files are stored :
- Task description which you have to type in the Task Description tool window
- The file with the extension .py, that contains the drill code and can contain answer placeholders
- the examination charge tests.py that helps you make sure that the students have fulfilled your task correctly .
besides a tax can contain more files required for fulfilling it .
- Answer placeholder
- An answer placeholder is a ensnare shown to the students that replaces and hides a character of your initial code. These placeholders should contain descriptions of actions to be taken by the students to complete the tasks. You have to create descriptions of these actions yourself. The beginning shiner pawl inside the answer placeholder selects the integral proxy ; the second sneak snap removes choice .
- If the students are not certain of themselves, they can view hints. The hints are besides created by the educators .
Besides these groups of files, PyCharm provides particular file test_helper.py that contains utilitarian functions, which a lecturer may use for writing tests. refer to the Educator Start Guide for details .
project settings apply to the current project only. They are stored together with other project files in the .idea directory in the .xml format. For case, projects keep VCS settings, code vogue spellchecker settings, the list of lyric injections, and so on. These settings are placed under adaptation control mechanically together with your application code when you send it to your VCS. To configure stick out settings, blue-ribbon PyCharm | Preferences for macOS ( Ctrl+Alt+S ) or File | Settings for Windows and Linux. In the Settings/Preferences dialogue, settings that are marked with the icon apply only to the stream project. other settings are global and apply to all existing projects . If you want to share project settings between already existing projects, you can use the Settings Repository or the Settings Sync plugin. You can besides export the settings to a ZIP archive and significance it later to other IDE instances. You can configure project settings not only for the current project, but for all projects that you will create late. This means that you can set the new default settings for your projects. You can configure settings not alone for the current stick out, but besides for all the projects that will be created late.
Configure default project settings
- From the main menu, select File | New Projects Setup | Settings/Preferences for New Projects .
last modified : 12 April 2022