Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Benchmark outputs are written to `benchmarks/results`:

## Project Status

FrameX is pre-1.0 (`0.1.1`) and in active development.
FrameX is pre-1.0 (`0.1.2`) and in active development.

- APIs are usable and documented
- compatibility/performance behavior will continue to evolve
Expand Down
33 changes: 33 additions & 0 deletions docs/documents/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,43 @@ NumPy protocol support:
- `fx.read_file(path, format=None, **kwargs)` (auto detect by extension)
- `fx.write_file(df, path, format=None, **kwargs)` (auto detect by extension)

`read_file` formats:
- `parquet`, `orc`, `ipc`, `csv`, `tsv`, `txt`, `fixed`, `json`, `ndjson`, `feather`, `pickle`, `excel`, `sqlite`

`write_file` formats:
- `parquet`, `orc`, `ipc`, `csv`, `tsv`, `txt`, `fixed`, `json`, `ndjson`, `feather`, `pickle`, `excel`, `html`, `xml`, `sqlite`

Compression wrappers for `read_file` / `write_file`:
- `.gz`, `.bz2`, `.xz`, `.zip`
- `.zst` / `.zstd` when the optional `zstandard` package is available

SQLite examples:

```python
import framex as fx

# Write to SQLite table (replace if exists by default)
fx.write_file(df, "analytics.sqlite", table="sales")

# Append rows to existing table
fx.write_file(df_new, "analytics.sqlite", table="sales", if_exists="append")

# Read full table
sales_df = fx.read_file("analytics.sqlite", table="sales")

# Read with SQL query
top_df = fx.read_file(
"analytics.sqlite",
query="SELECT region, SUM(amount) AS total FROM sales GROUP BY region ORDER BY total DESC",
)
```

SQLite parameter notes:
- `write_file(..., table="name", if_exists="replace|append|fail", index=False)`
- `read_file(..., table="name")` reads one table
- `read_file(..., query="SELECT ...")` runs custom SQL
- if both `table` and `query` are omitted on read, FrameX loads the first user table

## Interchange

- `fx.from_pandas(pdf)`
Expand Down
31 changes: 29 additions & 2 deletions docs/documents/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,43 @@ Migrate incrementally:
FrameX supports read/write for:

- Parquet (`.parquet`)
- ORC (`.orc`)
- Arrow IPC (`.arrow`, `.ipc`)
- CSV/TSV (`.csv`, `.tsv`)
- CSV/TSV/Text (`.csv`, `.tsv`, `.tab`, `.txt`)
- Fixed-width text (`.fwf`, `.fixed`, `.prn`)
- JSON / NDJSON (`.json`, `.jsonl`, `.ndjson`)
- Feather (`.feather`)
- Pickle (`.pkl`, `.pickle`)
- Excel (`.xlsx`, `.xls`) via pandas-compatible backend
- Excel (`.xlsx`, `.xls`, `.xlsm`, `.xlsb`, `.ods`) via pandas-compatible backend
- SQLite (`.sqlite`, `.sqlite3`, `.db`, `.db3`)
- Export-only: HTML (`.html`, `.htm`), XML (`.xml`)

`read_file(...)` and `write_file(...)` auto-detect by extension and support compressed wrappers:
`.gz`, `.bz2`, `.xz`, `.zip`, plus `.zst`/`.zstd` when `zstandard` is installed.

## How do I use SQLite with FrameX?

Typical patterns:

```python
import framex as fx

# write/replace a table
fx.write_file(df, "warehouse.sqlite", table="events", if_exists="replace")

# append incremental records
fx.write_file(delta_df, "warehouse.sqlite", table="events", if_exists="append")

# read a table
events = fx.read_file("warehouse.sqlite", table="events")

# read with query
recent = fx.read_file(
"warehouse.sqlite",
query="SELECT * FROM events WHERE event_date >= '2026-01-01'",
)
```

## How do I tune execution?

Use runtime config APIs:
Expand Down
6 changes: 4 additions & 2 deletions docs/documents/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ FrameX focuses on high-throughput local analytics with predictable behavior and

- Unified `read_file(...)` / `write_file(...)`
- Formats:
- Parquet, Arrow IPC, CSV/TSV, JSON/NDJSON
- Feather, Pickle, Excel
- Parquet, ORC, Arrow IPC
- CSV/TSV/Text + fixed-width text
- JSON/NDJSON, Feather, Pickle, Excel, SQLite
- Export-only: HTML and XML
- Compression wrappers:
- `.gz`, `.bz2`, `.xz`, `.zip`
- `.zst`/`.zstd` (with `zstandard`)
66 changes: 66 additions & 0 deletions docs/documents/sqlite_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: SQLite Guide
description: Read and write FrameX DataFrames to SQLite tables using table and query workflows.
order: 11
section: Guides
---

# SQLite Guide

Use SQLite when you want a portable local database file with SQL query support.

## Write a DataFrame to SQLite

```python
import framex as fx

df = fx.DataFrame(
{
"order_id": [101, 102, 103],
"region": ["APAC", "US", "APAC"],
"amount": [120.0, 80.5, 99.0],
}
)

fx.write_file(df, "analytics.sqlite", table="orders")
```

Default behavior is `if_exists="replace"` and `index=False`.

## Append Incremental Data

```python
delta = fx.DataFrame({"order_id": [104], "region": ["EU"], "amount": [150.0]})
fx.write_file(delta, "analytics.sqlite", table="orders", if_exists="append")
```

## Read a Table

```python
orders = fx.read_file("analytics.sqlite", table="orders")
print(orders)
```

## Read with SQL Query

```python
top_regions = fx.read_file(
"analytics.sqlite",
query="""
SELECT region, SUM(amount) AS total
FROM orders
GROUP BY region
ORDER BY total DESC
""",
)
```

## Useful Parameters

- `write_file(..., table="name")`
- `write_file(..., if_exists="replace"|"append"|"fail")`
- `write_file(..., index=False)` (default)
- `read_file(..., table="name")`
- `read_file(..., query="SELECT ...")`

If both `table` and `query` are omitted when reading, FrameX loads the first non-system table in the SQLite file.
2 changes: 1 addition & 1 deletion framex/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.1"
__version__ = "0.1.2"
Loading
Loading