Database management, forms, reports, and data operations with LibreOffice Base.
LibreOffice Base skill for creating, managing, and automating database workflows using the native ODB (OpenDocument Database) format.
Use this skill when:
soffice --baseimport uno
def create_database():
local_ctx = uno.getComponentContext()
resolver = local_ctx.ServiceManager.createInstanceWithContext(
"com.sun.star.bridge.UnoUrlResolver", local_ctx
)
ctx = resolver.resolve(
"uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"
)
smgr = ctx.ServiceManager
doc = smgr.createInstanceWithContext("com.sun.star.sdb.DatabaseDocument", ctx)
doc.storeToURL("file:///path/to/database.odb", ())
doc.close(True)import uno
def connect_to_mysql(host, port, database, user, password):
local_ctx = uno.getComponentContext()
resolver = local_ctx.ServiceManager.createInstanceWithContext(
"com.sun.star.bridge.UnoUrlResolver", local_ctx
)
ctx = resolver.resolve(
"uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"
)
smgr = ctx.ServiceManager
doc = smgr.createInstanceWithContext("com.sun.star.sdb.DatabaseDocument", ctx)
datasource = doc.getDataSource()
datasource.URL = f"sdbc:mysql:jdbc:mysql://{host}:{port}/{database}"
datasource.Properties["UserName"] = user
datasource.Properties["Password"] = password
doc.storeToURL("file:///path/to/connected.odb", ())
return doc# MySQL
sdbc:mysql:jdbc:mysql://localhost:3306/database
# PostgreSQL
sdbc:postgresql://localhost:5432/database
# SQLite
sdbc:sqlite:file:///path/to/database.db
# ODBC
sdbc:odbc:DSN_NAMEsoffice --headless
soffice --base # Basepip install pyodbc # ODBC connectivity
pip install sqlalchemy # SQL toolkitkillall soffice.bin
soffice --headless --accept="socket,host=localhost,port=8100;urp;"a5a6601
Also appears in
since Sep 26, 2026
since Sep 26, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.