Metadata-Version: 2.4
Name: contoso
Version: 0.1.0
Summary: Synthetic business datasets for the fictional Contoso company
Project-URL: Homepage, https://codeberg.org/usrbinr/contoso.py
Project-URL: Repository, https://codeberg.org/usrbinr/contoso.py
Project-URL: Issues, https://codeberg.org/usrbinr/contoso.py/issues
Author-email: Alejandro Hagan <alejandro.hagan@outlook.com>
License: MIT
License-File: LICENSE
Keywords: business,contoso,dataset,duckdb,sales
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Requires-Dist: duckdb>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# contoso

Synthetic business datasets for the fictional Contoso company. This Python package provides access to 8 interconnected business datasets stored as Parquet files on Cloudflare R2, loaded efficiently via DuckDB.

## Installation

```bash
pip install contoso
```

Or install from source:

```bash
pip install git+https://codeberg.org/usrbinr/contoso.py
```

## Usage

```python
import contoso

# Create a DuckDB connection with Contoso datasets
db = contoso.create_duckdb(size="small")

# Access tables (lazy evaluation via DuckDB relations)
db["sales"].limit(10).fetchdf()
db["customer"].filter("Country = 'United States'").fetchdf()

# Available tables
# - sales: Sales transaction data
# - product: Product details (name, manufacturer, category)
# - customer: Customer demographics and geography
# - store: Store locations and attributes
# - fx: Foreign exchange rates
# - calendar: Date dimension table
# - orders: Order header information
# - orderrows: Order line items

# Launch interactive web UI
contoso.launch_ui(db["con"])

# Close connection when done
db["con"].close()
```

## Dataset Sizes

| Size   | Sales Rows   |
|--------|--------------|
| small  | ~8,000       |
| medium | ~2.3 million |
| large  | ~47 million  |
| mega   | ~237 million |

## Requirements

- Python >= 3.9
- DuckDB >= 1.0.0

## License

MIT
