Skip to content

Instantly share code, notes, and snippets.

View villoro's full-sized avatar
⚙️

Arnau Villoro villoro

⚙️
View GitHub Profile
@villoro
villoro / snippet_from_delta_writer.py
Last active June 16, 2023 13:36
Parsing data with pydantic
from datetime import datetime, date
from typing import Dict, List, Optional
import yaml
from pydantic import BaseModel, ValidationError, validator, root_validator, Field
class Column(BaseModel):
name: str = Field(regex=r"[a-z][a-z_]*[a-z]")
comment: str