Connector framework for financial data — typed fetch and hybrid-search catalogs.
Project description
parsimony
Parsimony is a minimal connector framework for financial data and coding agents. A connector is an async Python callable that returns data; the kernel wraps successful calls in Result objects with provenance.
Quickstart
from parsimony import connector
@connector
async def hello(name: str) -> str:
"""Return a greeting."""
return f"hello {name}"
result = await hello(name="world")
print(result.data)
Credentials
Credentials are normal parameters. Bind operator-supplied values before exposing a connector to an agent:
runtime_fetch = fred_fetch.bind(api_key="...")
result = await runtime_fetch(series_id="GDP")
The bound connector no longer exposes api_key, and provenance records only the call-time arguments.
Connector implementations decide how to handle provider-specific auth, including optional environment-variable fallback.
Core Primitives
@connector: wraps an async callable.@enumerator: connector for catalog enumeration output.@loader: connector for observation-loading output.Connector.bind: schema-aware partial application.Connectors: immutable collection with+, bind, filter, search, callbacks, and keyed lookup.
Plugins
Plugins register under parsimony.providers and export CONNECTORS: Connectors.
[project.entry-points."parsimony.providers"]
yourname = "parsimony_yourname"
from parsimony import Connectors, connector
@connector
async def yourname_fetch(symbol: str, api_key: str = ""):
"""Fetch private source data."""
...
CONNECTORS = Connectors([yourname_fetch])
The authoritative plugin contract is docs/contract.md.
Catalogs
Catalog snapshots are built directly from entries and catalog primitives:
from parsimony.catalog.source import entities_from_connector
entries = await entities_from_connector(enumerate_provider, ENUMERATE_OUTPUT)
catalog = Catalog("provider_catalog")
catalog.set_entities(entries)
await catalog.build()
await catalog.save("hf://org/repo/provider_catalog")
loaded = await Catalog.load("hf://org/repo/provider_catalog")
Tabular connectors return raw pd.DataFrame values. Use ColumnRole.DATA for observations and any field that can vary by row or time (for example a benchmark bond's rolling constituent ISIN). Use ColumnRole.METADATA only for entity descriptors that are constant per entity key when projecting catalog entries.
MCP
parsimony-mcp is a separate distribution. MCP/tool schemas are projections of connector signatures; Python connectors do not need JSON-compatible parameters unless they are exported as tools.
License
Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parsimony_core-0.7.0.tar.gz.
File metadata
- Download URL: parsimony_core-0.7.0.tar.gz
- Upload date:
- Size: 73.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67f3e70f756b7637420db1f3b06f84b7db235aad250edfae3d5052a266876ce1
|
|
| MD5 |
829d33f9fb7c85027b78738154f44b8b
|
|
| BLAKE2b-256 |
1e953625f6189570cfcba372fd8588d9ae7fcd4d07321edd0c620d8c343effcd
|
Provenance
The following attestation bundles were made for parsimony_core-0.7.0.tar.gz:
Publisher:
publish.yml on ockham-sh/parsimony
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_core-0.7.0.tar.gz -
Subject digest:
67f3e70f756b7637420db1f3b06f84b7db235aad250edfae3d5052a266876ce1 - Sigstore transparency entry: 1654434360
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony@ab4b90b73f8a9e549f6041ffc672551179495efa -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab4b90b73f8a9e549f6041ffc672551179495efa -
Trigger Event:
release
-
Statement type:
File details
Details for the file parsimony_core-0.7.0-py3-none-any.whl.
File metadata
- Download URL: parsimony_core-0.7.0-py3-none-any.whl
- Upload date:
- Size: 78.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa92953871732450e20eb942fd62ede1dd4457f776889eec799549cfc58d188c
|
|
| MD5 |
32965e0dc224fe347abf522432321114
|
|
| BLAKE2b-256 |
fde498f4d2c318387da091d865c73e773652c06ffebb210a2a40b7f922699e72
|
Provenance
The following attestation bundles were made for parsimony_core-0.7.0-py3-none-any.whl:
Publisher:
publish.yml on ockham-sh/parsimony
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_core-0.7.0-py3-none-any.whl -
Subject digest:
aa92953871732450e20eb942fd62ede1dd4457f776889eec799549cfc58d188c - Sigstore transparency entry: 1654434562
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony@ab4b90b73f8a9e549f6041ffc672551179495efa -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab4b90b73f8a9e549f6041ffc672551179495efa -
Trigger Event:
release
-
Statement type: