MCPcopy Index your code
hub / github.com/diffgram/diffgram / base_instance_packet

Function base_instance_packet

shared/export/export_generation.py:618–629  ·  view source on GitHub ↗
(instance)

Source from the content-addressed store, hash-verified

616
617
618def base_instance_packet(instance):
619
620 attribute_groups = instance.attribute_groups
621 if attribute_groups:
622 attribute_groups = dict(attribute_groups) # Cast from SQLAlchemy to serializable form
623
624 return {
625 'id': instance.id,
626 'type': instance.type,
627 'attribute_groups': attribute_groups,
628 'label_file_id': instance.label_file_id
629 }
630
631
632def build_instance(instance, file, include_label = False):

Callers 1

build_instanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected