oxidized_importer Python Resource Types

The oxidized_importer module defines Python types beyond OxidizedFinder. This page documents those types and their APIs.


All types are backed by Rust structs and all properties return copies of the data. This means that if you mutate a Python variable that was obtained from an instance’s property, that mutation won’t be reflected in the backing Rust struct.


Represents a resource that is indexed by a OxidizedFinder instance.

See OxidizedResource for API documentation.

OxidizedResource Resource Types

Each OxidizedResource instance describes a particular type of resource. If a resource identifies as a type, it sets one of the following is_* attributes to True:


A Python module. These typically have source or bytecode attached.

Modules can also be packages. In this case, they can hold additional data, such as a mapping of resource files.

A built-in extension module. These represent Python extension modules that are compiled into the application and don’t exist as separate shared libraries.
A frozen Python module. These are Python modules whose bytecode is compiled into the application.
A Python extension module. These are shared libraries that can be loaded to provide additional modules to Python.
A shared library. e.g. a .so or .dll.


The PythonModuleSource type represents Python module source code. e.g. a .py file. See its linked API documentation for more.


The PythonModuleBytecode type represents Python module bytecode. e.g. what a .pyc file holds (but without the header that a .pyc file has).


The PythonExtensionModule type represents a Python extension module. This is a shared library defining a Python extension implemented in native machine code that can be loaded into a process and defines a Python module. Extension modules are typically defined by .so, .dylib, or .pyd files.


Properties of this type are read-only.


The PythonPackageResource type represents a non-module resource file.


The PythonPackageDistributionResource type represents a non-module resource file living in a package distribution directory