Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Need to know which package is dependent on another? Pipenv has a convenient graph feature to do just that.
Additional Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Isn't Pipenv pretty impressive thus far?
0:00
One last thing here that's pretty helpful.
0:03
If you need to see what dependencies
are reliant on one another,
0:05
you can easily generate a dependency
graph with Pipenv, pipenv graph.
0:10
This shows the top level dependencies and
which packages they depend on.
0:16
graph can take a few flags,
which can be helpful as well.
0:22
Clear, we can get our graph back in JSON
0:27
format with, pipenv graph --json.
0:32
And if we run pipenv graph --reverse,
0:38
We'll find the sub-dependencies first,
and what is reliant on them.
0:45
This can be very helpful when attempting
to figure out dependency conflicts.
0:50
Finally, there is a built-in security
check that tests against PEP 508
0:54
requirements and package safety.
0:58
We do pipenv check.
1:03
Whew, it all passed.
1:07
Check the teacher's notes for
more information on 508 requirements.
1:10
Pretty nice, right?
1:14
With adding Pipenv to your toolbox,
1:16
you get the benefits of
a streamlined development workflow,
1:18
with virtual environment,
dependency management, and security.
1:21
We've looked at Pipfile and
Pipfile.lock, to see how Pipenv
1:26
separates abstract dependency declarations
to manage our project environment.
1:31
We also saw how to generate
a dependency graph.
1:36
Pipenv is a great tool to
have in your Python toolkit.
1:40
It allows pip and virtualenv to be
consolidated into an easy-to-use,
1:43
single interface.
1:47
I would encourage you to try
it out in your next project.
1:49
Be sure to share your thoughts in
the Treehouse community forum, or
1:53
reach out to me on Twitter.
1:56
Until next time, happy coding.
1:58
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up