iridium-core
Local AST extraction, dependency graph assembly, SQLite cache, and payload models for Iridium security scanning.
No network I/O. No httpx dependency.
Install
pip install iridium-core
Library API
WorkspaceIndexer
Primary entry point — indexes a repository into a ClientScanPayload:
from pathlib import Path
from iridium_core import WorkspaceIndexer
indexer = WorkspaceIndexer(Path("/path/to/repo"))
payload = indexer.index()
print(payload.dependency_count, payload.entrypoint_count)
print(payload.languages)
print(payload.to_json())
Options:
| Parameter | Default | Description |
|---|---|---|
use_cache |
True |
SQLite AST cache (WAL, cross-mount fallback to ~/.cache/iridium) |
use_process_pool |
True |
ProcessPool batches for large repos (disable for small targets) |
extractors |
DEFAULT_EXTRACTORS |
Custom LanguageExtractor plugins |
Payload validation
from iridium_core.models.payload import ClientScanPayload
validated = ClientScanPayload.model_validate(payload.model_dump())
api_dict = validated.to_api_dict() # ready for POST /api/v1/client/scan
Modules
| Module | Purpose |
|---|---|
iridium_core.extract |
Python/JavaScript LanguageExtractor plugins |
iridium_core.graph |
Tarjan SCC, bounded BFS, adjacency |
iridium_core.deps |
Lockfile parsing (pip, npm, etc.) |
iridium_core.sanitize |
Pre-AST scrubbing (PEM, JWT, API keys) |
iridium_core.cache |
Content-addressed AST cache |
iridium_core.git |
Tree hash / commit fingerprint |
Development
Part of the Iridium monorepo. From repo root:
uv sync
uv run pytest packages/iridium-core/tests -v
Metadata
Release files for iridium-core 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iridium_core-0.5.0.tar.gz | 19.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iridium_core-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.8 kB
Release files / iridium_core-0.5.0.tar.gz
| Download URL | iridium_core-0.5.0.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ec46521274932686059c08385908fecb4bd8b902142bbb602b2edfb1d3bad77
|
|
BLAKE2b-256 checksum How to use checksums |
d20b501d7f433979b6ee479891efa7893ee98d1cb7bb2394cbda93c357cedf3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.
Transparency logRelease files / iridium_core-0.5.0-py3-none-any.whl
| Download URL | iridium_core-0.5.0-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bbae124e8dae6393389e7457aff2108ed5b37621393e6a27a09575bedfd8523
|
|
BLAKE2b-256 checksum How to use checksums |
ff8b8302dcb2966c92ccefeac327283f6926634d126940fc494fe4f5f927626c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.
Transparency log