Skip to content

Add a Python: New Project command #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
karrtikr opened this issue Feb 5, 2023 · 6 comments
Open

Add a Python: New Project command #191

karrtikr opened this issue Feb 5, 2023 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@karrtikr
Copy link

karrtikr commented Feb 5, 2023

Creates and opens a new workspace folder set up for Python development. One way to do it could be:

  • Prompts to enter path to project with prefilled input, similar to:
  • Creates it and opens it as workspace
  • Runs Create Environment and selects it for workspace
  • (Optional) Creates a main.py entrypoint

We can use it in the first step of getting started to encourage users to start using projects and local environments, which right now isn't done if no project is already opened:

cc/ @cwebster-99

@karrtikr karrtikr added the feature-request Request for new features or functionality label Feb 5, 2023
@karrtikr karrtikr changed the title Add a Python: New Project command Add a Python: New Workspace command Feb 7, 2023
@karrtikr
Copy link
Author

karrtikr commented Feb 7, 2023

Based on discussion, "Project" can be interpreted to contain config files and more. As folder is meant to be empty, it's best if we use other terminology, "Workspace" instead could work better.

@luabud
Copy link
Member

luabud commented Feb 7, 2023

I really really like this idea and it's definitely something we hear as something folks missing when trying Python in VS Code for the first time.

@cwebster-99

This comment has been minimized.

@cwebster-99

This comment has been minimized.

@cwebster-99

This comment has been minimized.

@cwebster-99 cwebster-99 changed the title Add a Python: New Workspace command Add a Python: New Project command Feb 11, 2025
@cwebster-99 cwebster-99 transferred this issue from microsoft/vscode-python Feb 14, 2025
@cwebster-99
Copy link
Member

Aligning conversations for the most up to date direction for a Python: Create Project command. We currently have experimental support or new project creation when uv is installed. We want to build upon this API so any tool can provide a project creation flow, and we provide a default experience using pip if the user does not have a tool of choice installed.

We can follow the templates in vscode-python-templates for structure but our core default project templates should be:

  • Package
  • Script
  • FastAPI
  • Django
  • Flask

I suggested we use the default Django project CLI commands to build the project but we may need to provide a default structure for FastAPI and Flask. We can reach out to FastAPI, Flask, and Django communities for feedback on our approach as well!

For each project, we should:

  • Create and name a workspace folder
  • Create a virtual environment
  • Add a README.md
  • Add tests subdirectory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants