#pydantic — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #pydantic, aggregated by home.social.
-
CW: War
Having spend joyful time in #htmx and #hyperscript land for a personal project and especially enjoying https://github.com/xehrad/form-json to combine with #pydantic ... only to notice, when sending patches, that the author hasn't been too active on Github in the last months and then noticed that ... he's living in Iran. :(
Makes me incredibly sad to even have had the thought of the maintainer not being that responsive. I found a way to reach out, hoping he and his loved ones are safe.
Fuck this timeline. Fuck Trump. Fuck Maga. Fuck those war mongering make-the-squiggly-line-go-up bastards.
-
CW: War
Having spend joyful time in #htmx and #hyperscript land for a personal project and especially enjoying https://github.com/xehrad/form-json to combine with #pydantic ... only to notice, when sending patches, that the author hasn't been too active on Github in the last months and then noticed that ... he's living in Iran. :(
Makes me incredibly sad to even have had the thought of the maintainer not being that responsive. I found a way to reach out, hoping he and his loved ones are safe.
Fuck this timeline. Fuck Trump. Fuck Maga. Fuck those war mongering make-the-squiggly-line-go-up bastards.
-
CW: War
Having spend joyful time in #htmx and #hyperscript land for a personal project and especially enjoying https://github.com/xehrad/form-json to combine with #pydantic ... only to notice, when sending patches, that the author hasn't been too active on Github in the last months and then noticed that ... he's living in Iran. :(
Makes me incredibly sad to even have had the thought of the maintainer not being that responsive. I found a way to reach out, hoping he and his loved ones are safe.
Fuck this timeline. Fuck Trump. Fuck Maga. Fuck those war mongering make-the-squiggly-line-go-up bastards.
-
CW: War
Having spend joyful time in #htmx and #hyperscript land for a personal project and especially enjoying https://github.com/xehrad/form-json to combine with #pydantic ... only to notice, when sending patches, that the author hasn't been too active on Github in the last months and then noticed that ... he's living in Iran. :(
Makes me incredibly sad to even have had the thought of the maintainer not being that responsive. I found a way to reach out, hoping he and his loved ones are safe.
Fuck this timeline. Fuck Trump. Fuck Maga. Fuck those war mongering make-the-squiggly-line-go-up bastards.
-
CW: War
Having spend joyful time in #htmx and #hyperscript land for a personal project and especially enjoying https://github.com/xehrad/form-json to combine with #pydantic ... only to notice, when sending patches, that the author hasn't been too active on Github in the last months and then noticed that ... he's living in Iran. :(
Makes me incredibly sad to even have had the thought of the maintainer not being that responsive. I found a way to reach out, hoping he and his loved ones are safe.
Fuck this timeline. Fuck Trump. Fuck Maga. Fuck those war mongering make-the-squiggly-line-go-up bastards.
-
Structured Outputs без иллюзий: как OpenAI, Gemini и xAI соблюдают JSON»-схемы
Проверили Structured Outputs у OpenAI, Gemini и xAI не “по документации”, а через adversarial-тесты: просили модели специально нарушить JSON Schema и смотрели, где провайдер реально удерживает формат ответа. В статье — методика, итоговая матрица ограничений, нюансы strict: true , anyOf / oneOf / allOf , и выводы для production-систем с несколькими LLM-провайдерами.
https://habr.com/ru/articles/1033478/
#llm #sgr #api #skillmd #skills_в_claude #pydantic #jsonschema
-
Structured Outputs без иллюзий: как OpenAI, Gemini и xAI соблюдают JSON»-схемы
Проверили Structured Outputs у OpenAI, Gemini и xAI не “по документации”, а через adversarial-тесты: просили модели специально нарушить JSON Schema и смотрели, где провайдер реально удерживает формат ответа. В статье — методика, итоговая матрица ограничений, нюансы strict: true , anyOf / oneOf / allOf , и выводы для production-систем с несколькими LLM-провайдерами.
https://habr.com/ru/articles/1033478/
#llm #sgr #api #skillmd #skills_в_claude #pydantic #jsonschema
-
Structured Outputs без иллюзий: как OpenAI, Gemini и xAI соблюдают JSON»-схемы
Проверили Structured Outputs у OpenAI, Gemini и xAI не “по документации”, а через adversarial-тесты: просили модели специально нарушить JSON Schema и смотрели, где провайдер реально удерживает формат ответа. В статье — методика, итоговая матрица ограничений, нюансы strict: true , anyOf / oneOf / allOf , и выводы для production-систем с несколькими LLM-провайдерами.
https://habr.com/ru/articles/1033478/
#llm #sgr #api #skillmd #skills_в_claude #pydantic #jsonschema
-
Structured Outputs без иллюзий: как OpenAI, Gemini и xAI соблюдают JSON»-схемы
Проверили Structured Outputs у OpenAI, Gemini и xAI не “по документации”, а через adversarial-тесты: просили модели специально нарушить JSON Schema и смотрели, где провайдер реально удерживает формат ответа. В статье — методика, итоговая матрица ограничений, нюансы strict: true , anyOf / oneOf / allOf , и выводы для production-систем с несколькими LLM-провайдерами.
https://habr.com/ru/articles/1033478/
#llm #sgr #api #skillmd #skills_в_claude #pydantic #jsonschema
-
Tilda + СБИС Presto: пишем интеграцию на Python, когда готового решения не существует
Клиент пришёл с простой задачей: заказы с сайта на Tilda должны автоматически попадать в СБИС Presto. Казалось бы, популярные инструменты — должно быть готовое решение. Его не оказалось. Написали свой сервис месяц в продакшене, всё работает. Рассказываем как — с кодом, граблями и объяснением неочевидных мест в документации СБИС. Стек: Python, FastAPI, Pydantic, httpx, cachetools.
https://habr.com/ru/articles/1030324/
#python #fastapi #сбис #tilda #webhook #интеграция #pydantic #httpx #presto
-
Tilda + СБИС Presto: пишем интеграцию на Python, когда готового решения не существует
Клиент пришёл с простой задачей: заказы с сайта на Tilda должны автоматически попадать в СБИС Presto. Казалось бы, популярные инструменты — должно быть готовое решение. Его не оказалось. Написали свой сервис месяц в продакшене, всё работает. Рассказываем как — с кодом, граблями и объяснением неочевидных мест в документации СБИС. Стек: Python, FastAPI, Pydantic, httpx, cachetools.
https://habr.com/ru/articles/1030324/
#python #fastapi #сбис #tilda #webhook #интеграция #pydantic #httpx #presto
-
Tilda + СБИС Presto: пишем интеграцию на Python, когда готового решения не существует
Клиент пришёл с простой задачей: заказы с сайта на Tilda должны автоматически попадать в СБИС Presto. Казалось бы, популярные инструменты — должно быть готовое решение. Его не оказалось. Написали свой сервис месяц в продакшене, всё работает. Рассказываем как — с кодом, граблями и объяснением неочевидных мест в документации СБИС. Стек: Python, FastAPI, Pydantic, httpx, cachetools.
https://habr.com/ru/articles/1030324/
#python #fastapi #сбис #tilda #webhook #интеграция #pydantic #httpx #presto
-
Tilda + СБИС Presto: пишем интеграцию на Python, когда готового решения не существует
Клиент пришёл с простой задачей: заказы с сайта на Tilda должны автоматически попадать в СБИС Presto. Казалось бы, популярные инструменты — должно быть готовое решение. Его не оказалось. Написали свой сервис месяц в продакшене, всё работает. Рассказываем как — с кодом, граблями и объяснением неочевидных мест в документации СБИС. Стек: Python, FastAPI, Pydantic, httpx, cachetools.
https://habr.com/ru/articles/1030324/
#python #fastapi #сбис #tilda #webhook #интеграция #pydantic #httpx #presto
-
ok, i just fucked-up in a very shameful way
i sent @simonwoerpel an article and got back the question: "Since when do we already have #Django v7 and #Pydantic v3?"
...which, upon closer inspection, we don't.
the article describes these two software versions, complete with "new features", how to install them and how to use them (lots of code samples!)
except these things don't exist
but the article looks so believable!
but it's all nonesense
i truly and utterly hate the #genAI infested web
-
Почему автотесты пропускают изменения в API и как это исправить с Pydantic
Приветствую, Хабр! Меня зовут Владислав Тимашенков, я занимаюсь автоматизацией тестирования в ГК Infowatch. Наша команда столкнулась с популярными болями автотестов для API: - одно изменение в API требует обновления нескольких тестов; - проверка структуры ответа распределена по тестам и не централизована; - валидация вложенных структур и генерируемых полей требует дополнительного кода. И мы задались вопросом: какой инструмент для валидации контракта нам подойдёт? В этой статье расскажем о нашем переосмыслении подхода к тестированию API с помощью внедрения Pydantic .
-
Every Python dev has faced APIs that use camelCase or kebab-case while your codebase follows snake_case.
The typical approach creates technical debt: either break Python naming conventions or write complex mapping logic that clutters your codebase.
Pydantic's Field alias feature elegantly solves this: define external field names through aliases while keeping internal code perfectly Pythonic.
Integration compatibility and clean code that's maintainable. 💚
-
Загрузка конфигурации из settings.toml в Python: чтение, проверка структуры и преобразование в объекты Pydantic
В прикладной разработке параметры программы обычно не размещают непосредственно в исходном коде. Токены, адреса серверов, номера портов, режимы запуска, имена пользователей, пароли и иные значения конфигурационного характера выносятся во внешний файл настроек. Такой способ организации данных позволяет отделить служебные параметры от программной логики, упростить сопровождение проекта и уменьшить вероятность ошибок при изменении окружения. Ниже рассматривается модуль Python, который читает файл settings.toml , преобразует его содержимое в структуры Python, извлекает нужный раздел конфигурации и проверяет его через модель Pydantic .
-
Загрузка конфигурации из settings.toml в Python: чтение, проверка структуры и преобразование в объекты Pydantic
В прикладной разработке параметры программы обычно не размещают непосредственно в исходном коде. Токены, адреса серверов, номера портов, режимы запуска, имена пользователей, пароли и иные значения конфигурационного характера выносятся во внешний файл настроек. Такой способ организации данных позволяет отделить служебные параметры от программной логики, упростить сопровождение проекта и уменьшить вероятность ошибок при изменении окружения. Ниже рассматривается модуль Python, который читает файл settings.toml , преобразует его содержимое в структуры Python, извлекает нужный раздел конфигурации и проверяет его через модель Pydantic .
-
Загрузка конфигурации из settings.toml в Python: чтение, проверка структуры и преобразование в объекты Pydantic
В прикладной разработке параметры программы обычно не размещают непосредственно в исходном коде. Токены, адреса серверов, номера портов, режимы запуска, имена пользователей, пароли и иные значения конфигурационного характера выносятся во внешний файл настроек. Такой способ организации данных позволяет отделить служебные параметры от программной логики, упростить сопровождение проекта и уменьшить вероятность ошибок при изменении окружения. Ниже рассматривается модуль Python, который читает файл settings.toml , преобразует его содержимое в структуры Python, извлекает нужный раздел конфигурации и проверяет его через модель Pydantic .
-
Загрузка конфигурации из settings.toml в Python: чтение, проверка структуры и преобразование в объекты Pydantic
В прикладной разработке параметры программы обычно не размещают непосредственно в исходном коде. Токены, адреса серверов, номера портов, режимы запуска, имена пользователей, пароли и иные значения конфигурационного характера выносятся во внешний файл настроек. Такой способ организации данных позволяет отделить служебные параметры от программной логики, упростить сопровождение проекта и уменьшить вероятность ошибок при изменении окружения. Ниже рассматривается модуль Python, который читает файл settings.toml , преобразует его содержимое в структуры Python, извлекает нужный раздел конфигурации и проверяет его через модель Pydantic .
-
novo post no blog: dataclass, NamedTuple, attrs ou pydantic — qual usar de verdade?
quatro formas sérias de estruturar dados em Python, cada uma com trade-offs que a documentação oficial não deixa claro. quando cada uma faz sentido, quando atrapalha, e o padrão borda/domínio que evita coerção silenciosa no lugar errado.
🔗 https://www.riverfount.dev.br/posts/cover-dataclass_namedtuple_attrs_pydantic./
#python #pydantic #dataclasses #boas-práticas
-
Python devs, is this familiar: Your team writes beautiful snake_case code, but every external API wants camelCase.
You could:
- Pollute your codebase with non-Pythonic naming
- Write manual conversion layers
- Live with the frictionOr you could use Pydantic's field aliases to solve this once and for all.
New guide: How to handle non-Pythonic naming conventions seamlessly 👇
https://link.testdouble.com/e357d1 -
TIL #PyAI on March 10th 2026 (just missed it). Small event, focused on unglamourous AI in production, some of the speakers were practitioners I know and respect. The description reminds me a bit of #NormConf !
- Talk videos will hopefully be released online soon
- Blogpost by @pamelafox, one of the speakers: https://blog.pamelafox.org/2026/03/learnings-from-pyai-conference.html
- Organisers plan to organize another one next year 👀 -
I used #Pydantic Evals to evaluate a bunch of agents today. After running an evaluation, I'd like to inspect the SpanTree for each evaluation case, e.g. to check which tools were called and debug my custom Evaluators. My current approach is a custom Evaluator that captures the tree as a side effect into a module-level variable.
Storing the trees in a global var is not great, so let's see if we can come up with a better solution: https://github.com/pydantic/pydantic-ai/issues/4758
-
Planning to make large behavioural changes to a (sometimes long-running) production-grade AI agent. Working with `pydantic-evals` today because I want to eval the agent before and after. So far it looks very similar to Langfuse datasets/runs for evalling, except that the data lives in your repository instead of in the Langfuse platform.
-
Hahaha, oh Pydantic...
> Unlike unit tests, evals are an emerging art/science. Anyone who claims to know exactly how your evals should be defined can safely be ignored.
Source: https://ai.pydantic.dev/evals/
-
RE: https://mastodon.social/@lobsters/116241885772634780
Oxyde looks really cool. I work with Pydantic a lot, but have missed having the Django ORM. Oxyde appears to bring a Django ORM-like experience to Pydantic, and I'm here for it.
-
Oh wow, another ORM! Because clearly, the world was begging for a "Pydantic-native async #ORM with a #Rust core" 😂. It's like they threw #buzzwords into a blender and hit "high performance"! 🥴
https://github.com/mr-fatalyst/oxyde #Pydantic #HighPerformance #HackerNews #ngated -
Oh wow, another ORM! Because clearly, the world was begging for a "Pydantic-native async #ORM with a #Rust core" 😂. It's like they threw #buzzwords into a blender and hit "high performance"! 🥴
https://github.com/mr-fatalyst/oxyde #Pydantic #HighPerformance #HackerNews #ngated -
Oh wow, another ORM! Because clearly, the world was begging for a "Pydantic-native async #ORM with a #Rust core" 😂. It's like they threw #buzzwords into a blender and hit "high performance"! 🥴
https://github.com/mr-fatalyst/oxyde #Pydantic #HighPerformance #HackerNews #ngated -
Oxyde – Pydantic-native async ORM with a Rust core
https://github.com/mr-fatalyst/oxyde
#HackerNews #Oxyde #Pydantic #ORM #Rust #async #Python #developer #tools
-
unihttp – пишем декларативные API-клиенты на Python
Привет! Хочу представить вам свою библиотеку – unihttp . Уверен, что все сталкивались с необходимостью работы с какими-либо API, но что делать, если у этого сервиса (внешнего или внутреннего) отсутствует библиотека, позволяющая лаконично вызывать нужные методы?
https://habr.com/ru/articles/992844/
#python #opensource #api #rest #pydantic #adaptix #dataclasses
-
#Pydantic tip: If you want your Pydantic model to have an optional field without your IDE screaming at you about missing arguments, you MUST declare it typed | None = None
(OK so yeah that's a type and a default argument, gimme a break :)So you can't just:
class Moof():
dog: str
cow: str
is_mac_lore: bool | NoneBecause you'll still get missing argument whining. If however you declare it as:
class Moof():
dog: str
cow: str
is_mac_lore: bool | None = NoneYour red glowing IDE induced headache about missing arguments will subside and you can get on with your day :)
Happy #python coding!
-
ChatGPT API를 Python 프로젝트에 통합하는 3가지 핵심 기법
ChatGPT API를 Python 프로젝트에 통합하는 실무 가이드. 역할 기반 메시지로 AI 행동 제어하고 Pydantic으로 구조화된 응답 받는 법을 소개합니다. -
[Перевод] Скрытая цена словарей Python и три более безопасные альтернативы
Команда Python for Devs подготовила перевод статьи о том, почему словари Python могут незаметно подводить в продакшне и какие альтернативы помогают ловить ошибки раньше. В тексте разбираются dict , NamedTuple , dataclass и Pydantic — от быстрого прототипирования до строгой валидации данных.
https://habr.com/ru/articles/979024/
#python #dataclass #namedtuple #pydantic #валидация #словари
-
[Перевод] Скрытая цена словарей Python и три более безопасные альтернативы
Команда Python for Devs подготовила перевод статьи о том, почему словари Python могут незаметно подводить в продакшне и какие альтернативы помогают ловить ошибки раньше. В тексте разбираются dict , NamedTuple , dataclass и Pydantic — от быстрого прототипирования до строгой валидации данных.
https://habr.com/ru/articles/979024/
#python #dataclass #namedtuple #pydantic #валидация #словари
-
[Перевод] Скрытая цена словарей Python и три более безопасные альтернативы
Команда Python for Devs подготовила перевод статьи о том, почему словари Python могут незаметно подводить в продакшне и какие альтернативы помогают ловить ошибки раньше. В тексте разбираются dict , NamedTuple , dataclass и Pydantic — от быстрого прототипирования до строгой валидации данных.
https://habr.com/ru/articles/979024/
#python #dataclass #namedtuple #pydantic #валидация #словари
-
[Перевод] Скрытая цена словарей Python и три более безопасные альтернативы
Команда Python for Devs подготовила перевод статьи о том, почему словари Python могут незаметно подводить в продакшне и какие альтернативы помогают ловить ошибки раньше. В тексте разбираются dict , NamedTuple , dataclass и Pydantic — от быстрого прототипирования до строгой валидации данных.
https://habr.com/ru/articles/979024/
#python #dataclass #namedtuple #pydantic #валидация #словари
-
Pydantic vs Adaptix – плюсы, минусы и области применения
Современная экосистема Python переживает большую трансформацию в подходах к обработке, валидации и (де)сериализации данных. Еще совсем недавно (десять лет назад) в питоне не было аннотаций типов, все использовали ручные проверки типов, да и в принципе мало кто заморачивался с контрактами для данных.
-
Погружение в typing: Как сделать Python почти типизированным
Динамическая типизация — это весело, пока ваш проект не вырастает до 100к строк и вы не начинаете ловить AttributeError: 'NoneType' object has no attribute 'get' в три часа ночи. В 2026 году аннотации типов в Python — это уже не «бюрократия», а вопрос выживания и адекватного рефакторинга.
-
Out of nowhere I decided to describe briefly my approach to reuse model_validator (and any other validator) across multiple #Pydantic models.
Code snippet from image should do the job, full context is in the linked blog post.
-
Out of nowhere I decided to describe briefly my approach to reuse model_validator (and any other validator) across multiple #Pydantic models.
Code snippet from image should do the job, full context is in the linked blog post.
-
Out of nowhere I decided to describe briefly my approach to reuse model_validator (and any other validator) across multiple #Pydantic models.
Code snippet from image should do the job, full context is in the linked blog post.
-
Out of nowhere I decided to describe briefly my approach to reuse model_validator (and any other validator) across multiple #Pydantic models.
Code snippet from image should do the job, full context is in the linked blog post.
-
Out of nowhere I decided to describe briefly my approach to reuse model_validator (and any other validator) across multiple #Pydantic models.
Code snippet from image should do the job, full context is in the linked blog post.
-
#AI #Python #MẫuMãMở #CôngNghệSángTạo #AI_Units #Pydantic
🔥 Giới thiệu Pydantic-DeepAgents – framework mở nguồn mới cho phát triển AI agent mạnh mẽ, an toàn. Tự động lập kế hoạch, quản lý công việc, kết nối Docker và giao diện đầy đủ. Nổi bật: loại agent nhẹ, bảo mật, hỗ trợ phân quyền nhiệm vụ phức tạp. Đánh giá mạnh về typting & khả năng sản xuất. 🚀 #AI #CôngCụLậpTrình #MởNguồn
-
🚀 Dive into a hands‑on FastAPI tutorial! Learn how to spin up an ASGI app with uvicorn, validate data with pydantic, train a model on the Iris dataset using scikit‑learn, and persist it with joblib. The interactive Swagger UI makes testing a breeze. Perfect for developers looking to blend ML and modern web APIs. #FastAPI #uvicorn #scikitlearn #pydantic
🔗 https://aidailypost.com/news/fastapi-tutorial-installs-fastapi-uvicorn-scikit-learn-pydantic-joblib