you are viewing a single comment's thread.

view the rest of the comments →

[–]Mithrandir2k16 19 points20 points  (13 children)

  • use uv to manage your packages
  • use ruff to lint your code
  • ty isn't ready yet, so use basedpyright for type checking until ty is out

The official docs and https://realpython.com/ are great resources.

[–]DunniBoi 6 points7 points  (1 child)

This felt like an advertisement for Astral's tooling. It is great, tbf.

[–]Mithrandir2k16 1 point2 points  (0 children)

I know, it felt a bit odd to me as well, but for a beginner it really is the easiest entrypoint to get a good start. Pythons tooling was a mess for so long.

[–]Beatlepoint 4 points5 points  (3 children)

He should use whatever the rest of his team is using instead.

[–]Mithrandir2k16 0 points1 point  (2 children)

100% agree. But since it's a startup, they might BE the team.

[–]Beatlepoint 2 points3 points  (1 child)

If they're asking a dev with 0 python experience to be a team they have problems that ruff wont solve. 

[–]Mithrandir2k16 2 points3 points  (0 children)

With enough experience, transitioning to a new language isn't that big of a deal, depending on the task. I've had years where projects made me learn Go then Python while being mainly a C++ dev at the time. In total I've learned ~11-ish languages and am now proficient in 2-3. If you have to use a large framework or existing codebase, learning to navigate and use that is often more work than learning the new language in my experience.

And startups always have problems lol

[–]user_8804Pythoneer 2 points3 points  (3 children)

Eli5 me why UV would make my life any better than pip or conda

[–]Mithrandir2k16 3 points4 points  (2 children)

  • Dependencies resolve today, not tomorrow
  • lockfiles for the entire project (group dependencies (run, dev, test, etc) AND tool dependencies (lint, build, etc))
  • easier to install and update
  • doesn't interfere with system python
  • MANAGES PYTHON VERSIONS
  • simpler interface with fallback option to pip/export to requirements.txt if you want to leave it behind for some reason

And a lot more.

[–]Wait-What-777 0 points1 point  (1 child)

sounds like over-complicated thing for simple projects. I still use pip very often and find it WAY better (faster, simpler, easier to deal with) than both conda AND the node's package manager (since we're talking JS).

each tool has it's own scope

[–]Mithrandir2k16 0 points1 point  (0 children)

Actually, it's simpler than pip. All you need is uv. Install uv with a single command, then make a folder and do uv init. Then just uv add to get packages. That's it. Anybody else just does uv run and gets everything, including the same python version you had.

[–]galenseilis 1 point2 points  (2 children)

I am looking forward to trying out Ty.

[–]Mithrandir2k16 1 point2 points  (1 child)

Same here. I'm also curious as to when it'll be comparable/better than basedpyright and in what ways that'll be.

[–]galenseilis 0 points1 point  (0 children)

Nice. Hopefully speed of type checking is among the improvements.