Open, non-proprietary marketplace intelligence for U.S. small businesses.
msmt is a Python toolkit that translates the kind of analytics enterprise
marketplaces use internally — listing integrity, supply resilience, demand
forecasting with practitioner guardrails — into transparent, auditable
modules that an SBDC counselor, a state commerce program analyst, a niche
marketplace operator, or an SMB seller can run on their own laptop.
It is a companion to the Main Street Marketplace article series, a five-part, plain-language walk-through of the same ideas:
- Part 1 — (coming soon)
- Part 2 — (coming soon)
- Part 3 — (coming soon)
- Part 4 — (coming soon)
- Part 5 — (coming soon)
There is no commercial version of this toolkit and no paid tier. It is MIT licensed, free forever, and intentionally built from public methods and synthetic data so anyone can read, run, and adapt it without asking permission.
- SBDC counselors advising small marketplace sellers who want a defensible, explainable view of demand and inventory risk.
- State and regional commerce program staff evaluating where small sellers are most exposed to marketplace volatility.
- Niche marketplace operators (regional, industry-vertical, or co-op marketplaces) who need ideas that scale down to a few hundred SKUs.
- SMB sellers on Amazon, Walmart, eBay, Shopify, Etsy, or any comparable platform who want to reason about their own data without handing it to a black-box vendor.
- Policy researchers studying small-business resilience in digital commerce.
The toolkit is organized around three problems every marketplace seller runs into, regardless of size:
- Marketplace integrity (
msmt.integrity) — Score a seller against ten fulfillment, post-purchase, and content signals; surface suppression risk and the top issues to fix. Includes a catalog concentration audit using the DOJ Herfindahl-Hirschman thresholds. - Supply resilience (
msmt.resilience) — Classify each SKU's demand pattern, compute safety stock and reorder points, and rank the catalog by current stockout risk — including the platform suppression tail. - Forecasting with guardrails (
msmt.forecasting) — Auto-select a forecasting method per SKU (six baselines, Croston for intermittent demand, Prophet for holiday-spike SKUs with a numpy fallback) and wrap the result in five plain-language guardrails that tell a counselor when to trust it.
Shared utilities live under msmt.data (synthetic data generation).
The toolkit ships with an interactive Streamlit app that exposes all three modules to a non-technical audience — the primary artifact for SBDC counselors, state commerce program staff, and SMB sellers who don't want to read Python:
pip install -e ".[app,forecasting]"
streamlit run app/streamlit_app.pyThen open the URL Streamlit prints (typically http://localhost:8501)
and pick a module from the sidebar. Every page runs on synthetic data
generated in-memory; the app does not read or write any files and does
not call any external APIs.
The four pages mirror the modules:
- Home — what each pillar does, with links into the modules.
- Marketplace Integrity — score a demo seller or enter your own metrics; see the scorecard, top issues, recommendations, and a catalog concentration audit.
- Supply Resilience — generate a synthetic catalog, see the stockout-risk heatmap, and use the platform-suppression cost calculator.
- Demand Forecasting — pick a demand pattern, see the auto- selected method's forecast and 95% prediction interval, and watch the five guardrails fire (or not).
Screenshot placeholder — running the app locally and taking screenshots of each page is the recommended next step.
The repo is set up for two independent deployments — the interactive Streamlit app and the standalone landing page — both free.
The app is configured for one-click deployment to Streamlit Community Cloud:
- Go to share.streamlit.io and connect your GitHub account.
- Select this repo (
main-street-marketplace-toolkit), branchmain, main fileapp/streamlit_app.py. - The included
requirements.txt(which installs themsmtpackage directly from this GitHub repo viagit+https://...) and.streamlit/config.toml(theme + headless server) are picked up automatically. - Streamlit builds and deploys; the app goes live at a
*.streamlit.appURL. - To use a custom subdomain (e.g.
app.mainstreetmarketplace.org), add it under Settings → Custom domain in your Streamlit Cloud app settings and point a CNAME record at the URL Streamlit gives you.
The website/ folder is a self-contained static site. No build step,
no JavaScript framework, no Node toolchain.
- Vercel —
npx vercel deploy website/, or connect the GitHub repo via vercel.com/new and set the root directory towebsite/. - Netlify — drag the
website/folder onto netlify.com/drop, or connect the repo and set the publish directory towebsite/. - GitHub Pages — set the Pages source to the
mainbranch with the/websitefolder.
After the static site is live, point mainstreetmarketplace.org's
DNS A or CNAME record at the deployed host.
For readers who want to see the toolkit run end-to-end in code, the
notebooks/ folder ships four walkthroughs:
01_marketplace_integrity_walkthrough.ipynb02_supply_resilience_walkthrough.ipynb03_forecasting_guardrails_walkthrough.ipynb04_end_to_end_case_study.ipynb— the capstone: a single 50-SKU synthetic catalog runs through all three modules to produce a combined SMB diagnostic report.
All notebooks ship pre-executed so they render with charts on GitHub.
Install from source (a PyPI release will come once the API stabilizes):
git clone https://github.com/ayushtripathi955/main-street-marketplace-toolkit.git
cd main-street-marketplace-toolkit
pip install -e .The library itself only depends on pandas and numpy. Optional
extras pull in the rest of the stack only if you need them:
pip install -e ".[forecasting]"— Prophet and statsforecast for holiday-spike forecasting.pip install -e ".[notebooks]"— Jupyter and matplotlib for the walkthrough notebooks.pip install -e ".[app]"— Streamlit and matplotlib for the interactive app.pip install -e ".[test]"— pytest for the test suite.
Generate a synthetic multi-SKU dataset:
from msmt.data import generate_seller_data
df = generate_seller_data(n_skus=50, n_days=365, seed=42)
print(df.head())
print(df["pattern"].value_counts())You will get a tidy, daily DataFrame with the columns date, sku_id,
units_sold, listing_price, stock_on_hand, lead_time_days,
category, and pattern. Feed any column into your own analysis — the
rest of the toolkit will use this exact schema.
Need a single SKU of one specific archetype (handy for unit tests or worked examples)?
from msmt.data import (
generate_smooth,
generate_weekly_seasonal,
generate_holiday_spike,
generate_intermittent,
generate_new_sku,
)
steady = generate_smooth(n_days=180, seed=0)
seasonal = generate_weekly_seasonal(n_days=180, seed=0)
holiday = generate_holiday_spike(n_days=365, seed=0, end_date="2025-12-31")
lumpy = generate_intermittent(n_days=365, seed=0)
brand_new = generate_new_sku(n_days=180, history_days=30, seed=0)Every generator accepts a seed, so the same arguments always return
the same DataFrame.
All data produced by this toolkit is synthetic. It is not derived from, sampled from, or modeled on any proprietary or real-world seller dataset. The five demand archetypes are well-known patterns from the public operations-research and demand-forecasting literature; the generators here are simple, transparent implementations meant to make the rest of the toolkit demonstrable end-to-end without anyone needing to share their real numbers.
If you want to run msmt against your own data, just match the
schema — the column names listed in the quickstart are all the toolkit
expects.
MIT. Free to use, modify, and redistribute. No attribution required, though a link back to the article series is appreciated.
Ayush Tripathi — data analytics and marketplace strategy practitioner based in San Francisco. The toolkit and accompanying article series were built to give Main Street sellers and the people who advise them the same kind of marketplace intelligence enterprise sellers take for granted, in a form anyone can read, run, and trust.