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