Schema validation
Here's the Cerberus validation schema for the config file:
shares:
type: list
required: True
empty: False
schema:
type: dict
required: True
schema:
name:
type: string
required: True
symbol:
type: string
required: True
purchase:
type: dict
required: True
schema:
quantity:
type: number
required: True
min: 0
fee:
type: number
required: True
min: 0
cost_price:
type: number
required: True
min: 0
estate:
type: dict
required: True
schema:
quantity:
type: number
required: True
min: 0
received_dividend:
type: number
required: True
min: 0