You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add common typeddict's that would be commonly used for many-to-many relationships to a a new file (or contrib.py) so that they can be imported and used without the end developer having to define them.
Some example TypedDicts we could include:
classTagDict(TypedDict):
"""Many-to-many relationship typed dict explaining which fields are interesting."""name: strclassIPAddressDict(TypedDict):
"""Many-to-many relationship typed dict explaining which fields are interesting."""host: strprefix_length: intclassContentTypeDict(TypedDict):
"""Many-to-many relationship typed dict explaining which fields are interesting. Needed for content_types: """app_label: strmodel: str
Use Case
If I am creating an SSoT and need to use Tags or ContentTypes, I would typically have to define the TypedDict myself. Implementing this would allow us to import commonly used ones for ease of use.
The text was updated successfully, but these errors were encountered:
@jdrew82@Kircheneer I would suggest this include TypedDicts not just for commonly used M2M objects, but all main Nautobot objects. This way the TypedDicts are already made and reusable in instances like custom relationships.
This is something that @Kircheneer and I have discussed and I think we agree that it makes sense to have the common ones as an easily importable class in the framework so people don't have to recreate them all individually.
Environment
Proposed Functionality
Add common typeddict's that would be commonly used for many-to-many relationships to a a new file (or contrib.py) so that they can be imported and used without the end developer having to define them.
Some example TypedDicts we could include:
Use Case
If I am creating an SSoT and need to use Tags or ContentTypes, I would typically have to define the TypedDict myself. Implementing this would allow us to import commonly used ones for ease of use.
The text was updated successfully, but these errors were encountered: