vibeview.importers¶
Third-party importer discovery for vibe-view.
Importer packages register one object in the vibeview.importers entry
point group. The object may be an ImporterSpec or a zero-argument
factory returning one. Keeping the contract in this small, renderer-free
module lets chemistry codes add file support without depending on vibe-view’s
web or desktop stack.
Functions
Return successfully loaded importers in deterministic order. |
|
Clear discovery state after installing a plugin in this process. |
|
|
Run one plugin and validate its QVF output before returning it. |
|
Return the first installed plugin accepting |
Load installed importer plugins, isolating failures per plugin. |
|
|
Return the installed importer named |
Classes
|
Versioned contract implemented by a third-party file importer. |
|
One discovered entry point, including isolated load failures. |
Exceptions
An importer could not be loaded or did not produce a valid QVF. |
- exception vibeview.importers.ImporterError[source]¶
Bases:
ValueErrorAn importer could not be loaded or did not produce a valid QVF.
- class vibeview.importers.ImporterSpec(format_name, description, extensions, convert, stems=(), probe=None, data_kinds=('structure',), api_version=1)[source]¶
Bases:
objectVersioned contract implemented by a third-party file importer.
format_nameis the stable CLI name used by--from. Extensions include their leading dot and are matched case-insensitively. Exactstemscover extensionless formats such asPOSCAR. A customprobemay inspect a path when suffix matching is insufficient.convertmust return a complete QVF archive as bytes or a readable binary file object positioned anywhere; vibe-view rewinds and validates the archive before it reaches the caller.- Parameters:
- class vibeview.importers.ImporterStatus(entry_point, distribution, spec, error=None)[source]¶
Bases:
objectOne discovered entry point, including isolated load failures.
- Parameters:
entry_point (str)
distribution (str | None)
spec (ImporterSpec | None)
error (str | None)
- spec: ImporterSpec | None¶
- vibeview.importers.discover_importers()[source]¶
Load installed importer plugins, isolating failures per plugin.
- Return type:
tuple[ImporterStatus, …]
- vibeview.importers.clear_importer_cache()[source]¶
Clear discovery state after installing a plugin in this process.
- Return type:
None
- vibeview.importers.available_importers()[source]¶
Return successfully loaded importers in deterministic order.
- Return type:
tuple[ImporterSpec, …]
- vibeview.importers.get_importer(format_name)[source]¶
Return the installed importer named
format_name.- Parameters:
format_name (str)
- Return type:
ImporterSpec | None
- vibeview.importers.detect_importer(path)[source]¶
Return the first installed plugin accepting
path.- Parameters:
- Return type:
ImporterSpec | None