Insert Data Script
Utility script for inserting demo person data into the database.
Functions
app.insertdata._build_demo_person
Build a demo Person instance with predefined values.
Creates a Person object with hardcoded demo data for testing purposes.
Returns:
| Name | Type | Description |
|---|---|---|
Person |
Person
|
A Person instance with demo data (name: "Demo", surname: "User", birthday: 2000-01-01, role: GUEST). |
Source code in backend/app/insertdata.py
app.insertdata.main
Main function to insert demo person data into the database.
Analyzes all images in the configured images folder, extracts face encodings, and inserts a demo person with the collected encodings into the database. Logs errors if no valid encodings are found or if database insertion fails.