COMPLETE No-Nonsense VSCode Setup for Python Devs

COMPLETE No-Nonsense VSCode Setup for Python Devs

ArjanCodes

4 месяца назад

75,075 Просмотров

Ссылки и html тэги не поддерживаются

1+2=


Комментарии:

@geozeke
@geozeke - 26.11.2024 18:30

Great video, Arjan! I wonder why you manually built the sample package. In uv: "uv init my_project --package" does it all for you ;-)

Ответить
@jeshunsballe3885
@jeshunsballe3885 - 26.11.2024 20:36

Awesome walkthrough. Thanks for sharing! I really have become fond of devcontainers. I can't go back as this solved my virtual env woes for any project and helped me tackle some CI/CD issues so much faster. Would love to see what you do with devcontainers at Arjan Codes 🤩

Ответить
@andriy7642
@andriy7642 - 27.11.2024 03:39

If only Jetbrains AI assistant supported Claude 3.5 Sonnet..

Ответить
@MarkEdwards-e7t
@MarkEdwards-e7t - 27.11.2024 11:13

Thanks for sharing such valuable information! I need some advice: I have a SafePal wallet with USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How can I transfer them to Binance?

Ответить
@dasd01
@dasd01 - 27.11.2024 11:45

"files.autoSave": "onFocusChange" is a life saver for someone like me, who can sit and "debug" why my code does not work, and after 10 minutes or so realize that I had not saved.

Ответить
@VojtechMach
@VojtechMach - 27.11.2024 17:23

Great advice, thanks. I myself spent a lot of time on the pytest import troubles. It is a rabbit hole which I crawled out of with different opinions and no solid answers. Maybe you might have also mentioned how to fix that also for other team members who do not use VSCode.

Ответить
@kevinc.7730
@kevinc.7730 - 27.11.2024 19:50

If you haven't yet, I recommend looking into devbox.

Ответить
@Martin-lv1xw
@Martin-lv1xw - 27.11.2024 20:51

Thanks Arjan. Great stuff.

Ответить
@jonbig04
@jonbig04 - 27.11.2024 22:48

Looking forward to the full UV walk through!

Ответить
@Soltaiyou
@Soltaiyou - 28.11.2024 00:50

Great content as always. I’ve used Dev Containers for a project. Worked well other than some odd github errors. When are you going to do a video on your mechanical keyboard? And a final suggestion. You should sell Arjancodes hoodies since you seem to like hoodies.😂😂😂 I would totally buy one with some tulip bulbs I have.

Ответить
@calumandrewmorrell1223
@calumandrewmorrell1223 - 28.11.2024 04:33

Honestly, I find the best way to setup VSCode for Python is to install PyCharm. I also love Neovim, but it's just too much effort to avoid working ON Neovim rather than working IN Neovim.

Ответить
@Gigusx
@Gigusx - 28.11.2024 14:48

UV is very sketchy. It's written in Rust but describes itself as "extremely fast". Everyone and their grandma knows that Rust projects are BLAZINGLY fast!

Ответить
@alexanderminidis157
@alexanderminidis157 - 29.11.2024 22:05

what kind of keyboard is that?

Ответить
@RohitSharma-wx2ky
@RohitSharma-wx2ky - 29.11.2024 23:34

I'd highly recommend the GitGraph extension. It's lightweight and does everything I need it to do fast. Best way to view and navigate commits and diffs visually!!

Ответить
@konstantinosmaravegias4198
@konstantinosmaravegias4198 - 30.11.2024 15:00

Thanks a lot for this high quality video. Pretty helpful since I had never invested time touching my settings.

