Presets allow you to load multiple CSV to DB in order by one click.

For this you need to define folder with DB presets. Inside folder you puy config files for Presets described in yml format. In config file you define order in what to load CSV-s files, that files used to populate tables.

To see more clear example check & run examples with CSV in examples/base_example folder.

Let’s take a look on preset sample:

id: first_preset
name: First Preset
description: "Init DB with minimal data"
  users: csv/user.csv
  gifts: csv/gift.csv

This mean preset contains 2 csv files, firstly will be loaded csv/user.csv to users table, second will be loaded csv/gift.csv to gifts table.

In order defined in yml, Gino-Admin will load csv files to models. ‘files:’ describe that file (right sight) must be loaded to the model (left side).

Don’t forget to setup path to folder with presets like with ‘presets_folder’ argument, by default it tries to find presets in ‘presets/’ folder.


current_path = os.path.dirname(os.path.abspath(__file__))

    [User, Place, City, GiftCard, Country],
    presets_folder=os.path.join(current_path, "csv_to_upload"),

Check code samples in examples/base_example/