from loadfile import load
orders = load("data/orders.parquet", columns=["order_id", "amount"])
print(orders.head())
Read selected columns with loadfile
A small example using local files; install loadfile before running it.
A small example using local files; install loadfile before running it.
from loadfile import load
orders = load("data/orders.parquet", columns=["order_id", "amount"])
print(orders.head())
An illustrative request model using Pydantic. Invalid or non-positive quantities raise a validation error.
from pydantic import BaseModel, Field
class OrderInput(BaseModel):
product_id: str = Field(min_length=1)
quantity: int = Field(gt=0)
order = OrderInput(product_id="sample-product", quantity=3)