Skip to content
Snippets Groups Projects
Commit 25281500 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

ENH: draft of functions for parameter tools

parent 9af13ec9
No related branches found
No related tags found
1 merge request!32Draft: ENH: draft of functions for parameter tools
Pipeline #19393 failed
#!/usr/bin/env python3
# Tools for storing parameters in python scripts into CaosDB
# A. Schlemmer, 02/2022
import caosdb as db
from caosdb.apiutils import (convert_to_entity, convert_to_python_object)
def register_parameterset(name):
"""
Download the RecordType for a parameter set. This can be e.g. the RecordType for a
Simulation or a DataAnalysis.
Create a new CaosDB record and return its object structure for use in python programs.
This function makes use of the pythonic object structure for CaosDB Records as defined
in pylib apiutils.
"""
res = db.execute_query("FIND RecordType {}".format(name), unique=True)
res.resolve_references(deep=True)
return convert_to_python_object(res)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment