Entity relationship diagrams for Python data model classes like Pydantic
MIT License
Bot releases are visible (Hide)
typing.Annotated
in cases where it's not the outermost generic type. (Issue #122, PR #123)Published by jayqi 5 months ago
StopIteration
error when rendering a model that has no fields. (Issue #120, PR #121)Published by jayqi 6 months ago
AttributeError
when adding a model that has a field annotated with certain typing special forms like Any
, Literal
, or TypeVar
instances. (Issue #114, PR #115)Published by jayqi 6 months ago
ModuleNotFoundError
when importing from erdantic.examples
without attrs installed.Published by jayqi 6 months ago
Published by jayqi 6 months ago
Published by jayqi 6 months ago
[!IMPORTANT]
This release features significant changes to erdantic, primarily to the backend process of analyzing models and representing data. If you have been primarily using the CLI or the convenience functionscreate
,draw
, andto_dot
, then your code may continue to work without any changes. If you are doing something more advanced, you may need to update your code.
--termini
option. Use the new --terminal-model
option instead. The shorthand option -t
remains the same. The --termini
option still works but will emit a deprecation warning.termini
argument for create
, draw
, and to_dot
functions. Use the new terminal_models
argument instead. The termini
argument still works but will emit a deprecation warning.graph_attr
, node_attr
, and edge_attr
arguments to the draw
and to_dot
functions that allow you to override attributes on the generated pygraphviz object for the diagram.A few changes have been made to the visual content of rendered diagrams.
List[TargetModel]
) to display as a "many" relationship (crow) instead of a "zero-or-many" relationship (odot + crow), treating the modality of the field as unspecified. A field will only be displayed as "zero-or-many" (odot + crow) if it is explicitly optional, like Optional[List[TargetModel]]
.attrs.define
. The source code for attrs support can be found in the new module erdantic.plugins.attrs
.erdantic.examples.attrs
.Significant changes have been made to the library backend to more strongly separate the model analysis process, the extracted data, and the diagram rendering process. We believe this more structured design facilitates customizing diagrams and simplifies the implementation for each data modeling framework. Please see the new documentation pages "Customizing diagrams" and "Extending or modifying erdantic" for details on the new design.
A summary of some key changes is below:
Model
and Field
and the conrete adapters DataClassModel
, DataClassField
, PydanticModel
, and PydanticField
.
ModelInfo
and FieldInfo
to replace the adapter system. These new models hold static data that have been extracted from models that erdantic analyzed.model_adapter_registry
and register_model_adapter
.
register_plugin
. All objects related to plugins can be found in the new erdantic.plugins
module and its submodules.erdantic.typing
module to erdantic.typing_utils
.py.typed
marker file to indicate that the package supports type checking.EntityRelationshipDiagram
instances.Published by jayqi 6 months ago
This will be the last version that supports Python 3.7.
< 0.10.0
due to incompatibility with a fix introduced in that version.Published by jayqi 7 months ago
This is a pre-release version for v1.0.0.
[!IMPORTANT]
This release features significant changes to erdantic, primarily to the backend process of analyzing models and representing data. If you have been primarily using the CLI or the convenience functionscreate
,draw
, andto_dot
, then your code may continue to work without any changes. If you are doing something more advanced, you may need to update your code.
--termini
option. Use the new --terminal-model
option instead. The shorthand option -t
remains the same. The --termini
option still works but will emit a deprecation warning.termini
argument for create
, draw
, and to_dot
functions. Use the new terminal_models
argument instead. The termini
argument still works but will emit a deprecation warning.graph_attr
, node_attr
, and edge_attr
arguments to the draw
and to_dot
functions that allow you to override attributes on the generated pygraphviz object for the diagram.A few changes have been made to the visual content of rendered diagrams.
List[TargetModel]
) to display as a "many" relationship (crow) instead of a "zero-or-many" relationship (odot + crow), treating the modality of the field as unspecified. A field will only be displayed as "zero-or-many" (odot + crow) if it is explicitly optional, like Optional[List[TargetModel]]
.attrs.define
. The source code for attrs support can be found in the new module erdantic.plugins.attrs
.erdantic.examples.attrs
.Significant changes have been made to the library backend to more strongly separate the model analysis process, the extracted data, and the diagram rendering process. We believe this more structured design facilitates customizing diagrams and simplifies the implementation for each data modeling framework. Please see the new documentation pages "Customizing diagrams" and "Extending or modifying erdantic" for details on the new design.
A summary of some key changes is below:
Model
and Field
and the conrete adapters DataClassModel
, DataClassField
, PydanticModel
, and PydanticField
.
ModelInfo
and FieldInfo
to replace the adapter system. These new models hold static data that have been extracted from models that erdantic analyzed.model_adapter_registry
and register_model_adapter
.
register_plugin
. All objects related to plugins can be found in the new erdantic.plugins
module and its submodules.erdantic.typing
module to erdantic.typing_utils
.py.typed
marker file to indicate that the package supports type checking.EntityRelationshipDiagram
instances.Published by jayqi over 1 year ago
PydanticField
to work with Pydantic V2's API.is_many
and is_nullable
functions to erdantic.typing
.Published by jayqi over 1 year ago
< 2
. This will be the final version of erdantic that supports pydantic v1.Published by jayqi about 2 years ago
create
, draw
, to_dot
, CLI). For all modules passed, erdantic will find all supported data model classes in each module. (Issue #23, PR #58)
limit_search_models_to
to all entrypoints to allow for limiting which data model classes will be yielded from searching a module.Published by jayqi almost 3 years ago
Field(description=...)
in SVG tooltips. This will add an "Attributes" section to the tooltip using Google-style docstring format and lists fields where the description
keyword argument is used. (Issue #8, PR #42)Published by jayqi almost 3 years ago
typing.ForwardRef
will throw a StringForwardRefError
with instructions for how to resolve. Unevaluated forward references will throw an UnevaluatedForwardRefError
with instructions for how to resolve. See new documentation for more details. (Issue #40, PR #41)erdantic.errors
module to erdantic.exceptions
. (PR #41)ErdanticException
base class from which other exceptions raised within the erdantic library are subclassed from. Changed several existing ValueError
exceptions to new exception classes that subclass both ErdanticException
and ValueError
. (PR #41)__lt__
method on Model
and Edge
to return NotImplemented
instead of raising an exception to follow typical convention for unsupported input types. (PR #41)Published by jayqi over 3 years ago