222: Import within a Python package
Listen now
Description
In this episode we're talking about importing part of a package into another part of the same package. We'll look at: `from . import module` and `from .module import something` and also:  `import package` to access the external API from with the package. Why would we use `import package` if `from . import api` would work fine?  Learn pytest pytest is the number one test framework for Python.Learn the basics super fast with Hello, pytest!Then later you can become a pytest expert with The Complete pytest CourseBoth courses are at courses.pythontest.com
More Episodes
Published 09/07/24
We've got some code we want to test, and some tests.The tests need to be able to import the code under test, or at least the API to it, in order to run tests against it.How do we do that? How do we set things up so that our tests can import our code? In this episode, we discuss two...
Published 06/03/24
PyCon US is just around the corner.  I've asked Rob Ludwick to come on the show to discuss how to get the most out of your PyCon experience. There's a lot to do. A lot of activities to juggle, including actual juggling, which is where we start the conversation. Even if you never get a chance to...
Published 05/04/24