Register objects
In this section, you will learn how to register a new object.
The information about the new object will be registered in one the database files - called objects_info.csv- that you created earlier. If you haven't created any database files, please first consult the section on how to create database files.
You will need to know the name that you chose for your database files. If you forgot it, you can ask for all the database names that you created (see code below).
# material science database package
import msdb
# return all the names of created databases
msdb.get_names()
Afterwards, follow the code displayed below to add a new object.
# material science database package
import msdb
# create a DB class instance
db_name = 'write the name you chose you for your database files'
db = msdb.DB(db_name=db_name)
# add a new object
db.add_objects()
The last line of code above will return several ipywidgets, inside which you will be able to insert the required information about the object. Some of the ipywidgets already contains pre-registered values, so that you can directly select them. Have a look at the code lines below if you want to pre-register some information.
import msdb
# create a DB class instance
db_name = 'write the name you chose you for your database files'
db = msdb.DB(db_name=db_name)
# add a new institution
db.add_institutions()
# add a new object creator
db.add_creators()
# add a new material
db.add_materials()
# add a new object type
db.add_types()
© 2026 Gauthier Patin. All rights reserved. | Last updated: 2026-01-23