{"id":313438,"date":"2020-11-19T15:01:25","date_gmt":"2020-11-19T15:01:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=313438"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=313438","title":{"rendered":"\u041c\u0435\u043b\u043a\u0430\u044f \u043f\u0438\u0442\u043e\u043d\u044f\u0447\u0430\u044f \u0440\u0430\u0434\u043e\u0441\u0442\u044c #13: \u0441\u0442\u043e\u0439\u043a\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u0438, \u0433\u0438\u0431\u043a\u0438\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u0432\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0442\u0435\u0441\u0442\u044b API"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/28f\/6c3\/f64\/28f6c3f6410312d0dbba2874ed065ca7.png\" width=\"811\" height=\"488\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c Python \u0438 \u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440 \u0413\u0432\u0438\u0434\u043e \u0412\u0430\u043d \u0420\u043e\u0441\u0441\u0443\u043c \u0431\u044b\u043b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0439\u0442\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443, \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0432 \u041c\u0430\u0439\u043a\u0440\u043e\u0441\u043e\u0444\u0442. \u041d\u0435\u0442, \u0413\u0432\u0438\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u043d\u0435&nbsp;\u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430 15 000 \u0440\u0443\u0431\u043b\u0435\u0439 (200 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432) \u043f\u0435\u043d\u0441\u0438\u0438&nbsp;\u0435\u043c\u0443&nbsp;\u0442\u044f\u0436\u0435\u043b\u043e \u0436\u0438\u0442\u044c \u2014 \u0432 MS \u043e\u043d \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u0441\u044f \u043e\u0442 \u0441\u043a\u0443\u043a\u0438: \u0442\u0430\u043b\u0430\u043d\u0442\u043b\u0438\u0432\u043e\u043c\u0443 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0443 \u043d\u0435 \u0441\u0438\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u0434\u0435\u043b\u0430. \u0416\u0435\u043b\u0430\u044e \u0432\u0441\u0435\u043c \u043d\u0430\u043c \u0432 \u0441\u0442\u0430\u0440\u043e\u0441\u0442\u0438 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u0413\u0432\u0438\u0434\u043e \u0438 \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u0442\u0440\u0435\u0445 \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0448\u0442\u0443\u043a\u043e\u0432\u0438\u043d \u0438\u0437 \u043f\u0438\u0442\u043e\u043d\u044f\u0447\u0435\u0433\u043e \u043c\u0438\u0440\u0430.&nbsp;<\/p>\n<h2>zxcvbn-python<\/h2>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043f\u0430\u0440\u043e\u043b\u0438 \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435? \u0422\u0430\u043a, \u043a\u0430\u043a \u043c\u044b \u0432\u0441\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u043d\u0435 \u0440\u0430\u0437 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u0438 \u2014 \u201c\u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u043e\u0441\u044c\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043e\u0434\u043d\u0443 \u0446\u0438\u0444\u0440\u0443, \u043e\u0434\u0438\u043d \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b \u0438 \u0438\u043c\u044f \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u0414\u043e\u0441\u0442\u043e\u0435\u0432\u0441\u043a\u043e\u0433\u043e\u201d. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0442\u0430\u043a\u0438\u0435 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a\u0430, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u043e \u044d\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u2014 \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044f \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0438 \u043b\u043e\u0433\u0438\u043d\u0430. \u0418\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0430\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u0445 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0445\u0435\u0448\u0435\u0439.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/dwolfhub\/zxcvbn-python\" rel=\"noopener noreferrer nofollow\">zxcvbn-python<\/a> \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043b\u0438\u0431\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043a\u0440\u044b\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u0445\u044d\u0448\u0435\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0444\u043e\u0440\u043c\u0443 \u043b\u043e\u0433\u0438\u043d\u0430. \u0410 \u0435\u0449\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0441\u0442\u043e\u0439\u043a\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a\u0430\u043c\u0438.&nbsp;<\/p>\n<pre><code class=\"python\">from zxcvbn import zxcvbn  results = zxcvbn('JohnSmith123', user_inputs=['John', 'Smith'])  print(results)<\/code><\/pre>\n<pre><code class=\"python\">{     'password': 'JohnSmith123',     'score': 2,     'guesses': 2567800,     'guesses_log10': 6.409561194521849,     'calc_time': datetime.timedelta(0, 0, 5204)     'feedback': {         'warning': '',         'suggestions': [             'Add another word or two. Uncommon words are better.',             \"Capitalization doesn't help very much\"         ]     },     'crack_times_display': {         'offline_fast_hashing_1e10_per_second': 'less than a second'         'offline_slow_hashing_1e4_per_second': '4 minutes',         'online_no_throttling_10_per_second': '3 days',         'online_throttling_100_per_hour': '3 years',     },     'crack_times_seconds': {         'offline_fast_hashing_1e10_per_second': 0.00025678,         'offline_slow_hashing_1e4_per_second': 256.78         'online_no_throttling_10_per_second': 256780.0,         'online_throttling_100_per_hour': 92440800.0,     },     'sequence': [{         'matched_word': 'john',         'rank': 2,         'pattern': 'dictionary',         'reversed': False,         'token': 'John',         'l33t': False,         'uppercase_variations': 2,         'i': 0,         'guesses': 50,         'l33t_variations': 1,         'dictionary_name': 'male_names',         'base_guesses': 2,         'guesses_log10': 1.6989700043360185,         'j': 3     }, {         'matched_word': 'smith123',         'rank': 12789,         'pattern': 'dictionary',         'reversed': False,         'token': 'Smith123',         'l33t': False,         'uppercase_variations': 2,         'i': 4,         'guesses': 25578,         'l33t_variations': 1,         'dictionary_name': 'passwords',         'base_guesses': 12789,         'guesses_log10': 4.407866583030775,         'j': 11     }], }<\/code><\/pre>\n<p>\u041d\u0443 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043a\u0443 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0430 Y \u043c\u0438\u043d\u0443\u0442 \u043f\u043e\u0441\u043b\u0435&nbsp;X \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<h2>Notifiers<\/h2>\n<p>\u201c\u0410 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443 \u043d\u0430\u0441 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0430\u043c \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0438 \u0432 Slack\u201d \u2014 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0444\u0440\u0430\u0437\u044b \u043e\u0442 \u0441\u0432\u043e\u0438\u0445 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041b\u0438\u0431\u043e \u0434\u0435\u043b\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c SMTP \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043b\u0438\u0431\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043b\u0438\u0431\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u044b\u043b\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043a\u0443\u0434\u0430 \u043d\u0430\u0434\u043e, \u043b\u0438\u0431\u043e \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u041e\u041e\u041f \u043a\u043e\u043c\u0431\u0430\u0439\u043d \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u044b\u043b\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043b\u044e\u0431\u044b\u043c \u043c\u044b\u0441\u043b\u0438\u043c\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0433\u043e\u043b\u0443\u0431\u0438\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443).<\/p>\n<p>\u0421\u0430\u043c\u044b\u0435 \u0440\u044c\u044f\u043d\u044b\u0435 \u0438 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432 \u043c\u0438\u0440\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0441\u0430\u043c\u044b\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 (\u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0447\u0435\u0433\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e), \u043d\u043e \u0438 \u043e\u0444\u043e\u0440\u043c\u0438\u043b\u0438 \u043f\u0438\u0442\u043e\u043d\u044f\u0447\u0438\u0439 \u043f\u0430\u043a\u0435\u0442 \u043d\u0430 github. \u0412\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c <a href=\"https:\/\/notifiers.readthedocs.io\/en\/latest\/\" rel=\"noopener noreferrer nofollow\">notifiers<\/a>  \u2014 \u043e\u0434\u043d\u0430 \u043b\u0438\u0431\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0441\u0440\u0430\u0437\u0443 \u0432 \u043a\u0443\u0447\u0443 \u043c\u0435\u0441<\/p>\n<ul>\n<li>\n<p>Email (SMTP)<\/p>\n<\/li>\n<li>\n<p>Gitter<\/p>\n<\/li>\n<li>\n<p>Gmail<\/p>\n<\/li>\n<li>\n<p>Hipchat<\/p>\n<\/li>\n<li>\n<p>Join<\/p>\n<\/li>\n<li>\n<p>Mailgun<\/p>\n<\/li>\n<li>\n<p>Pagerduty<\/p>\n<\/li>\n<li>\n<p>PopcornNotify<\/p>\n<\/li>\n<li>\n<p>Pushbullet<\/p>\n<\/li>\n<li>\n<p>Pushover<\/p>\n<\/li>\n<li>\n<p>SimplePush<\/p>\n<\/li>\n<li>\n<p>Slack (Webhooks)<\/p>\n<\/li>\n<li>\n<p>StatusPage<\/p>\n<\/li>\n<li>\n<p>Telegram<\/p>\n<\/li>\n<li>\n<p>Twilio<\/p>\n<\/li>\n<li>\n<p>Zulip<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">from notifiers import get_notifier telegram = get_notifier('telegram') telegram.notify(message='Hi!', token='TOKEN', chat_id=1234)<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u0432 \u043b\u043e\u0433\u0433\u0435\u0440: <\/p>\n<pre><code class=\"python\">import logging from notifiers.logging import NotificationHandler  log = logging.getLogger(__name__)  defaults = {         'token': 'foo',         'user': 'bar'     } hdlr = NotificationHandler('pushover', defaults=defaults) hdlr.setLevel(logging.ERROR)  log.addHandler(hdlr) log.error('And just like that, you get notified about all your errors!')<\/code><\/pre>\n<h2>Tavern<\/h2>\n<p>\u041e\u0434\u0438\u043d \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0441\u043a\u0430\u0436\u0435\u0442 \u201c\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u201d \u2014 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0435\u043c\u0443 \u043e\u0442\u0432\u0435\u0442\u044f\u0442 \u201cpytest\u201d. \u0414\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 pytest \u0441\u0442\u0430\u043b\u043e \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u043c \u0441\u043b\u043e\u0432\u0430 \u201c\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u201d. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043c\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u2014 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b,&nbsp;\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435: \u044d\u0442\u043e\u0439 \u043b\u0438\u0431\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0442\u043a\u043d\u0443\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0434\u044b\u0440\u043a\u0443.<\/p>\n<p>\u041d\u0438\u0447\u0435\u0433\u043e \u0443\u0436\u0430\u0441\u043d\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u2014 pytest \u0438 \u043f\u0440\u0430\u0432\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u0442\u044c. \u0411\u0435\u0440\u0435\u043c \u044d\u0442\u0443 \u043b\u0438\u0431\u0443, \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c requests, \u043f\u0438\u0448\u0435\u043c \u043a\u0443\u0447\u0443 \u0432\u0441\u044f\u043a\u0438\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u043a API \u2014 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043a\u043e\u043c\u0431\u0430\u0439\u043d \u043f\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e API.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 pytest \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f API \u043a\u043e\u0434 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u0443\u043a\u0430\u043c\u0438 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0435\u0449\u0438. \u0422\u0435, \u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435, \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u043e \u0447\u0435\u043c \u0438\u0434\u0435\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f API \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u2014 <a href=\"https:\/\/tavern.readthedocs.io\/en\/latest\/basics.html\" rel=\"noopener noreferrer nofollow\">tavern<\/a>. <\/p>\n<p>Tavern \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b API \u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 YAML. \u0418 \u0432 \u044d\u0442\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0443\u0436\u0435 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u2014 \u0432\u044b\u0437\u043e\u0432\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0442\u0432\u0435\u0442\u0430\u0445.\u0420\u0430\u0441\u0442\u0435\u0442 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c, \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0440\u0435\u044e\u0437\u0430\u0431\u0435\u043b\u044c\u043e\u0441\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u0430 \u0447\u0442\u043e \u043d\u0430\u043c \u0435\u0449\u0435 \u043d\u0443\u0436\u043d\u043e?<\/p>\n<pre><code>test_name: Get some fake data from the JSON placeholder API  stages:   - name: Make sure we have the right ID     request:       url: https:\/\/jsonplaceholder.typicode.com\/posts\/1       method: GET     response:       status_code: 200       json:         id: 1       save:         json:           returned_id: id<\/code><\/pre>\n<\/p>\n<p>\u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0441\u0435, \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u043f\u0438\u0442\u043e\u043d\u044f\u0447\u0438\u0435 \u0440\u0430\u0434\u043e\u0441\u0442\u0438&nbsp;<a href=\"https:\/\/habr.com\/ru\/search\/?target_type=posts&amp;q=%5B%D0%BC%D0%B5%D0%BB%D0%BA%D0%B0%D1%8F%20%D0%BF%D0%B8%D1%82%D0%BE%D0%BD%D1%8F%D1%87%D0%B0%D1%8F%20%D1%80%D0%B0%D0%B4%D0%BE%D1%81%D1%82%D1%8C%5D&amp;order_by=date\" rel=\"noopener noreferrer nofollow\">\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/528046\/\"> https:\/\/habr.com\/ru\/post\/528046\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c Python \u0438 \u043f\u0435\u043d\u0441\u0438\u043e\u043d\u0435\u0440 \u0413\u0432\u0438\u0434\u043e \u0412\u0430\u043d \u0420\u043e\u0441\u0441\u0443\u043c \u0431\u044b\u043b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0441\u043d\u043e\u0432\u0430 \u0432\u044b\u0439\u0442\u0438 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443, \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0432 \u041c\u0430\u0439\u043a\u0440\u043e\u0441\u043e\u0444\u0442. \u041d\u0435\u0442, \u0413\u0432\u0438\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u043d\u0435&nbsp;\u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430 15 000 \u0440\u0443\u0431\u043b\u0435\u0439 (200 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432) \u043f\u0435\u043d\u0441\u0438\u0438&nbsp;\u0435\u043c\u0443&nbsp;\u0442\u044f\u0436\u0435\u043b\u043e \u0436\u0438\u0442\u044c \u2014 \u0432 MS \u043e\u043d \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u0441\u044f \u043e\u0442 \u0441\u043a\u0443\u043a\u0438: \u0442\u0430\u043b\u0430\u043d\u0442\u043b\u0438\u0432\u043e\u043c\u0443 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0443 \u043d\u0435 \u0441\u0438\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u0434\u0435\u043b\u0430. \u0416\u0435\u043b\u0430\u044e \u0432\u0441\u0435\u043c \u043d\u0430\u043c \u0432 \u0441\u0442\u0430\u0440\u043e\u0441\u0442\u0438 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u0413\u0432\u0438\u0434\u043e \u0438 \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u0442\u0440\u0435\u0445 \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0448\u0442\u0443\u043a\u043e\u0432\u0438\u043d \u0438\u0437 \u043f\u0438\u0442\u043e\u043d\u044f\u0447\u0435\u0433\u043e \u043c\u0438\u0440\u0430.&nbsp;<\/p>\n<h2>zxcvbn-python<\/h2>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043f\u0430\u0440\u043e\u043b\u0438 \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435? \u0422\u0430\u043a, \u043a\u0430\u043a \u043c\u044b \u0432\u0441\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u043d\u0435 \u0440\u0430\u0437 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u0438 \u2014 \u201c\u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u043e\u0441\u044c\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043e\u0434\u043d\u0443 \u0446\u0438\u0444\u0440\u0443, \u043e\u0434\u0438\u043d \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b \u0438 \u0438\u043c\u044f \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u0414\u043e\u0441\u0442\u043e\u0435\u0432\u0441\u043a\u043e\u0433\u043e\u201d. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0442\u0430\u043a\u0438\u0435 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a\u0430, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u043e \u044d\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u2014 \u0438\u043c\u044f \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u044f \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0438 \u043b\u043e\u0433\u0438\u043d\u0430. \u0418\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0430\u0440\u043e\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u0445 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0445\u0435\u0448\u0435\u0439.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/dwolfhub\/zxcvbn-python\" rel=\"noopener noreferrer nofollow\">zxcvbn-python<\/a> \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 \u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043b\u0438\u0431\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043a\u0440\u044b\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u0445\u044d\u0448\u0435\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0444\u043e\u0440\u043c\u0443 \u043b\u043e\u0433\u0438\u043d\u0430. \u0410 \u0435\u0449\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0441\u0442\u043e\u0439\u043a\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c \u0432\u0437\u043b\u043e\u043c\u0449\u0438\u043a\u0430\u043c\u0438.&nbsp;<\/p>\n<pre><code class=\"python\">from zxcvbn import zxcvbn  results = zxcvbn('JohnSmith123', user_inputs=['John', 'Smith'])  print(results)<\/code><\/pre>\n<pre><code class=\"python\">{     'password': 'JohnSmith123',     'score': 2,     'guesses': 2567800,     'guesses_log10': 6.409561194521849,     'calc_time': datetime.timedelta(0, 0, 5204)     'feedback': {         'warning': '',         'suggestions': [             'Add another word or two. Uncommon words are better.',             \"Capitalization doesn't help very much\"         ]     },     'crack_times_display': {         'offline_fast_hashing_1e10_per_second': 'less than a second'         'offline_slow_hashing_1e4_per_second': '4 minutes',         'online_no_throttling_10_per_second': '3 days',         'online_throttling_100_per_hour': '3 years',     },     'crack_times_seconds': {         'offline_fast_hashing_1e10_per_second': 0.00025678,         'offline_slow_hashing_1e4_per_second': 256.78         'online_no_throttling_10_per_second': 256780.0,         'online_throttling_100_per_hour': 92440800.0,     },     'sequence': [{         'matched_word': 'john',         'rank': 2,         'pattern': 'dictionary',         'reversed': False,         'token': 'John',         'l33t': False,         'uppercase_variations': 2,         'i': 0,         'guesses': 50,         'l33t_variations': 1,         'dictionary_name': 'male_names',         'base_guesses': 2,         'guesses_log10': 1.6989700043360185,         'j': 3     }, {         'matched_word': 'smith123',         'rank': 12789,         'pattern': 'dictionary',         'reversed': False,         'token': 'Smith123',         'l33t': False,         'uppercase_variations': 2,         'i': 4,         'guesses': 25578,         'l33t_variations': 1,         'dictionary_name': 'passwords',         'base_guesses': 12789,         'guesses_log10': 4.407866583030775,         'j': 11     }], }<\/code><\/pre>\n<p>\u041d\u0443 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043a\u0443 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0430 Y \u043c\u0438\u043d\u0443\u0442 \u043f\u043e\u0441\u043b\u0435&nbsp;X \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<h2>Notifiers<\/h2>\n<p>\u201c\u0410 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443 \u043d\u0430\u0441 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0430\u043c \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0438 \u0432 Slack\u201d \u2014 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0444\u0440\u0430\u0437\u044b \u043e\u0442 \u0441\u0432\u043e\u0438\u0445 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041b\u0438\u0431\u043e \u0434\u0435\u043b\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c SMTP \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043b\u0438\u0431\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043b\u0438\u0431\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u044b\u043b\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043a\u0443\u0434\u0430 \u043d\u0430\u0434\u043e, \u043b\u0438\u0431\u043e \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u041e\u041e\u041f \u043a\u043e\u043c\u0431\u0430\u0439\u043d \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u044b\u043b\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043b\u044e\u0431\u044b\u043c \u043c\u044b\u0441\u043b\u0438\u043c\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0433\u043e\u043b\u0443\u0431\u0438\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443).<\/p>\n<p>\u0421\u0430\u043c\u044b\u0435 \u0440\u044c\u044f\u043d\u044b\u0435 \u0438 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432 \u043c\u0438\u0440\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0441\u0430\u043c\u044b\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 (\u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0447\u0435\u0433\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e), \u043d\u043e \u0438 \u043e\u0444\u043e\u0440\u043c\u0438\u043b\u0438 \u043f\u0438\u0442\u043e\u043d\u044f\u0447\u0438\u0439 \u043f\u0430\u043a\u0435\u0442 \u043d\u0430 github. \u0412\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c <a href=\"https:\/\/notifiers.readthedocs.io\/en\/latest\/\" rel=\"noopener noreferrer nofollow\">notifiers<\/a>  \u2014 \u043e\u0434\u043d\u0430 \u043b\u0438\u0431\u0430 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0441\u0440\u0430\u0437\u0443 \u0432 \u043a\u0443\u0447\u0443 \u043c\u0435\u0441<\/p>\n<ul>\n<li>\n<p>Email (SMTP)<\/p>\n<\/li>\n<li>\n<p>Gitter<\/p>\n<\/li>\n<li>\n<p>Gmail<\/p>\n<\/li>\n<li>\n<p>Hipchat<\/p>\n<\/li>\n<li>\n<p>Join<\/p>\n<\/li>\n<li>\n<p>Mailgun<\/p>\n<\/li>\n<li>\n<p>Pagerduty<\/p>\n<\/li>\n<li>\n<p>PopcornNotify<\/p>\n<\/li>\n<li>\n<p>Pushbullet<\/p>\n<\/li>\n<li>\n<p>Pushover<\/p>\n<\/li>\n<li>\n<p>SimplePush<\/p>\n<\/li>\n<li>\n<p>Slack (Webhooks)<\/p>\n<\/li>\n<li>\n<p>StatusPage<\/p>\n<\/li>\n<li>\n<p>Telegram<\/p>\n<\/li>\n<li>\n<p>Twilio<\/p>\n<\/li>\n<li>\n<p>Zulip<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">from notifiers import get_notifier telegram = get_notifier('telegram') telegram.notify(message='Hi!', token='TOKEN', chat_id=1234)<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u0432 \u043b\u043e\u0433\u0433\u0435\u0440: <\/p>\n<pre><code class=\"python\">import logging from notifiers.logging import NotificationHandler  log = logging.getLogger(__name__)  defaults = {         'token': 'foo',         'user': 'bar'     } hdlr = NotificationHandler('pushover', defaults=defaults) hdlr.setLevel(logging.ERROR)  log.addHandler(hdlr) log.error('And just like that, you get notified about all your errors!')<\/code><\/pre>\n<h2>Tavern<\/h2>\n<p>\u041e\u0434\u0438\u043d \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0441\u043a\u0430\u0436\u0435\u0442 \u201c\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u201d \u2014 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0435\u043c\u0443 \u043e\u0442\u0432\u0435\u0442\u044f\u0442 \u201cpytest\u201d. \u0414\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 pytest \u0441\u0442\u0430\u043b\u043e \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u043c \u0441\u043b\u043e\u0432\u0430 \u201c\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u201d. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043c\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u2014 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b,&nbsp;\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435: \u044d\u0442\u043e\u0439 \u043b\u0438\u0431\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0442\u043a\u043d\u0443\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0434\u044b\u0440\u043a\u0443.<\/p>\n<p>\u041d\u0438\u0447\u0435\u0433\u043e \u0443\u0436\u0430\u0441\u043d\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u2014 pytest \u0438 \u043f\u0440\u0430\u0432\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u0442\u044c. \u0411\u0435\u0440\u0435\u043c \u044d\u0442\u0443 \u043b\u0438\u0431\u0443, \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c requests, \u043f\u0438\u0448\u0435\u043c \u043a\u0443\u0447\u0443 \u0432\u0441\u044f\u043a\u0438\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u043a API \u2014 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043a\u043e\u043c\u0431\u0430\u0439\u043d \u043f\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e API.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 pytest \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f API \u043a\u043e\u0434 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u0443\u043a\u0430\u043c\u0438 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0435\u0449\u0438. \u0422\u0435, \u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435, \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u043e \u0447\u0435\u043c \u0438\u0434\u0435\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f API \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u2014 <a href=\"https:\/\/tavern.readthedocs.io\/en\/latest\/basics.html\" rel=\"noopener noreferrer nofollow\">tavern<\/a>. <\/p>\n<p>Tavern \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b API \u0432 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 YAML. \u0418 \u0432 \u044d\u0442\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0443\u0436\u0435 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u2014 \u0432\u044b\u0437\u043e\u0432\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0442\u0432\u0435\u0442\u0430\u0445.\u0420\u0430\u0441\u0442\u0435\u0442 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c, \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0440\u0435\u044e\u0437\u0430\u0431\u0435\u043b\u044c\u043e\u0441\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u0430 \u0447\u0442\u043e \u043d\u0430\u043c \u0435\u0449\u0435 \u043d\u0443\u0436\u043d\u043e?<\/p>\n<pre><code>test_name: Get some fake data from the JSON placeholder API  stages:   - name: Make sure we have the right ID     request:       url: https:\/\/jsonplaceholder.typicode.com\/posts\/1       method: GET     response:       status_code: 200       json:         id: 1       save:         json:           returned_id: id<\/code><\/pre>\n<\/p>\n<p>\u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0441\u0435, \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u043f\u0438\u0442\u043e\u043d\u044f\u0447\u0438\u0435 \u0440\u0430\u0434\u043e\u0441\u0442\u0438&nbsp;<a href=\"https:\/\/habr.com\/ru\/search\/?target_type=posts&amp;q=%5B%D0%BC%D0%B5%D0%BB%D0%BA%D0%B0%D1%8F%20%D0%BF%D0%B8%D1%82%D0%BE%D0%BD%D1%8F%D1%87%D0%B0%D1%8F%20%D1%80%D0%B0%D0%B4%D0%BE%D1%81%D1%82%D1%8C%5D&amp;order_by=date\" rel=\"noopener noreferrer nofollow\">\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/528046\/\"> https:\/\/habr.com\/ru\/post\/528046\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-313438","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=313438"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313438\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}