Create a new dbnl Project from a JSON object
dbnl.import_project_from_json( *, params: dict[str, Any], ) -> Project:
params
The newly created dbnl Project.
import dbnl dbnl.login() proj1 = dbnl.get_or_create_project(name="test_proj1") export_json = dbnl.export_project_as_json(project=proj1) export_json["project"]["name"] = "test_proj2" proj2 = dbnl.import_project_from_json(params=export_json) assert proj2.name == "test_proj2"
Was this helpful?
JSON object representing the Project, generally based on a exported via . Example:
{ "project": { "name": "My Project", "description": "This is my project." }, "tags": [ { "name": "my-tag", "description" :"This is my tag." } ], "test_specs": [ { "assertion": { "name": "less_than", "params": { "other": 0.5 } }, "description": "Testing the difference in the example statistic", "name": "Gr.0: Non Parametric Difference: Example_Statistic", "statistic_inputs": [ { "select_query_template": { "filter": null, "select": "{EXPERIMENT}.Example_Statistic" } }, { "select_query_template": { "filter": null, "select": "{BASELINE}.Example_Statistic" } } ], "statistic_name": "my_stat", "statistic_params": {}, "tag_names": ["my-tag"] } ] }