Changelog¶
All notable changes to pydantic-linq are listed here. The format follows Keep a Changelog, and versions follow Semantic Versioning.
Unreleased¶
0.1.1 - 2026-10-31¶
Added¶
- Documentation site on GitHub Pages: guides, a C# to Python operator map, and an API reference generated from the docstrings.
- This changelog.
pydantic_linq.orm: Entity Framework Core for SQLModel (installpydantic-linq[sqlmodel]).Queryable[T](IQueryable<T>): LINQ operators that build one SQL statement.where,select,select_manyover navigations, the sort operators,skip/take,distinct, the set operators,join/left_join/right_join,group_by(GROUP BY / HAVING),count_byand every element, quantifier and aggregate operator run in SQL. Operators SQL can't express run in memory over the results; an untranslatablewhereraisesInvalidOperationError, as in EF Core.- EF query features:
include,then_include,as_no_tracking,as_split_query/as_single_query,tag_with,to_query_string,load,execute_update,execute_delete,as_enumerable,as_async_enumerable. - Every terminal operator has a
*_asynctwin (to_list_async,first_async,count_async, ...) for anAsyncEngine/AsyncSession. DbContext:set,add/add_range,attach,update,remove/remove_range,find,save_changes,clear,from_sql,execute_sql,begin_transaction,ensure_created/ensure_deleted, and their async versions.- Examples
08_entity_framework.pyand09_entity_framework_async.py.
0.1.0 - 2026-10-30¶
Added¶
Enumerable[T]: everySystem.Linq.Enumerableoperator, including the .NET 9 and 10 ones (index,count_by,aggregate_by,left_join,right_join,shuffle,sequence,infinite_sequence). Method names are the C# names in snake_case.AsyncEnumerable[T]: the System.Linq.Async operators over sync or async iterables. A selector or predicate can be a plain function or anasync def. Terminal operators are awaited.OrderedEnumerable/OrderedAsyncEnumerablewiththen_byandthen_by_descending. The sort is stable and multi-key.Grouping/AsyncGrouping: a keyed sequence with every operator.Lookupreturns an empty sequence for a missing key.- Pydantic support:
cast(Model)validates each element with aTypeAdapter.Enumerable[Model]works as a model field type, validated likelist[Model]and serialized as a list.- The set operators use value equality, so they work on unhashable models.
- Importing the package adds the operators to
list,tuple,setandfrozenset(through forbiddenfruit). Methods the builtins already define keep their Python meaning.uninstall()removes the patches. examples/folder, from basics to an end-to-end async report pipeline.- CI on Windows and Linux for Python 3.12 to 3.14. Releases publish to PyPI through trusted publishing when a tag is pushed.