From 89e70d37652c75a1b54a1dd61e7d918920c10247 Mon Sep 17 00:00:00 2001 From: Lukas Plank Date: Tue, 3 Dec 2024 11:06:51 +0100 Subject: [PATCH] docs: adapt readme and exmaples to rdfproxy.ConfigDict --- README.md | 4 ++-- examples/full_static_fastapi_example.py | 10 ++++++++-- examples/wikidata_grouped_person_fastapi_example.py | 10 ++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b63f5a1..b97c232 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ The result set can be mapped to a nested Pydantic model like so: from typing import Annotated from fastapi import FastAPI, Query -from pydantic import BaseModel, ConfigDict -from rdfproxy import Page, QueryParameters, SPARQLBinding, SPARQLModelAdapter +from pydantic import BaseModel +from rdfproxy import ConfigDict, Page, QueryParameters, SPARQLBinding, SPARQLModelAdapter class Work(BaseModel): model_config = ConfigDict(group_by="name") diff --git a/examples/full_static_fastapi_example.py b/examples/full_static_fastapi_example.py index 38203ea..eb3231a 100644 --- a/examples/full_static_fastapi_example.py +++ b/examples/full_static_fastapi_example.py @@ -3,8 +3,14 @@ from typing import Annotated from fastapi import FastAPI, Query -from pydantic import BaseModel, ConfigDict -from rdfproxy import Page, QueryParameters, SPARQLBinding, SPARQLModelAdapter +from pydantic import BaseModel +from rdfproxy import ( + ConfigDict, + Page, + QueryParameters, + SPARQLBinding, + SPARQLModelAdapter, +) query = """ diff --git a/examples/wikidata_grouped_person_fastapi_example.py b/examples/wikidata_grouped_person_fastapi_example.py index 0e06def..951cd06 100644 --- a/examples/wikidata_grouped_person_fastapi_example.py +++ b/examples/wikidata_grouped_person_fastapi_example.py @@ -3,8 +3,14 @@ from typing import Annotated from fastapi import FastAPI, Query -from pydantic import BaseModel, ConfigDict -from rdfproxy import Page, QueryParameters, SPARQLBinding, SPARQLModelAdapter +from pydantic import BaseModel +from rdfproxy import ( + ConfigDict, + Page, + QueryParameters, + SPARQLBinding, + SPARQLModelAdapter, +) query = """