index.toml
index.toml
Python API and CLI for ecosystem-neutral package indexes
Overview · Installation · Quick Start · Usage · API · Contributing · Governance · License
Overview
Summary
Install the public Python API and the index-toml command through one distribution. The facade composes the editor, CLI, and the three workspace adapters.
Why This Package
The package index records package ownership and dependency directions across ecosystems.
When to Use
Use this component directly when you need the API below. Install the facade for the combined tool.
Features
One installation provides the CLI, file-backed API, and workspace reconciliation for Python, Cargo, and pnpm.
Non-Goals
The tooling analyzes manifests and inventories. Package managers resolve and install dependencies.
Getting Started
Prerequisites
Use CPython 3.10 through 3.15.
Installation
Install with uv
uv add index.toml
Install with pip
python -m pip install index.toml
Install with Poetry
poetry add index.toml
Quick Start
Example
Source: examples/quick_start.py.
from index_toml import loads
index = loads('schema_version = "1.0.0"\nlayers = []\npackages = []\n')
assert index["packages"] == []
Expected Result
The command or assertion in the quick-start example completes successfully.
Usage
Common Workflows
Source: examples/usage.py.
from pathlib import Path
from tempfile import TemporaryDirectory
from index_toml import IndexFile
with TemporaryDirectory() as directory:
index = IndexFile(Path(directory) / "index.toml")
index.initialize()
index.add_layer("core", order=10)
index.add_package("demo", layer="core", order=0, path="packages/demo")
assert index.get_package("demo")["path"] == "packages/demo"
Configuration
Use the schema version declared by your index. Resolve package paths from the workspace root.
Error Handling
Check validation exceptions or CLI exit codes before committing an index change.
Best Practices
Use a read-only reconciliation check in CI and review sync previews before writing.
Package Boundary
What It Owns
The owning repository layer is facade. The root inventory identifies the package and its allowed dependencies.
Public API and Import Surfaces
Use index_toml.IndexFile, load, loads, check_workspace, and sync_workspace in Python, or index-toml in a shell.
Entry Points
console_scripts→index-toml→index_toml.cli:main
Injected Dependencies
Use explicit paths when tooling runs outside the workspace root.
Protocol Consumers
The reconciliation engine consumes the shared workspace adapter protocol.
Extensions
A new ecosystem adapter implements normalized names, member discovery, and dependency edge reporting.
Operations and Readiness
Operational Requirements
Use a readable local checkout. Index mutation also requires write access to the index directory.
Health and Observability
Inspect validation diagnostics and reconciliation differences to locate manifest drift.
Security and Resource Limits
Use workspace paths you trust and review proposed writes before applying them.
Compatibility
The Python distributions support CPython 3.10–3.15. The index reader accepts schema 1.0.0 and 1.1.0.
Verification
Tests
See the linked test source and run the workspace suite with uv.
Certification Status
Read the SSOT release records for the assurance scope of each released version.
Evidence
The validation workflow records workspace, installed-artifact, and SSOT-linked results.
FAQ
Why
A package inventory gives CI a common view of package membership and declared relationships.
How
Use the adapter that matches your native manifests and compare its discovery output with the inventory.
When
Reconcile the inventory whenever package membership or local dependency edges change.
Documentation and Related Packages
More Documentation
Schema and command guide · Package inventory.
Related Packages
The facade installs the CLI and core. The CLI installs the built-in adapters. The contracts package defines their shared types.
Project Links
Contributing
How to Contribute
Open a focused pull request with regression coverage for the behavior being changed.
Development Setup
Install the locked uv workspace and run pytest from the repository root.
Notes for Maintainers
Verify the hashes and clean registry installs of the artifacts selected for publication.
Governance
Ownership and Decision Making
The repository maintainers own package policy and review release scope.
Standards and Policies
The root index owns package membership and layer policy. The SSOT registry owns decisions, claims, and test links.
Lifecycle and Migration
Preview schema upgrades first. The tool still reads both supported schema versions.
License and Attribution
License
Licensed under Apache-2.0. See LICENSE.
Notices
See NOTICE for attribution.
Metadata
Release files for index.toml 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| index_toml-0.3.3.tar.gz | 12.0 kB | Without provenance | Details for index_toml-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| index_toml-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for index_toml-0.3.3-py3-none-any.whl |
Total release size: 21.9 kB
Release files / index_toml-0.3.3.tar.gz
| Download URL | index_toml-0.3.3.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74ed8bff9ebbfe3b98a0ef4c8165b8256edc19ed241fee4d64fbcd2c02b022fc
|
|
BLAKE2b-256 checksum How to use checksums |
1b4679a29e05b1f78ef64f0bd46db9e092d4f4cddc8b2d034f73d9ec8aa706db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / index_toml-0.3.3-py3-none-any.whl
| Download URL | index_toml-0.3.3-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5a8625333fbb6db63cce641843f93ad50726adeb53c86dec845341ba5a5b01c
|
|
BLAKE2b-256 checksum How to use checksums |
9d9b5e09dd6dc89f2ae6eb6225f5a1735498748caf0890302f8ce9dae1931b3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for index.toml 0.3.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.