PyCharm
 
2021.2
Get PyCharm
You are viewing the documentation for an earlier version of PyCharm.

Populating Projects

Last modified: 19 October 2021

Populate your project by creating new elements of various types ( directories , packages and files). PyCharm suggests the following alternative ways of accessing the corresponding functionality:

  • File | New from the main menu.

  • The New context menu command.

  • The keyboard shortcut Alt+Insert.

As a result, the New menu is shown in which you select the type of an element to be created.

For generating PyCharm-specific elements, refer to Django section.

PyCharm makes it possible to create Python packages recursively, thus creating the whole package structure.

The Python package nodes are marked with the package icon.

Now that you created a package, you can do the following:

  • Import the package into the project files. Use code completion to discover it.

  • Commit and push the package into a VCS repository.

  • Install the package in a virtual environment locally or from VCS so that you can use it in your other projects with that environment.

If you want to ensure that imports from the same directory are resolved, mark that directory as a namespace package.