/
UCS
/
openwrt_packages
Обзор
Документация
Войти
/
UCS
/
openwrt_packages
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
lang/python/python-jsonschema/test.sh
21 строка
442 B
Jeffery To
python-jsonschema: Update to 4.19.1, update list of dependencies
30 ноя 2023, 07:57
30 ноя 2023, 07:57
36eb484
Код
Авторство
О чём код?
#!/bin/sh [ "$1" = python3-jsonschema ] || exit 0 python3 - << 'EOF' from jsonschema import validate # A sample schema, like what we'd get from json.load() schema = { "type" : "object", "properties" : { "price" : {"type" : "number"}, "name" : {"type" : "string"}, }, } # If no exception is raised by validate(), the instance is valid. validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema) EOF