Skip to content
Global sound
Test & Code

Test & Code

222: Import within a Python package

· 12 min · Episode 222

Show notes

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?

Website: pythontest.com

Live, last hour: 8,777 songs on 4,888 stations in 124 countries

Discover the world through radio

More ways to discover (9)

Heard something good? Save it, or open it straight away in Spotify.

★ Artist of the week The fastest riser on the radio this week
Your song here? From € 9 per week →
Radio 538 luisteren - Live!Popular right now