Skip to content

A universal template for Python projects in VSCode using Dev Containers and Poetry

License

Notifications You must be signed in to change notification settings

Apreche/python-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Template

This is my template for new Python projects in VSCode. VSCode devcontainers are used for local development. Poetry is used for Python dependency management.

Instructions

  1. Install Docker
  2. Install VSCode
  3. Install the VSCode Dev Containers Extension
  4. Copy this directory to the desired location and rename it as appropriate
  5. Remove the .git directory. Use git init to start a new repo
  6. Open the directory in VSCode
  7. When prompted, choose "Reopen in Container". Alternatively choose Dev Containers: Rebuild and Reopen in Container from the command palette
  8. If this is a brand new project, a terminal will appear with prompts to initialize Poetry
  9. Develop some software!

Notes

The Python environment will automatically be activated within the VSCode integrated terminal. If for some reason that doesn't work, closing the terminal and opening a new one should fix it.

The Ruff extension will automatically lint Python files. Feel free to change this if you don't like it.

The Jupyter extension is installed, and notebooks will work out of the box. Just make sure to select .venv/bin/python as the kernel.

About

A universal template for Python projects in VSCode using Dev Containers and Poetry

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published