I have a question, why not just specify the src directory as a package within the pyproject.toml file (under [project] or for poetry users [tool.poetry]?

If we have to set up a worfklow to build and test the code every time we push, i do not think this will work. Am I missing something?

Ответить
@eswarnichtsmehrfrei
@eswarnichtsmehrfrei - 30.11.2024 15:02

Postman is evil software

Ответить
@MrByungkooklee
@MrByungkooklee - 01.12.2024 05:37

i like this thank you

Ответить
@29Mohit29
@29Mohit29 - 01.12.2024 14:16

Waiting for your detailed video on uv🥳

Ответить
@remace07
@remace07 - 02.12.2024 00:20

Hi, have You already tried devcontainers under vscode for fastapi development? if yes and by any miracle you found out how to configure this for a basic fastapi+database instance on vscode, could You make a tutorial on this?

Ответить
@joraith7536
@joraith7536 - 02.12.2024 00:43

Devcontainer pls!!

Ответить
@ivanmaglica264
@ivanmaglica264 - 04.12.2024 22:02

My recommendation: dev-containers. Absolute godsent!

Ответить
@nate998877
@nate998877 - 04.12.2024 23:30

I have 172 Extensions installed right now. Down from ~250. A bunch of them are junk, but I've found some useful extension in my searching. Better comments + TODO Highlight + Todo Tree all pair nicely for searching a codebase for all the things that never got done.

I like njpwerner.autodocstring, alefragnani.Bookmarks, kamikillerto.vscode-colorize, pranaygp.vscode-css-peek, Everyone should know eamodio.gitlens, nhoizey.gremlins <- lifesaver, oderwat.indent-rainbow, johnpapa.vscode-peacock is nice for when you're too lazy to color code projects yourself, pnp.polacode for the socials, chrmarti.regex if you write a lot of regex, WakaTime.vscode-wakatime, If you're getting deep into it lehni.vscode-fix-checksums is nice when microsoft starts complaining about the horrible things you've done.

God so many of the extensions are just extended language support...

Ответить
@domdog111
@domdog111 - 05.12.2024 20:38

LOL!!! I am 13 min. into the video and everything so far is nonsense. For learning and even first pretty darn large projects this is a drag on learning....too many parts and pieces in the air, that take away concentrations needed for learning or even just basic problem solving. Text editor and interpreter i is fast. The only dodad that seems worth it is git but even that is a pain. 'Hey lets learn this other programing language to learn this programing language. It's endless if you even step on foot in that direction. IMO

Ответить
@mahdifa6027
@mahdifa6027 - 06.12.2024 18:54

thanksssssss😃

Ответить
@digiryde
@digiryde - 07.12.2024 00:54

Nice Setup instructions.

Ответить
@keithmarston4026
@keithmarston4026 - 14.12.2024 22:50

As alsways a great video - dev containers do look cool - I have played a little with them but... Should make dev test and build enviroments even more pridictable and repeatable

Ответить
@EliasHansenu7f
@EliasHansenu7f - 19.12.2024 15:10

The video is awesome, but is pointing on, Python is missing a more general build tool like Rust has. The vscode config is a bad place for a project structure.

Ответить
@DenizDemirsoy
@DenizDemirsoy - 20.12.2024 22:15

The video is very usefull. Thank you! I just want to share an issue i had with using content from your git repo. It includes the setting explorer.excludeGitIgnore": true. When you list .env and .log files in .gitignore, they become invisible in the vscode explorer

Ответить
@zxy7900
@zxy7900 - 22.12.2024 10:46

I am from China and my English listening is not good. Can you please upload subtitles? I like you very much

Ответить
@Amapramaadhy
@Amapramaadhy - 22.12.2024 21:07

if you do a uv video, pls pls cover actual project management, e.g., how to update dependencies (direct vs indirect). Everyone conveniently skips this part. Adding/removing is trivial. Another source of confusion is directory setup (src vs flat layout) such that vscode can correctly pick up pkgs and tests

Ответить
@demolazer
@demolazer - 23.12.2024 15:47

My boss at work wants us all to use VS Code to align on tooling or some nonsense. Luckily it has a Neovim extension. The only problem I have is I cant stand the red and yellow lines coming up as I type, but I want to keep the helpful autocomplete and auto docs. I cant figure out how to have one or the other. The glorious feature of Neovim is no lint highlights while typing in insert mode, while normal mode shows me.

Ответить
@sanGuziy
@sanGuziy - 24.12.2024 17:15

I am not sure you need _init_ in the src folder if src is in your python path, unless you plan to do from src import, but the you would have to add the project root to path.

Ответить
@jasonzions7308
@jasonzions7308 - 31.12.2024 02:05

It would be awesome if you covered how vscode settings work when you're using WSL in Windows; there appears to be a setting tab between "user" and "workspace" which covers the WSL "remote". (The default setup for using VSCode with WSL is "Windows version of VSCode connected to a Remove within the WSL environment".)

Ответить
@davidgomez2101
@davidgomez2101 - 01.01.2025 04:40

You are very good at what you do, sir.

Ответить
@_kopiter_
@_kopiter_ - 06.01.2025 23:33

wtf is line length 88 :D

Ответить
@Polydipsic21
@Polydipsic21 - 09.01.2025 09:58

Am I the only one who's very happy now to see that a pro software engineer like Arjan also puts his vscode's sidebar at left? I mean I wonder why it's not the default setting in vscode! Before watching this awesome video, I felt like a weirdo among other engineers just for using such a unique IDE configuration! What a relief!
Anyways, all of these vscode tips are golden and this tutorial is worth watching a thousand times. Thanks al lot bro.

Ответить
@ManuelSchulte007
@ManuelSchulte007 - 24.01.2025 22:18

Hi @ArjanCodes, I'm using VScodium (a free and completely opensource variant of VSCode, which does'nt have the non-free MS specific bits, nor the telemetry stuff). In that version, it seems that the setting "python.analysis.extraPaths" is not supported (it remains dimmed out in my workspace settings.json file, indicating it is not recognised). As for the extensions, I'm using the classic Python and Python debugger MS extensions, plus the Black formatter, isort and Flake8 extensions from MS (ms-python). Additionally, because I'm using Linux and Bash, I also have ShellCheck, and for code analysis, I've installed the SonarLint (from SonarQube) to keep code smells and complexity in check. Thanks for sharing your knowledge! Cheers!

