Simon Willison (@simonw)

작성자는 Pydantic의 Rust로 작성된 새 Python 서브셋을 WebAssembly로 컴파일해 일반 WebAssembly와 Pyodide 친화적 버전 둘 다 동작시켰다고 보고했습니다. 이는 Pydantic 관련 도구의 브라우저·WASM 환경 통합 가능성을 보여주며 Python 데이터 유효성 검사/모델링 툴의 배포·실행 옵션을 확장합니다. 관련 블로그 링크 포함.

https://x.com/simonw/status/2019910820323553691

#pydantic #wasm #pyodide #webassembly

Simon Willison (@simonw) on X

I got Pydantic's new written-in-Rust Python subset to compile to WebAssembly in both regular and Pyodide-friendly variants https://t.co/ta6Pxw6KGf

X (formerly Twitter)

unihttp – пишем декларативные API-клиенты на Python

Привет! Хочу представить вам свою библиотеку – unihttp . Уверен, что все сталкивались с необходимостью работы с какими-либо API, но что делать, если у этого сервиса (внешнего или внутреннего) отсутствует библиотека, позволяющая лаконично вызывать нужные методы?

https://habr.com/ru/articles/992844/

#python #opensource #api #rest #pydantic #adaptix #dataclasses

unihttp – пишем декларативные API-клиенты на Python

Привет! Хочу представить вам свою библиотеку – unihttp . Уверен, что все сталкивались с необходимостью работы с какими-либо API, но что делать, если у этого сервиса (внешнего или внутреннего)...

Хабр

#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 | None

Because you'll still get missing argument whining. If however you declare it as:

class Moof():
dog: str
cow: str
is_mac_lore: bool | None = None

Your 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으로 구조화된 응답 받는 법을 소개합니다.

https://aisparkup.com/posts/8486

AI can now spin up Python functions on the fly, but the real work—maintaining, testing, and ensuring type safety—still falls to us. Learn how tools like Pydantic help bridge the gap between AI‑generated code and reliable, typed Python, and why developers can’t hand over the reins completely. #AICodeGen #Pydantic #PythonTyping #TypeValidation

🔗 https://aidailypost.com/news/ai-writes-python-functions-yet-developers-must-still-maintain-them

[Перевод] Скрытая цена словарей Python и три более безопасные альтернативы

Команда Python for Devs подготовила перевод статьи о том, почему словари Python могут незаметно подводить в продакшне и какие альтернативы помогают ловить ошибки раньше. В тексте разбираются dict , NamedTuple , dataclass и Pydantic — от быстрого прототипирования до строгой валидации данных.

https://habr.com/ru/articles/979024/

#python #dataclass #namedtuple #pydantic #валидация #словари

Скрытая цена словарей Python и три более безопасные альтернативы

Команда Python for Devs  подготовила перевод статьи о том, почему словари Python могут незаметно подводить в продакшне и какие альтернативы помогают ловить ошибки раньше. В тексте разбираются...

Хабр

Pydantic vs Adaptix – плюсы, минусы и области применения

Современная экосистема Python переживает большую трансформацию в подходах к обработке, валидации и (де)сериализации данных. Еще совсем недавно (десять лет назад) в питоне не было аннотаций типов, все использовали ручные проверки типов, да и в принципе мало кто заморачивался с контрактами для данных.

https://habr.com/ru/articles/984630/

#python #pydantic #adaptix

Pydantic vs Adaptix – плюсы, минусы и области применения

Небольшое введение к тому, как мы собственно до всего этого дошли. Современная экосистема Python переживает большую трансформацию в подходах к обработке, валидации и (де)сериализации данных. Еще...

Хабр

Погружение в typing: Как сделать Python почти типизированным

Динамическая типизация — это весело, пока ваш проект не вырастает до 100к строк и вы не начинаете ловить AttributeError: 'NoneType' object has no attribute 'get' в три часа ночи. В 2026 году аннотации типов в Python — это уже не «бюрократия», а вопрос выживания и адекватного рефакторинга.

https://habr.com/ru/articles/982932/

#python #typing #pydantic

Погружение в typing: Как сделать Python почти типизированным

1. От динамического хаоса к порядку: Зачем Python типы в 2026 году? Когда я только начинал писать на Python, я был в восторге. После C++ и Java он казался глотком свежего воздуха: «Смотрите, я просто...

Хабр

----------------

🛠️ Tool
===================

Opening: TDO Standalone Extractor is a self-contained tool for extracting Cyber Threat Intelligence (CTI) from documents. It targets analysts who need structured CTI from heterogeneous sources and automates conversion to machine-readable schemas.

Key Features:
• Multi-format support: processes PDF, DOCX, TXT, and Markdown inputs.
• Comprehensive schema: emits a CTI schema covering 12 entity types and 24 relationship types with rich properties.
• LLM integration: leverages Google Gemini models with automatic fallback parsing for resilient extraction.
• Detection & flow outputs: generates evidence-backed detection opportunities and an Attack-Flow JSON mapping to MITRE ATT&CK.
• Structured reliability: uses pydantic schemas to validate outputs and report parsing success.
• Parallel processing: supports concurrent file processing with progress tracking and job controls.

Technical Implementation:
• Core extraction relies on LLM-driven entity and relation parsing with structured output prompts and schema validation using pydantic models.
• Gemini serves as the primary model with configurable model selection and retry/backoff parameters conceptually managed via environment configuration.
• Outputs include per-file {filename}_extracted.json and human-readable Markdown summaries; optional artifacts include Attack Flow JSON and CSV summaries.

Use Cases:
• Automating ingestion of vendor reports and feeds into CTI platforms.
• Producing detection rule candidates with supporting evidence for SOC engineers.
• Feeding structured ATT&CK flow artifacts into threat modeling and reporting pipelines.

Limitations:
• Dependence on external LLM access and model availability for parsing fidelity.
• Quality of extraction tied to input document clarity and LLM hallucination risk; validation via pydantic mitigates schema errors but not semantic gaps.
• No built-in deployment orchestration; environment-based configuration required conceptually for API keys and model selection.

References:
• pydantic schema validation
• MITRE ATT&CK mapping

🔹 tool #cti #pydantic #MITRE #LLM

🔗 Source: https://github.com/Blevene/standalone_tdo

GitHub - Blevene/standalone_tdo

Contribute to Blevene/standalone_tdo development by creating an account on GitHub.

GitHub
When NOT to use Pydantic

A dive into Pydantic performance and when to pick a different option.