Modern Python Projects Transcripts
Chapter: Managing Python project
Lecture: Other tools

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Apart from poetry. Another good project management tool is the pipenv. It doesn't have the functionality to publish to pypi,
0:08 but it has all the other features. It automatically creates virtual environments, and it resolves dependency versions. If you are a data scientist,
0:17 or if you work on Windows, you might already be familiar with the next tool.
0:21 It's called conda, and it's a Python project management tool combined with a Python package installer. And as you can see from the documentation,
0:29 you can use it not only for Python but also for other programming languages.
0:32 conda does not use pip, so it doesn't install packages from the pypi Python package index. Instead, it installs packages from its own server,
0:42 and those packages are always in the binary format. What it means is that they're all bundled with dependencies. When you install a package using pip,
0:51 it's not always in a binary format, so pip try to build this package from the source files on your computer.
0:58 If you are missing some dependencies and I don't mean Python dependencies, but rather some Linux tools required to compile that specific package,
1:07 pip will fail to install it, so that's a bummer. On the other hand, if use conda,
1:13 it downloads a package, and that package contains all the dependencies, which means that it will always install,
1:19 but it has to be first built by someone and pushed to conda Repository. It's not a problem for the most popular packages,
1:27 but some less popular ones might not be there. So, you have to build them and push them yourself. In general, if you're a Python programmer,
1:35 I recommend that you stick with pip instead of conda. But if your team is already using conda or if you're really struggle with installing packages
1:43 using pip conda can be a good alternative. I'm not a Windows user myself,
1:48 but I have seen a lot of people using Conda windows because it makes installing packages
1:53 much easier. So there's nothing bad about using conda, as long as it gets the
1:57 job done. Just keep in mind that Conda is maintained by an external company, not by the Python foundation itself,
2:04 so there is no guarantee that one day they won't simply disappear or that they won't make you pay to use their tool.
2:11 But that's something to keep in mind for each external tool and dependency. Next, we have flit. If you're looking for a tool just to help you
2:19 publish your projects in pypi, check out flit, flit does Only that. It provides commands to simplify publishing PyPI packages.
2:28 So first you run flit in it. That will generate a pyproject.toml, which is a replacement for setup.py. And then when you run flit publish,
2:36 it will generate all the necessary files and publish your package on PyPI.
2:41 So it's a good alternative to poetry if you don't really need a tool to manage your project, but just to publish it.
2:48 And finally, a bit less known tool. At least at the time of recording this tutorial, we have Dephell. It's one tool to do everything.
2:57 Resolving, installing and locking your dependencies, managing virtual environments, building pip packages,
3:04 running security audit on your dependencies to show you the outdated one. It could even convert between different configuration files.
3:11 So, when you're moving from, let's say pipenv to poetry. You can use this, and it can even isolate CLI tools just like pipx does. On top of that,
3:21 it can generate some files like license authors, etcetera. So if you're looking for one mega tool to do everything, dephell might be a good candidate,
3:30 but I have never used it personally.


Talk Python's Mastodon Michael Kennedy's Mastodon