Skip to main content

One Stop Analytics 1.13.11

Cross-platform analytics toolkit for Python 3.9+.

Highlights

  • Pandas / NumPy based analytics
  • Lazy imports for faster startup
  • Automatic EDA and data-quality profiling
  • CSV streaming/chunk processing for large files
  • Parallel batch analysis with bounded workers
  • Persistent file-aware cache with automatic invalidation
  • SciPy statistical tests
  • scikit-learn regression/classification helpers
  • Matplotlib/Seaborn visualization
  • OpenPyXL Excel reports
  • Windows, macOS and Linux

Install

python -m pip install one-stop-analytics

Examples

from one_stop_analytics import Analytics

a = Analytics("sales.csv")
report = a.eda(cached=True)
a.clean()
a.export_excel("report.xlsx")

Large CSV

from one_stop_analytics.io import iter_data_chunks

for chunk in iter_data_chunks("huge.csv", chunksize=200_000):
    # process one chunk at a time
    print(len(chunk))

Parallel batch

from one_stop_analytics import batch_analyze

results = batch_analyze(["a.csv", "b.csv", "c.csv"], workers=4)

CLI

osa eda sales.csv
osa eda sales.csv --no-cache
osa batch data/*.csv --workers 4
osa cache-clear

Cache location can be overridden with OSA_CACHE_DIR. The default is a per-user cache directory; avoid shared cache directories. Cache keys include the package/cache schema version.

Output safety: XLSX exports neutralize spreadsheet-formula-looking text. CSV, JSON and Parquet preserve literal values; if CSV files will be opened in spreadsheet software, apply an application-specific safe-export policy before sharing. Writing legacy .xls is intentionally unsupported; use .xlsx.

License and commercial licensing

The public distribution is intended to be licensed under GNU Affero General Public License v3.0 only (AGPL-3.0-only); see LICENSE. The project may offer a separate commercial license for organizations that need different permissions, subject to a separate written agreement and confirmation that the licensor owns or is authorized to license all relevant code.

Commercial licensing contact: Srijan Das. Contact email: otanalytics.contact@gmail.com. The commercial license document in this repository is a draft for legal review only; it is not a customer-ready offer or contract. Third-party dependencies retain their own licenses. See LICENSING_AUDIT.md and THIRD_PARTY_LICENSE_AUDIT.md for the current, incomplete release audit.

Release blockers: confirm copyright ownership and dual-licensing authority for all contributions, finish the exact-version dependency audit, and obtain legal review of the commercial agreement before publication. The contact address above should be monitored before release.

End-to-end workflow

from one_stop_analytics import Analytics

result = (
    Analytics("sales.csv")
    .analyze(
        clean=True,
        include_statistics=True,
        include_ml=False,
        include_charts=True,
        output_excel="analytics.xlsx",
        output_html="analytics.html",
    )
)

For supervised ML:

result = Analytics("sales.csv").analyze(
    target="Sales",
    include_ml=True,
    output_excel="analytics.xlsx",
    output_html="analytics.html",
)

The high-level workflow covers import → cleaning → automated EDA → statistics → optional ML → visualization → Excel/HTML reporting.

Excel / Power BI-style transformations

from one_stop_analytics import Analytics

t = Analytics("sales.csv").transform()
summary = t.group("Region", {"Revenue": "sum", "Cost": "sum"})
filtered = t.filter(Region="West")

CLI:

osa analyze sales.csv --output analytics.xlsx --html analytics.html
osa ml sales.csv --target Sales --task regression

1.8.8 performance & visualization hardening

  • Optimized EDA cardinality reuse to avoid repeated full-column scans.

  • Reduced visualization overhead for common bar charts and bounded automatic chart generation.

  • Fixed release metadata/cache namespace alignment for 1.8.8.

  • Fixed tab-delimited CSV auto-detection.

  • Bounded CSV dialect/header sampling without loading the whole source file.

  • Large CSV eda(), profile(), correlations() and kpi() now use bounded-memory streaming paths instead of dereferencing a missing full DataFrame.

  • Decision-report CLI preserves streaming for large CSV inputs.

  • Cache serialization is pandas-2.x/3.x compatible and preserves common DataFrame/Series metadata. Non-finite cache scalars are normalized safely.

  • Formula-injection sanitization is applied only to XLSX exports; CSV, JSON and Parquet preserve literal text values.

  • CLI converts common runtime errors into clean non-zero errors instead of raw tracebacks.

1.8.8 reliability baseline

  • Raw-vs-analyzed report scopes are explicit and consistent across output formats.

1.8.8 transaction analytics

  • Returns/cancellations-aware gross, return and net revenue metrics.

v0.6.1 hardening

  • Automatic identifier-column detection for ML (e.g. customerID, order_id, UUID-like columns).
  • High-cardinality categorical protection in automatic chart selection.
  • Automatic target/churn KPIs when a target is supplied to analyze().
  • Numeric scaling in classification preprocessing for more stable Logistic Regression.
  • ROC-AUC included when binary classification probabilities are available.

v0.7.1 Time-Series & Forecasting

Adds lightweight time-series detection, resampling, validation, baseline forecasting (naive, seasonal-naive, moving average, exponential smoothing), forecast metrics, future forecast output, and Analytics.time_series() / Analytics.forecast(). The workflow aggregates large raw event data before forecasting, making million-row retail datasets practical without requiring statsmodels.

Time-series forecasting (v0.7.1)

Install optional forecasting models with:

pip install one-stop-analytics[forecasting]

The forecasting layer supports automatic date detection, resampling, leakage-safe missing-period handling, naive/seasonal-naive baselines, moving average, Holt, Holt-Winters, and metrics including MAE, RMSE, MAPE, RMSLE, sMAPE and MASE.

from one_stop_analytics import Analytics

result = Analytics("sales.csv").forecast(
    date_column="date",
    target="sales",
    forecast_periods=30,
    method="auto"
)

1.8.8 Performance

  • Vectorized EDA outlier statistics: shared quantile/IQR computation across numeric columns instead of repeated per-column scans.
  • Target-aware categorical analysis converts the target once instead of repeating the same conversion for every categorical column.
  • Business cohort indexing uses native pandas period ordinals instead of Python-level apply().
  • Existing pandas/NumPy/scikit-learn optimized implementations remain the computational backend; the package avoids reimplementing their core algorithms.
  • Release artifacts exclude build caches, test caches, generated reports and previous wheels.

v0.8.0 Advanced Analytics

  • Advanced statistics: Spearman/Kendall, Mann-Whitney, Wilcoxon, Kruskal-Wallis, effect sizes, bootstrap confidence intervals, OLS diagnostics and VIF.
  • Advanced ML: Extra Trees, GradientBoosting, SVM and robust model wrappers.
  • AutoML: cross-validated model comparison and automatic winner selection.
  • Business analytics: RFM, cohort, retention, funnel, CLV and ABC/Pareto.
  • Integrated through Analytics.auto_ml(), Analytics.advanced_statistics(), Analytics.business_analytics() and analyze() flags.

Decision-ready reports

Analytics.analyze() now adds a schema-aware decision_report containing Executive Summary, KPI, Data Quality, Trends, Top/Bottom Products, Customer Segments, Anomalies, Forecast, Key Findings, and Business Recommendations. The report is deterministic and only emits sections when the dataset contains sufficient evidence; unavailable analyses are marked unavailable rather than inferred.

Decision-ready multi-format reports

Generate one analysis result and export it to HTML, PDF, XLSX, and JSON without re-running the analytics engine:

osa decision-report data.csv --output-dir reports

Or select formats:

osa decision-report data.csv --output-dir reports --formats html,pdf,xlsx,json

Outputs:

  • HTML — self-contained client-facing report with embedded charts.
  • PDF — client-ready static report.
  • XLSX — detailed analyst workbook with report sections as sheets.
  • JSON — machine-readable report payload for APIs/automation.

The report layer includes Executive Summary, KPI, Data Quality, Trends, Top/Bottom Products, Customer Segments, Anomalies, Forecast availability/results, Key Findings, and Business Recommendations. It is schema-aware and does not fabricate unavailable metrics.

1.9.0 reliability and release improvements

  • Batch scheduling bounds queued futures to reduce memory overhead for very large input lists.
  • Batch inputs reject duplicate paths and invalid worker/timeout/retry settings early.
  • Cache override warnings are emitted once per process rather than on every cache access.
  • Holt/Holt-Winters optimization avoids brute-force starts and uses a finite iteration budget to reduce worst-case forecast latency.
  • Release tooling runs test, compile, wheel build/install, import, CLI and archive-integrity checks; the verification JSON records each executed command.
  • Cache schema version is incremented to invalidate incompatible cached values.

1.9.2 reliability and release improvements

  • Batch scheduling bounds queued futures to reduce memory overhead for very large input lists.
  • Batch inputs reject duplicate paths and invalid worker/timeout/retry settings early.
  • Cache override warnings are emitted once per process rather than on every cache access.
  • Holt/Holt-Winters optimization avoids brute-force starts and uses a finite iteration budget to reduce worst-case forecast latency.
  • Release tooling runs test, compile, wheel build/install, import, CLI and archive-integrity checks; the verification JSON records each executed command.
  • Cache schema version is incremented to invalidate incompatible cached values.

1.9.3 output accuracy and presentation hardening

  • Missingness KPIs are recalculated from canonical raw counts and source dimensions when available.
  • JSON reports normalize missing/non-finite values to null and serialize dates and chart metadata consistently.
  • HTML tables handle source columns that collide with index labels.

1.9.3 reliability and release improvements

  • Batch scheduling bounds queued futures to reduce memory overhead for very large input lists.
  • Batch inputs reject duplicate paths and invalid worker/timeout/retry settings early.
  • Cache override warnings are emitted once per process rather than on every cache access.
  • Holt/Holt-Winters optimization avoids brute-force starts and uses a finite iteration budget to reduce worst-case forecast latency.
  • Release tooling runs test, compile, wheel build/install, import, CLI and archive-integrity checks; the verification JSON records each executed command.
  • Cache schema version is incremented to invalidate incompatible cached values.

1.9.4 streaming report correctness

  • Large CSV decision reports compute exact weekly and monthly sums in bounded-memory chunks.
  • Aggregate trend charts are built from period summaries, not raw rows.
  • Partial calendar periods are flagged and excluded from headline trend comparisons.
  • Streaming duplicate counts stay unknown unless explicitly computed.
  • HTML, JSON, PDF and XLSX share canonical KPI/trend data; XLSX includes a KPI Summary sheet.

1.9.4 reliability and release improvements

  • Batch scheduling bounds queued futures to reduce memory overhead for very large input lists.
  • Batch inputs reject duplicate paths and invalid worker/timeout/retry settings early.
  • Cache override warnings are emitted once per process rather than on every cache access.
  • Holt/Holt-Winters optimization avoids brute-force starts and uses a finite iteration budget to reduce worst-case forecast latency.
  • Release tooling runs test, compile, wheel build/install, import, CLI and archive-integrity checks; the verification JSON records each executed command.
  • Cache schema version is incremented to invalidate incompatible cached values.

1.9.6 forecast validation engine

  • Chronological development validation and a separately reserved final test window.
  • Expanding rolling-origin folds for temporal robustness checks.
  • Seasonal-naive baseline always included in model selection and final-test comparisons.
  • Forecast metrics include MAE, RMSE, WAPE, RMSLE and MASE (plus MAPE/sMAPE for continuity).
  • Metric notes flag zero-actual limitations: WAPE is undefined when total absolute actuals are zero; MAPE excludes zero-actual rows. RMSLE clips negative values and flags that interpretation caveat.
  • Hyperparameter/model selection uses development validation only; final test scores are reported separately and are not used for selection.

Reporting and connector validation (v1.11.0)

from one_stop_analytics.report import html_report, decision_report_xlsx, decision_report_json, export_dashboard
from one_stop_analytics.validation import validate_report_consistency, validate_charts, audit_recommendations
from one_stop_analytics.connectors import extract_sql, extract_crm_pages

# After constructing a canonical `report_result`:
html_report(report_result, "report.html")
decision_report_xlsx(report_result, "report.xlsx")
decision_report_json(report_result, "report.json")
print(validate_report_consistency(report_result, "report.html", "report.xlsx", "report.json"))
export_dashboard(report_result, "dashboard.html")  # offline snapshot

SQL extraction yields bounded chunks and permits only a single SELECT statement. Install one-stop-analytics[connectors] to use SQLAlchemy engines. extract_crm_pages is a generic paginated JSON REST adapter; check your CRM vendor's API contract and scopes before use. Recommendation audit flags missing evidence or limitations instead of manufacturing them.

1.11.0 reliability and release improvements

  • Batch scheduling bounds queued futures to reduce memory overhead for very large input lists.
  • Batch inputs reject duplicate paths and invalid worker/timeout/retry settings early.
  • Cache override warnings are emitted once per process rather than on every cache access.
  • Holt/Holt-Winters optimization avoids brute-force starts and uses a finite iteration budget to reduce worst-case forecast latency.
  • Release tooling runs test, compile, wheel build/install, import, CLI and archive-integrity checks; the verification JSON records each executed command.
  • Cache schema version is incremented to invalidate incompatible cached values.

v1.12.0 — Unified Python analytics workspace

Workspace provides a single entry point for common spreadsheet, SQL, pandas/NumPy, visualization and report workflows. It is a Python-first toolkit, not a pixel-for-pixel replacement for the Excel, Tableau or Power BI desktop applications.

from one_stop_analytics import Workspace

ws = Workspace("sales.xlsx", name="sales")       # CSV, TSV, Excel, JSON, Parquet, Feather
print(ws.profile())                               # quality + descriptive statistics
by_region = ws.groupby("Region", {"Revenue": "sum", "Cost": "sum"})
wide = ws.pivot(index="Region", columns="Month", values="Revenue", aggfunc="sum")
query = ws.sql("SELECT Region, SUM(Revenue) AS revenue FROM sales GROUP BY Region")
ws.chart(x="Region", y="Revenue", kind="bar", aggregation="sum", output="revenue.png")
ws.export("report.xlsx", include_profile=True)
ws.export("report.html")
ws.export("report.pdf")
ws.export("data.json", include_profile=True)
ws.dashboard("dashboard.html", charts=[{"x": "Region", "y": "Revenue", "kind": "bar"}])

For richer analytical SQL, install pip install one-stop-analytics[duckdb] and call ws.duckdb("SELECT Region, SUM(Revenue) FROM sales GROUP BY Region"). For a browser-based interactive application, install pip install one-stop-analytics[dashboard]; use Streamlit/Plotly to build a front end around the same Python workspace and data contracts. Excel workbook formula recalculation, Tableau Server publishing, Power BI semantic-model/DAX compatibility, and a full spreadsheet cell editor are not provided by this library.

Unified BI workspace (v1.13.0)

from one_stop_analytics import Workspace

ws = Workspace("sales.csv", name="sales")
# Interactive browser dashboard (filters, KPI cards, chart drill-down)
ws.interactive_dashboard("dashboard.html", max_rows=50_000)
# Excel-compatible multi-sheet report with optional pivot summaries
ws.export_excel_report("sales_report.xlsx", pivots={
    "Regional Revenue": {"group": "Region", "metric": "Revenue", "agg": "sum"}
})
# Same canonical KPI contract feeds every export format
ws.export_report_bundle("reports", formats=("json", "html", "pdf", "xlsx"), pivots={
    "Regional Revenue": {"group": "Region", "metric": "Revenue", "agg": "sum"}
})

# Out-of-core query on CSV/Parquet files (source data is not loaded into pandas)
engine = Workspace.large_data_engine()  # pip install "one-stop-analytics[large-data]"
result = engine.query_csv("large_sales.csv", "SELECT Region, SUM(Revenue) AS revenue FROM source GROUP BY Region")
profile = engine.profile_arrow("large_sales.csv")  # requires PyArrow

# Database connectors (drivers depend on backend)
with Workspace.database("sqlite:///analytics.db") as db:
    result = db.query("SELECT Region, SUM(Revenue) AS revenue FROM sales GROUP BY Region")
# PostgreSQL: pip install "one-stop-analytics[postgres]"
# MySQL:      pip install "one-stop-analytics[mysql]"

The standalone dashboard embeds a bounded row sample to remain portable; it is not a server-side BI service. For larger-than-RAM files, run DuckDB SQL against source files first, then dashboard the bounded result. PostgreSQL/MySQL support depends on the matching SQLAlchemy driver being installed. SQL query helpers accept read-only SELECT/CTE statements; write_table is a separate explicit database write API.

Optional dependency matrix and database integration (v1.13.2)

Install only the feature group needed:

Extra Installs / enables CI validation
forecasting statsmodels forecasting Clean install + import smoke
advanced statsmodels advanced analytics Clean install + import smoke
connectors SQLAlchemy database APIs Clean install + import smoke
duckdb DuckDB SQL over local files Clean install + import smoke
large-data DuckDB + PyArrow batch scanning Clean install + import smoke
postgres SQLAlchemy + psycopg 3 Live PostgreSQL service integration
mysql SQLAlchemy + PyMySQL Live MySQL service integration
visual Plotly Clean install + import smoke
dashboard Streamlit + Plotly Clean install + import smoke
all All optional feature dependencies Clean install + import smoke

Example installs:

python -m pip install "one-stop-analytics[postgres]"
python -m pip install "one-stop-analytics[mysql]"
python -m pip install "one-stop-analytics[large-data]"
python -m pip install "one-stop-analytics[all]"

The repository CI has separate Optional dependency matrix, Clean install, and Database integration workflows. PostgreSQL/MySQL integration tests require disposable test databases and run in CI service containers; locally they skip unless OSA_TEST_DATABASE_URL is set. Never point these integration tests at a production database: they create and drop uniquely named test tables.

For maintainers, run python scripts/check_optional_dependencies.py postgres (replace postgres with an extra name), python scripts/clean_install_smoke.py after building a wheel into dist/, and python -m pytest -q tests/test_database_integrations.py with the test database environment variables configured.

1.13.2 optional dependency and database integration

  • Adds a CI matrix for each documented optional dependency extra, with import checks in clean runner environments.
  • Adds fresh-virtual-environment wheel installation smoke tests across Linux, Windows, macOS, and supported Python lanes.
  • Adds PostgreSQL and MySQL service-container integration tests for write/read round trips, parameterized queries, and read-only query enforcement.
  • Uses SQLAlchemy dialect-aware identifier quoting for portable table reads, including MySQL without ANSI_QUOTES.
  • Expands the all extra to include the optional Streamlit dashboard dependency.

1.13.2 optional dependency and database integration

  • Adds a CI matrix for each documented optional dependency extra, with import checks in clean runner environments.
  • Adds fresh-virtual-environment wheel installation smoke tests across Linux, Windows, macOS, and supported Python lanes.
  • Adds PostgreSQL and MySQL service-container integration tests for write/read round trips, parameterized queries, and read-only query enforcement.
  • Uses SQLAlchemy dialect-aware identifier quoting for portable table reads, including MySQL without ANSI_QUOTES.
  • Expands the all extra to include the optional Streamlit dashboard dependency.

1.13.2 optional dependency and database integration

  • Adds a CI matrix for each documented optional dependency extra, with import checks in clean runner environments.
  • Adds fresh-virtual-environment wheel installation smoke tests across Linux, Windows, macOS, and supported Python lanes.
  • Adds PostgreSQL and MySQL service-container integration tests for write/read round trips, parameterized queries, and read-only query enforcement.
  • Uses SQLAlchemy dialect-aware identifier quoting for portable table reads, including MySQL without ANSI_QUOTES.
  • Expands the all extra to include the optional Streamlit dashboard dependency.

Credit-note reconciliation (diagnostic only)

from one_stop_analytics import reconcile_credit_note_lines

result = reconcile_credit_note_lines("retail_export.csv")
print(result["report"]["ledger_readiness"])
result["detail"].to_csv("credit_note_line_audit.csv", index=False)

The credit-note matcher is a provisional diagnostic, not an accounting posting engine. It uses customer, SKU, unit price and chronology to identify candidate prior-sale quantities. It does not prove the original invoice relationship. Statutory-ledger use remains blocked unless source-system references, stable line IDs, tax/currency fields, transaction type, duplicate policy and independent finance controls are supplied and validated.

Metadata

Release files for one-stop-analytics 1.13.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for one-stop-analytics 1.13.11
File Size Uploaded
one_stop_analytics-1.13.11.tar.gz 169.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for one-stop-analytics 1.13.11
File Interpreter ABI Platform
one_stop_analytics-1.13.11-py3-none-any.whl Python 3 none any Details

Total release size: 301.5 kB

Release files / one_stop_analytics-1.13.11.tar.gz

Download URL one_stop_analytics-1.13.11.tar.gz
Size 169.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1bb1e1355665d6e1c1e243645ea7925687d5322bc9654f4a79a3543cc7ce9719
BLAKE2b-256 checksum
How to use checksums
c7d118bf3a2f10cf0caf7891de5e1e6fcd22aaf3c28b09ad94ae0c0f6fe71a3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / one_stop_analytics-1.13.11-py3-none-any.whl

Download URL one_stop_analytics-1.13.11-py3-none-any.whl
Size 132.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2f97cb93fd3dff6961d133fffbe1de563319418b9151642a0420b42adcfe0d3
BLAKE2b-256 checksum
How to use checksums
64f5093cc4ed1f7431f02d934e0e7c397abda17744ff320b6875ce1029db5bcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.13.11 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page