Linux ams-business-8.hostwindsdns.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64
LiteSpeed
Server IP : 192.236.177.161 & Your IP : 216.73.216.50
Domains :
Cant Read [ /etc/named.conf ]
User : ajzdfbpz
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.6 /
site-packages /
jsonschema /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-02-12 23:54
schemas
[ DIR ]
drwxr-xr-x
2024-02-12 23:54
tests
[ DIR ]
drwxr-xr-x
2024-02-12 23:54
__init__.py
679
B
-rw-r--r--
2015-07-24 21:41
__main__.py
39
B
-rw-r--r--
2015-07-24 21:41
_format.py
6.88
KB
-rw-r--r--
2016-11-27 16:02
_reflect.py
4.91
KB
-rw-r--r--
2015-07-24 21:41
_utils.py
4.92
KB
-rw-r--r--
2016-11-27 15:39
_validators.py
11.98
KB
-rw-r--r--
2017-01-26 18:18
_version.py
122
B
-rw-r--r--
2017-02-05 12:23
cli.py
2.1
KB
-rw-r--r--
2017-02-04 18:23
compat.py
1.52
KB
-rw-r--r--
2019-11-24 18:37
exceptions.py
6.86
KB
-rw-r--r--
2016-11-27 16:06
validators.py
15.83
KB
-rw-r--r--
2016-11-27 16:24
Save
Rename
from __future__ import absolute_import import argparse import json import sys from jsonschema._reflect import namedAny from jsonschema.validators import validator_for def _namedAnyWithDefault(name): if "." not in name: name = "jsonschema." + name return namedAny(name) def _json_file(path): with open(path) as file: return json.load(file) parser = argparse.ArgumentParser( description="JSON Schema Validation CLI", ) parser.add_argument( "-i", "--instance", action="append", dest="instances", type=_json_file, help=( "a path to a JSON instance (i.e. filename.json)" "to validate (may be specified multiple times)" ), ) parser.add_argument( "-F", "--error-format", default="{error.instance}: {error.message}\n", help=( "the format to use for each error output message, specified in " "a form suitable for passing to str.format, which will be called " "with 'error' for each error" ), ) parser.add_argument( "-V", "--validator", type=_namedAnyWithDefault, help=( "the fully qualified object name of a validator to use, or, for " "validators that are registered with jsonschema, simply the name " "of the class." ), ) parser.add_argument( "schema", help="the JSON Schema to validate with (i.e. filename.schema)", type=_json_file, ) def parse_args(args): arguments = vars(parser.parse_args(args=args or ["--help"])) if arguments["validator"] is None: arguments["validator"] = validator_for(arguments["schema"]) return arguments def main(args=sys.argv[1:]): sys.exit(run(arguments=parse_args(args=args))) def run(arguments, stdout=sys.stdout, stderr=sys.stderr): error_format = arguments["error_format"] validator = arguments["validator"](schema=arguments["schema"]) validator.check_schema(arguments["schema"]) errored = False for instance in arguments["instances"] or (): for error in validator.iter_errors(instance): stderr.write(error_format.format(error=error)) errored = True return errored