Skip to main content

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.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iridium-core 0.6.0
File Size Uploaded
iridium_core-0.6.0.tar.gz 20.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iridium-core 0.6.0
File Interpreter ABI Platform
iridium_core-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.2 kB

Release files / iridium_core-0.6.0.tar.gz

Download URL iridium_core-0.6.0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1b95e0aac2b367b344ba73c7d7a0bde8364810191e65e9976c35ddb8fefab641
BLAKE2b-256 checksum
How to use checksums
f4f614a09e675eee7218c63b2c6b59d4b76354c0ade6268b48b5568d6975c37a
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 Sep 13, 2026.

Transparency log

Release files / iridium_core-0.6.0-py3-none-any.whl

Download URL iridium_core-0.6.0-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60f81ce29879873bcadca1d7e9e80ba7593112c6b7ceee09f99518f5b6a24fda
BLAKE2b-256 checksum
How to use checksums
16679236a01ecba3702585088210b6b5c6d6d4aae3f146b04570d06ec44fc9e4
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 Sep 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page