List entities

ListEntities.py

from LOGS import LOGS
from LOGS.Entities import (
    BridgeRequestParameter,
    CustomFieldRequestParameter,
    CustomTypeRequestParameter,
    DatasetRequestParameter,
    DataSourceRequestParameter,
    DocumentRequestParameter,
    ExperimentRequestParameter,
    FormatFormatRequestParameter,
    FormatInstrumentRequestParameter,
    FormatMethodRequestParameter,
    FormatRequestParameter,
    FormatVendorRequestParameter,
    InstrumentRequestParameter,
    LabNotebookEntryRequestParameter,
    MethodRequestParameter,
    OriginRequestParameter,
    PersonRequestParameter,
    ProjectRequestParameter,
    RoleRequestParameter,
    SampleRequestParameter,
)

logs = LOGS()

limit = 1

i = 0
for e in logs.samples(SampleRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.projects(ProjectRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.datasets(DatasetRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.documents(DocumentRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.persons(PersonRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.methods(MethodRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.instruments(InstrumentRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.experiments(ExperimentRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.origins(OriginRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.formats(FormatRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.roles(RoleRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.bridges(BridgeRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.dataSources(DataSourceRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.labNotebookEntries(LabNotebookEntryRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.formatVendors(FormatVendorRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.formatMethods(FormatMethodRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.formatInstruments(FormatInstrumentRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.formatFormats(FormatFormatRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.customFields(CustomFieldRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break

i = 0
for e in logs.customTypes(CustomTypeRequestParameter()):
    print(e)
    i += 1
    if i > limit:
        print("... truncated")
        break