Skip to content

buurro/gingerino

Folders and files

NameName
Last commit message
Last commit date
Jan 25, 2025
Feb 6, 2024
Nov 30, 2023
Nov 29, 2023
Dec 1, 2023
Nov 24, 2023
Oct 21, 2024
Jan 25, 2025
Mar 8, 2025
Jan 25, 2025
Jan 25, 2025

Repository files navigation

Gingerino

PyPI Version

This is a proof of concept

Installation

pip install gingerino

Usage

from dataclasses import dataclass
from typing import Literal

from gingerino import parserino


@dataclass
class UserInfo:
    name: str
    age: int
    unit: Literal["years", "months"]


template = "{{ name }} is {{ age }} {{ unit }} old"
user = parserino(UserInfo, template, "Marco is 24 years old")

print(user.name, user.age)
# Marco 24

About

Parse strings using Jinja-style templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published