Jefferson Street Data (jstdata)
A Python interface and Research OS for the Jefferson Street financial and economic data API.
Design Philosophy: From Filing Cabinet to Knowledge Graph
jstdata is built to minimize the friction between human thought and actionable data.
- Series-First: The individual data series is the primary resource, carrying its own metadata (frequency, units, source).
- Entity Graph: Entities are nodes in a relational graph — walk from a company to its SIC, a security ticker, or a geography.
- Taxonomies: Named populations (
country,sec-central-index-key, …) scope search, query, and ranking. - Intent over IDs: CLI and Python favor fuzzy search over memorizing slugs; always resolve before querying.
- Sessions & workflows: Stage resolved ids in a session JSON; compose interactive steps in the shell and save them as named workflows.
- Reproducible Discovery: High-speed discovery in the TUI transitions into immutable Python / CLI snippets.
Installation
# Using poetry
poetry install
# Manual install
pip install .
Authentication & Configuration
Quick Start (CLI)
jst login
Credentials are saved to ~/.jstdata/config.json with secure permissions.
Environment Variables
These take precedence over the config file:
export JSTDATA_API_KEY="your-api-key-here"
# Optional: export JSTDATA_BASE_URL="https://api.jeffersonst.io"
Managing Configuration
jst config show
jst config show --verbose
jst config set api_key XXX
Interactive investigation (jst run)
Compose TUI steps in the shell. Steps share one Session (staged metrics / entities / series + query filters) for the lifetime of the run.
# Catalog search → stage entities/metrics/series
jst run console
# Scope to a taxonomy and resource type
jst run console --taxonomy sec-central-index-key --resource-type entity
# Filter entities by typed graph edges (repeatable; OR'd)
jst run console --relation classified_as:sic:7372 --resource-type entity
# Chain steps
jst run console --taxonomy country : discover --mode union : rank --taxonomy country
# Preload a session JSON; set default export path
jst run --session labor.json --output out.json rank --taxonomy country
Built-in steps:
| Step | Role |
|---|---|
console |
Search catalog; stage into the session |
discover |
Find metrics for session entities; preview coverage |
rank |
Leaderboard entities for a session metric |
Host keys (every step): s session · f find · e export · n/p next/prev · ? step help · q quit.
jst steps
jst step console
jst step rank --json
Saved workflows
Persist step pipelines (not session contents) under ~/.jstdata/workflows/:
jst workflow create --id gdp-rank --description "GDP board" -- \
console --taxonomy country : rank --taxonomy country
jst workflow ls
jst workflow run gdp-rank --session labor.json
jst workflow rm gdp-rank
(jst workflows remains a compatibility alias.)
Tutorial
jst tutorial
# same as: jst workflow run tutorial
Agents
jst agent-guide
Prints a version-tied operating manual (hard rules, modes, recipes, and the live CLI/step reference). Prefer it over guessing command shapes or inventing ids.
The Scriptable CLI (jst)
Pipe-friendly commands for automation and quick extraction.
# Fuzzy / set search (omit QUERY to list the matching set)
jst metric search "defense spending" --taxonomy country --limit 20 --format json
jst entity search --relation classified_as:sic:3674 --limit 50 --format json
jst entity search --metric gdp --metric cpi --mode intersect --format json
# Taxonomies
jst taxonomy ls --format json
jst taxonomy entities country --limit 20 --format json
# Bounded cross-sectional query (head/tail per series)
jst query --metric inflation --entity "United States" --frequency Monthly --tail 20
jst query --metric gdp --taxonomy country --tail 1 --sort-by value --limit 50 --format json
# Deep history for one known series
jst series observations ABC123 --start-date 2000-01-01 --limit 1000
# Entity graph
jst entity relations cik:1045810 --format pretty
The Python API
from jstdata import JSTDataClient, Session
client = JSTDataClient()
# Cross-sectional observations (bounded per series)
df = client.query_df(
metric="gross-domestic-product",
entity=["usa", "gbr"],
tail=20,
)
# Rank a taxonomy population by latest value
top = client.query(
metric="gross-domestic-product",
taxonomy="country",
frequency="Annual",
tail=1,
sort_by="value",
limit=50,
)
# Relation-scoped entity search (OR when multiple)
entities = client.search_entities(
relation=["classified_as:sic:7372", "classified_as:sic:5961"],
taxonomy="sec-central-index-key",
limit=50,
)
# Deep history for one series
obs = client.get_series_observations("ABC123", start_date="2000-01-01")
# Stage intent for a later `jst run` / `jst workflow run`
session = Session(
metric=["gross-domestic-product"],
taxonomy="country",
tail=1,
sort_by="value",
)
session.save("labor.json")
Extending the product
See AGENTS.md for how steps, the host, and saved workflows are structured when adding new interactive surface area.
Metadata
Release files for jstdata 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| jstdata-0.2.0.tar.gz | 54.8 kB | Without provenance | Details for jstdata-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jstdata-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for jstdata-0.2.0-py3-none-any.whl |
Total release size: 122.3 kB
Release files / jstdata-0.2.0.tar.gz
| Download URL | jstdata-0.2.0.tar.gz |
|---|---|
| Size | 54.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00a842cc7746828857731f654706681af6a0589fdb035e72846baf587cc523cb
|
|
BLAKE2b-256 checksum How to use checksums |
4e310d071f1eca00bed2da397aea037e7590399ef0982fad1284546e8805dbd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.3 CPython/3.11.16 Linux/6.17.0-1022-azure
|
Release files / jstdata-0.2.0-py3-none-any.whl
| Download URL | jstdata-0.2.0-py3-none-any.whl |
|---|---|
| Size | 67.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2683a6f7ade9b9b7b2dcbbbe375a92a832b16015ce17139bf4522ef783855183
|
|
BLAKE2b-256 checksum How to use checksums |
a9e853ce4e7fd5c5792d408e19b2cafb0ffe1de7a447ca3ed125c957f09a2178
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.3 CPython/3.11.16 Linux/6.17.0-1022-azure
|
Security for jstdata 0.2.0
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.