Ответить
@ksrsundar
@ksrsundar - 28.01.2025 21:52

There’s a nice extension called peacock for managing title bar colors for identifying project..

Ответить
@RogerValor
@RogerValor - 06.02.2025 13:31

I struggled a long time actually to get python management correct in windows and make vscode use your virtual environment correctly, and also had issues with pyenv previously installed on one system using uv. It is especially annoying if your python project is a subfolder of a bigger project, I have not found better solutions yet than to open the subfolder as new project. Should not be a problem for anything that uses only one main python deployment in the root folder. But generally uv has taken python into the direction of finally working out of the box, even if not at the level yet as I experience it in rust with cargo. I also really like the project manager plugin (by alessandro fragnani) in vscode, which also works well together with workspace setting files.

Ответить
@ramirotell
@ramirotell - 17.02.2025 19:29

Everything works like a charm, but i can't get "Run Python File" in VsCode to work and derect the modules inside /src when expecting to evaluate if _name_ == "__main__", is there a missing config entry for this in VsCode?

Ответить
@Hydravine
@Hydravine - 28.02.2025 20:18

GIVE ME SYNTHWAVE84 COLOR SCHEME OR GIVE ME DEATH

Ответить
@quillaja
@quillaja - 02.03.2025 10:47

why wouldn't you just install the project's package into the venv instead of using a vscode specific setting?

Ответить
@gizmoitus
@gizmoitus - 04.03.2025 01:57

Great video. Started using uv myself recently, and can highly recommend.

Ответить
@asmodeodh
@asmodeodh - 04.03.2025 13:41

HELL YEAH!!!! i was about to burn my pc!

Ответить
@the78mole
@the78mole - 15.03.2025 14:59

You can fix it once and for all with using devcontainers. Just set it up correctly and all your team members work in the same environment. "works on my machine" is simply gone this way. And even better, the CI (e.g. GitHub Actions) can use the same environment and also Codespaces just work. This is, how I do my Python development since a few month. I also heard, that the support for devcontainers on Windows is getting better and better (not a surprise, since VSCode and devcontainers come from Microsfot itself).
PS: At work we use this already in almost any GitHub Repository, e.g. our infrastructure repository that contains ansible playbooks, roles,... The devcontainer simply provides the correct python and ansible versions and all other tools needed to administrate our servers, VMs,... And guess what, "works on my machine" simply vanished. When new team members join, it is a matter of minutes to get them to speed instead of having a large README, what and where to install stuff...

Ответить
@Darrell-z3n
@Darrell-z3n - 18.03.2025 23:32

Is there a way to save the folder settings into some kind of template so when I work on multiple Python projects, I can use this template as a starting point?

Ответить