Collection of high-level tools to simplify everyday development tasks, with a focus on AI/ML
pip install corio==2.14.5 Copy PIP instructions
Corio is a practical Python toolkit for building small services, automation, data pipelines, and AI/ML support code without re-solving the same project plumbing every time.
It bundles the pieces that tend to sit between "standard library" and "application code": typed paths with serialization helpers, pydantic-friendly data models, CLI settings, structured logging spans, iterator progress, FastAPI/MCP endpoint scaffolding, release metadata generation, test environment generation, and opt-in integrations for docs, Docker, search, tabular data, PDFs, OpenAI, Home Assistant, DNS, caching, encryption, and more.
Corio is organized as one package with optional extras. Install the small core by default, then opt into the heavier tools a project actually needs.
pip install "corio[api]" pip install "corio[tabular]" pip install "corio[db.search]" pip install "corio[infra]" Why Use It Use paths as real application objects. Read and write JSON, YAML, TOML, text, and derived paths directly from corio.Path. Make CLIs from typed models. Corio builds on pydantic settings patterns so small tools can stay declarative. Wrap iteration with observability. corio.iterator.Iterator tracks count, percentage, elapsed time, ETA, completion, and cleanup. Expose tools as HTTP and MCP endpoints. Define endpoint classes once and mount them into FastAPI and MCP surfaces. Keep release metadata generated. corio pyproject turns Corio dependency groups and project metadata into the generated pyproject.toml sections. Install integrations only when needed. Extras keep heavy dependencies like API servers, vector search, ML, PDFs, and tabular tooling out of the base install. Examples Typed Paths And Data Files from corio import Path path = Path("runs/latest/config.yaml") path.parent.mkdirf() path.write_data({ "model": "embedder-v2", "batch_size": 64, }) config = path.read_data() json_path = path.get_conversion_path("json") json_path.parent.mkdirf() json_path.write_data(config) Observable Iteration from corio.iterator import Iterator documents = [{"id": "a"}, {"id": "b"}, {"id": "c"}] for document in Iterator(documents): # Work happens inside per-item logging spans with progress stats. process(document) The iterator tracks count, total, percentage, elapsed time, rate, ETA, completion logs, and closes the wrapped iterator when possible.
from functools import cached_property from corio import api class Search(api.endpoint.API): """Search indexed documents.""" PATH = "/search" TAGS = "documents" async def run(self, query: str): return {"query": query, "results": []} class Reindex(api.endpoint.Tool): """Rebuild the document index.""" async def run(self): return {"status": "queued"} class Service(api.Base): TITLE = "Document Service" PORT = 8080 @cached_property def ENDPOINTS(self): return [Search, Reindex] Service().launch() The same endpoint model can feed HTTP routes and MCP tools, so internal automation and external APIs stay aligned.
Corio projects keep dependency intent in [tool.corio.dependencies]; generated package metadata lives in [project.optional-dependencies].
[tool.corio.dependencies] semantic = ["sentence_transformers", "metrics"] metrics = ["tabular", "ranx"] tabular = ["pandas", "tabulate", "openpyxl", "odfpy", "deepdiff"] Then regenerate:
corio pyproject That keeps extras flattened for packaging while preserving a maintainable source-of-truth dependency graph.
This project is licensed under Apache 2.0. See LICENSE.
path-search compute dev test yml yaml logging parallel tokenization augmentation process profiling docker-client unicode version version-dev spaces netrc hfh merging api api-mcp dm ai openai-api semantic metrics tabular html interface google-api caching pdf debug sets path-app path-type dns dhcp patterns http setup webhook browsers db db-document db-search db-search-compute mqtt av env env-io toml toml-write ha ha-api doc youtube infra vcs tasmota encrypt secrets sec cli all
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




