Python logo

Table of Contents

  • 5. The import system
    • 5.1. importlib
    • 5.2. Packages
      • 5.2.1. Regular packages
      • 5.2.2. Namespace packages
    • 5.3. Searching
      • 5.3.1. The module cache
      • 5.3.2. Finders and loaders
      • 5.3.3. Import hooks
      • 5.3.4. The meta path
    • 5.4. Loading
      • 5.4.1. Loaders
      • 5.4.2. Submodules
      • 5.4.3. Module specs
      • 5.4.4. __path__ attributes on modules
      • 5.4.5. Module reprs
      • 5.4.6. Cached bytecode invalidation
    • 5.5. The Path Based Finder
      • 5.5.1. Path entry finders
      • 5.5.2. Path entry finder protocol
    • 5.6. Replacing the standard import system
    • 5.7. Package Relative Imports
    • 5.8. Special considerations for __main__
      • 5.8.1. __main__.__spec__
    • 5.9. References

Previous topic

4. Execution model

Next topic

6. Expressions