Implementing a Zip File Importer in Python

A collection of posts involving what it takes to implement a zip file importer written entirely in Python code


Writing a Zip File Importer: The Loader

Part 3


For a zip file-based loader, luckily there is not much heavy lifting. Working with the finder led to the realization that zip files use / while users use whatever the hell they want for a path separator. With that path-managing code already dealt with, that leaves just implementing the importlib.abc.SourceLoader ABC. That…


Writing a Zip File Importer: The Finder

Part 2


When writing a finder like importlib.machinery.FileFinder it’s all about working with the storage mechanism you are trying to support. In this instance it’s making sure that the paths the finder is meant to work with are serviceable and being able to check if certain files exist.


Writing a Zip File Importer: The Path Hook

Part 1


There are essentially three parts to any importer in Python 3:

  1. The path hook
  2. The finder (meta or path entry)
  3. The loader

In three posts I hope to write about the creation of each needed class in order to come up with a new zip-based importer to…

Implementing a Zip File Importer in Python
Implementing a Zip File Importer in Python

A collection of posts involving what it takes to implement a zip file importer written entirely in Python code

More information

Followers