{"id":414232,"date":"2024-06-29T23:38:28","date_gmt":"2024-06-29T23:38:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=414232"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T23:38:28","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=414232","title":{"rendered":"<span>\u041f\u0430\u0440\u0441\u0438\u043c \u0431\u0430\u0437\u0443 \u044e\u0440\u0438\u043a\u043e\u0432 \u0424\u041d\u0421 (\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441 xml, csv, SQLite \u0438 \u041f\u0438\u0442\u043e\u043d\u043e\u043c)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong><em>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f: <\/em><\/strong><em>\u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0438 \u043a\u0440\u0443\u0442\u044b\u043c \u0441\u043f\u0435\u0446\u0430\u043c \u043f\u043e \u043a\u043e\u0434\u0438\u043d\u0433\u0443 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0435\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0412 \u043a\u043e\u0434\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b SQLite. \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u043a\u0430\u043a \u043d\u0438\u0436\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e, \u043d\u043e \u0441 \u0437\u0430\u044f\u0432\u043a\u043e\u0439 \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443. \u041a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u0435\u0437 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u043d\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c\u0441\u044f.<\/em><\/p>\n<hr\/>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/585592\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 (\u0447\u0430\u0441\u0442\u044c 2): &#171;\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441 Python, xml, csv, sqlite. \u0427\u0430\u0441\u0442\u044c 2. \u0418\u0449\u0435\u043c \u0438 \u043f\u0440\u0430\u0432\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0438, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u043b\u0435\u0442\u0430\u0435\u043c \u043d\u0430\u2026&#187;<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/588066\/\" rel=\"noopener noreferrer nofollow\">\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0442\u0440\u0438\u043b\u043e\u0433\u0438\u0438 \u0442\u0443\u0442 (\u0447\u0430\u0441\u0442\u044c 3): &#171;\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u043e-\u043f\u0438\u0442\u043e\u043d\u0438\u0439 \u0431\u043e\u0439 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 sqlite \u0437\u0430 2 174 433 \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0427\u0430\u0441\u0442\u044c 3&#187;<\/a><\/p>\n<h3>\u0412\u0432\u043e\u0434\u043d\u0430\u044f<\/h3>\n<p><strong>\u0427\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/strong> \u0432\u0437\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043b\u0438\u0446\u0430\u043c (\u042e\u041b) \u0420\u0424 \u0437\u0430 2019 \u0433\u043e\u0434 (\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u042e\u041b: \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0418\u041d\u041d(\u042e\u041b), \u043e\u0431\u043e\u0440\u043e\u0442, \u0440\u0430\u0441\u0445\u043e\u0434) \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 SQLite. <\/p>\n<p>\u0414\u043b\u044f \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0432 <strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b<\/strong> (\u043d\u043e \u043d\u0435 \u043f\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u043b\u0438):<\/p>\n<ul>\n<li>\n<p>\u0412\u0438\u043d\u0434\u043e\u0432\u0441 7\u044564<\/p>\n<\/li>\n<li>\n<p>\u041f\u0438\u0442\u043e\u043d 3.8.10 (\u0435\u0441\u043b\u0438 \u043d\u0435\u0442, <a href=\"https:\/\/www.python.org\/downloads\/\" rel=\"noopener noreferrer nofollow\">\u0431\u0435\u0440\u0435\u043c \u0442\u0443\u0442<\/a>).<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 IDE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c Visual Studio Code, \u043d\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e, \u0445\u043e\u0442\u044c \u0431\u043b\u043e\u043a\u043d\u043e\u0442.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u0442\u0430\u043f<\/h3>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443:                                                                                                       <strong><u>(cmd) D:\\>mkdir 2021_8_16_oborot<\/u><\/strong>                                                                               \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443: <strong><u>(cmd) D:\\>cd 2021_8_16_oborot<\/u><\/strong>                                                                           \u0418 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430:                                                             <strong><u>(cmd) D:\\2021_8_16_oborot>python -m venv venv<\/u><\/strong>                                                             \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:                                           <strong><u>(cmd) D:\\2021_8_16_oborot>venv\\scripts\\activate<\/u><\/strong>                                                             \u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u043d\u043e \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e IDE \u0438 \u0435\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b.                                                                                               <strong><em>VSCode,<\/em><\/strong> \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<h3>\u041a\u0430\u0447\u0430\u0435\u043c<\/h3>\n<p>\u041a\u0430\u0447\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b. \u041b\u0443\u0447\u0448\u0435 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0430\u0443\u043d\u043b\u043e\u0434\u0435\u0440\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Downloader Master). \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u0445 \u043a\u0430\u0447\u0430\u0442\u044c \u0431\u0430\u0437\u044b \u0441 \u0424\u041d\u0421 \u0438\/\u0438\u043b\u0438 \u0420\u043e\u0441\u0441\u0442\u0430\u0442\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0441\u043a\u0430\u0447\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 <a href=\"https:\/\/data.nalog.ru\/opendata\/7707329152-revexp\/data-20210801-structure-20180801.zip\" rel=\"noopener noreferrer nofollow\">\u0444\u0430\u0439\u043b \u0431\u0435\u0440\u0435\u043c \u0442\u0443\u0442.<\/a>                                                                                                                          \u041a\u043b\u0430\u0434\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043f\u043a\u0443: <strong><em><u>D:\/2021_8_16_oborot\/ish<\/u><\/em><\/strong>                                                \u0422\u0430\u043c \u0436\u0435 \u0431\u0435\u0440\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 <a href=\"https:\/\/data.nalog.ru\/opendata\/7707329152-revexp\/structure-20180110.xsd\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (.xsd).<\/a><\/p>\n<h3>\u0420\u0430\u0441\u0437\u0438\u043f\u043e\u0432\u044b\u0432\u0430\u0435\u043c<\/h3>\n<p>\u041f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0441\u0440\u0430\u0437\u0443 \u0440\u0430\u0441\u0437\u0438\u043f\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code># D\\2021_8_16_oborot\\16.08.2021_unzip_ziped_directory.py  from zipfile import ZipFile  with ZipFile('D:\/2021_8_16_oborot\/ish\/data-20210801-structure-20180801.zip', 'r') as zipObj:     zipObj.extractall('D:\/2021_8_16_oborot\/ish_unziped') <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 IDE (\u043f\u0440\u0430\u0432\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0430 \u043c\u044b\u0448\u0438 \u0438 &#171;Run Python file in Terminal&#187;). \u0415\u0441\u043b\u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <strong><em>zipfile<\/em><\/strong> \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0440\u0443\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0435\u0433\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435. \u041f\u043e\u0442\u043e\u043c\u0443 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 IDE (\u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0412\u0438\u043d\u0434\u043e\u0443\u0441, \u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430):                                                                <strong><u>(venv) D:\\2021_8_16_oborot>pip install zipfile<\/u><\/strong>                          \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 (\u043f\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c\u0438 \u0432 VScode \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430):                                  <strong><u>(venv) D:\\2021_8_16_oborot><\/u><\/strong>                                                                         \u0415\u0441\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0432 \u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0412\u0438\u043d\u0434\u043e\u0443\u0441.  <strong><em>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u0442\u043e\u0433: \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435\u0442, \u0444\u0430\u0439\u043b \u0440\u0430\u0441\u0437\u0438\u043f\u043e\u0432\u0430\u043b\u0441\u044f \u0432 12 060 xml \u0444\u0430\u0439\u043b\u043e\u0432.<\/em><\/strong><\/p>\n<h3>\u041b\u044e\u0431\u0443\u0435\u043c\u0441\u044f \u043d\u0430 xml<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0442\u043e \u0442\u0430\u043c \u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0439 (\u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438) \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438         <\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?>&lt;\u0424\u0430\u0439\u043b \u0418\u0434\u0424\u0430\u0439\u043b=\"VO_OTKRDAN5_9965_9965_20210729_000f7269-b452-4bb0-85ea-3fa614ec3342\" \u0412\u0435\u0440\u0441\u0424\u043e\u0440\u043c=\"4.01\" \u0412\u0435\u0440\u0441\u041f\u0440\u043e\u0433=\"1.0\" \u0422\u0438\u043f\u0418\u043d\u0444=\"&amp;#x41E;&amp;#x422;&amp;#x41A;&amp;#x420;&amp;#x414;&amp;#x410;&amp;#x41D;&amp;#x41D;&amp;#x42B;&amp;#x415;5\" \u041a\u043e\u043b\u0414\u043e\u043a=\"92\">&lt;\u0418\u0434\u041e\u0442\u043f\u0440>&lt;\u0424\u0418\u041e\u041e\u0442\u0432 \u0424\u0430\u043c\u0438\u043b\u0438\u044f=\"_\" \u0418\u043c\u044f=\"_\"\/>&lt;\/\u0418\u0434\u041e\u0442\u043f\u0440>&lt;\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0418\u0434\u0414\u043e\u043a=\"b6db52b9-1955-4c94-8dd8-cbc4a3da40d8\" \u0414\u0430\u0442\u0430\u0414\u043e\u043a=\"30.07.2021\" \u0414\u0430\u0442\u0430\u0421\u043e\u0441\u0442=\"31.12.2019\">&lt;\u0421\u0432\u0435\u0434\u041d\u041f \u041d\u0430\u0438\u043c\u041e\u0440\u0433=\"&amp;#x41E;&amp;#x411;&amp;#x429;&amp;#x415;&amp;#x421;&amp;#x422;&amp;#x412;&amp;#x41E; &amp;#x421;&amp;#x41E;&amp;#x413;&amp;#x420;&amp;#x410;&amp;#x41D;&amp;#x418;&amp;#x427;&amp;#x415;&amp;#x41D;&amp;#x41D;&amp;#x41E;&amp;#x419;&amp;#x41E;&amp;#x422;&amp;#x412;&amp;#x415;&amp;#x422;&amp;#x421;&amp;#x422;&amp;#x412;&amp;#x415;&amp;#x41D;&amp;#x41D;&amp;#x41E;&amp;#x421;&amp;#x422;&amp;#x42C;&amp;#x42E; &amp;quot;&amp;#x424;&amp;#x418;&amp;#x411;&amp;#x420;&amp;#x41E;&amp;#x422;&amp;#x415;&amp;#x41A;&amp;quot;\" \u0418\u041d\u041d\u042e\u041b=\"7816394401\"\/>&lt;\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445 \u0421\u0443\u043c\u0414\u043e\u0445\u043e\u0434=\"0.00\" \u0421\u0443\u043c\u0420\u0430\u0441\u0445\u043e\u0434=\"0.00\"\/>&lt;\/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442>&lt;\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0418\u0434\u0414\u043e\u043a=\"1cd8ab78.....<\/code><\/pre>\n<p>\u0410 \u043d\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043b\u0438\u0446\u0430\u043c. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0444\u0430\u0439\u043b\u0435 xml \u0438\u0445 \u043e\u0442 1 \u0434\u043e 100 (\u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e):<\/p>\n<pre><code class=\"xml\">\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u0438\u0446\u0430 (\u0441\u0430\u043c\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e-\u043f\u0440\u0430\u0432\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0430) \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432 \"\u0421\u0432\u0435\u0434\u041d\u041f \u041d\u0430\u0438\u043c\u041e\u0440\u0433\", \u0418\u041d\u041d\u042e\u041b (\u0438\u043d\u043d \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u0438\u0446\u0430) \u0432 \"\u0421\u0432\u0435\u0434\u041d\u041f \u0418\u041d\u041d\u042e\u041b\", \u0414\u043e\u0445\u043e\u0434 \u0432 \"\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445 \u0421\u0443\u043c\u0414\u043e\u0445\u043e\u0434\", \u0420\u0430\u0441\u0445\u043e\u0434 \u0432 \"\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445 \u0421\u0443\u043c\u0420\u0430\u0441\u0445\u043e\u0434\"<\/code><\/pre>\n<p>\u041d\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u043d\u043e .csv \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0443 \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 D:\\2021_8_16_oborot\\csv                                                                       \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e-\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 \u0432\u0437\u044f\u043b\u0438 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u0438\u0437 12 060, \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e \u0432 test.xml \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 .csv \u0444\u0430\u0439\u043b.<\/p>\n<pre><code class=\"python\"># D:\\2021_8_16_oborot\\26.08.2021_finish_xml_to_csv.py  import xml.etree.ElementTree as Xet  f = open('17_your_csv_file.csv', 'w', encoding='utf-8') # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 xmlparse = Xet.parse('D:\/2021_8_16_oborot\/ish_unziped\/test1.xml')  root = xmlparse.getroot()  for i in root:    for i2 in i.findall('\u0421\u0432\u0435\u0434\u041d\u041f'):        f.writelines(i2.attrib['\u041d\u0430\u0438\u043c\u041e\u0440\u0433'])       f.write(',')       f.writelines(i2.attrib['\u0418\u041d\u041d\u042e\u041b'])       f.write(',')              for i2 in i.findall('\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445'):           f.writelines(i2.attrib['\u0421\u0443\u043c\u0414\u043e\u0445\u043e\u0434'])          f.write(',')          f.writelines(i2.attrib['\u0421\u0443\u043c\u0420\u0430\u0441\u0445\u043e\u0434'])          f.write('\\n')      f.close()<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043a\u043e\u0434, \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u041e\u041a. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"markdown\">\u041e\u0411\u0429\u0415\u0421\u0422\u0412\u041e \u0421 \u041e\u0413\u0420\u0410\u041d\u0418\u0427\u0415\u041d\u041d\u041e\u0419 \u041e\u0422\u0412\u0415\u0422\u0421\u0422\u0412\u0415\u041d\u041d\u041e\u0421\u0422\u042c\u042e \"\u0424\u0418\u0411\u0420\u041e\u0422\u0415\u041a\",7816394401,0.00,0.00 \u041e\u0411\u0429\u0415\u0421\u0422\u0412\u041e \u0421 \u041e\u0413\u0420\u0410\u041d\u0418\u0427\u0415\u041d\u041d\u041e\u0419 \u041e\u0422\u0412\u0415\u0422\u0421\u0422\u0412\u0415\u041d\u041d\u041e\u0421\u0422\u042c\u042e \"\u0418\u0417\u0414\u0410\u0422\u0415\u041b\u042c\u0421\u041a\u0418\u0419 \u0414\u041e\u041c \"\u0422\u0412\u0415\u0420\u0421\u041a\u0410\u042f \u0416\u0418\u0417\u041d\u042c\",6901026686,0.00,0.00 \u041e\u0411\u0429\u0415\u0421\u0422\u0412\u041e \u0421 \u041e\u0413\u0420\u0410\u041d\u0418\u0427\u0415\u041d\u041d\u041e\u0419 \u041e\u0422\u0412\u0415\u0422\u0421\u0422\u0412\u0415\u041d\u041d\u041e\u0421\u0422\u042c\u042e \"\u041c\u0420\u0410\u0412\",7726503712,20800000.00,14102000.00 \u041e\u0411\u0429\u0415\u0421\u0422\u0412\u041e \u0421 \u041e\u0413\u0420\u0410\u041d\u0418\u0427\u0415\u041d\u041d\u041e\u0419 \u041e\u0422\u0412\u0415\u0422\u0421\u0422\u0412\u0415\u041d\u041d\u041e\u0421\u0422\u042c\u042e \"\u0410\u0413\u0420\u041e\u0420\u0415\u0421\u0423\u0420\u0421\",6901026703,470000.00,461000.00<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u042e\u041b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435, \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432 \u0446\u0438\u043a\u043b\u0435 \u0431\u0440\u0430\u0442\u044c \u0438 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0432\u0441\u0435 12 060 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<pre><code class=\"python\">import os import xml.etree.ElementTree as Xet  def parse_dii():    path = 'D:\/2021_8_16_oborot\/ish_unziped\/'    fileList = os.listdir(path)    for t in fileList:       with open('D:\/2021_8_16_oborot\/ish_unziped\/' + t, 'r', encoding='utf-8') as ft:          base = os.path.splitext(t)[0]          with open(('D:\/2021_8_16_oborot\/csv' + base + '.csv'), 'w+', encoding='utf-8') as f:             xmlparse = Xet.parse('D:\/2021_8_16_oborot\/ish_unziped\/' + t)             root = xmlparse.getroot()             for i in root:                for i2 in i.findall('\u0421\u0432\u0435\u0434\u041d\u041f'):                f.writelines(i2.attrib['\u041d\u0430\u0438\u043c\u041e\u0440\u0433'])                f.write(',')                f.writelines(i2.attrib['\u0418\u041d\u041d\u042e\u041b'])                f.write(',')                     for i2 in i.findall('\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445'):                      f.writelines(i2.attrib['\u0421\u0443\u043c\u0414\u043e\u0445\u043e\u0434'])                      f.write(',')                      f.writelines(i2.attrib['\u0421\u0443\u043c\u0420\u0430\u0441\u0445\u043e\u0434'])                      f.write('\\n')   if __name__ == '__main__':     parse_dii()<\/code><\/pre>\n<h3>\u0421\u0430\u043c\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043d\u0430 \u0433\u0440\u0430\u0431\u043b\u0438, \u0441\u0430\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043c<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u0441\u0435 csv \u0444\u0430\u0439\u043b\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043f\u0443\u0442\u044f\u0445 (\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 &#8216;\/&#8217; \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435:<\/p>\n<pre><code class=\"python\">with open(('D:\/2021_8_16_oborot\/csv' + base + '.csv'), 'w+', encoding='utf-8') as f:) <\/code><\/pre>\n<p>\u0418 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <strong><em><u>D:\\2021_8_16_oborot\\csv\\<\/u><\/em><\/strong> \u043e\u043d\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0447\u0442\u043e \u043d\u0435 \u0433\u0443\u0434.                                                                                                        \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u043a\u0443\u0434\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e.<\/p>\n<pre><code class=\"python\"># D:\\2021_8_16_oborot\\26.08.2021_peremeshalka_csv_to_csv_1.py  import os import shutil  def parse_dii():    old_path = 'D:\/2021_8_16_oborot'    new_path = 'D:\/2021_8_16_oborot\/csv\/'    fileList = os.listdir(old_path)         for t in fileList:             if t[0:25] == 'csvVO_OTKRDAN5_9965_9965_':          t1 = t[3:]          with open(new_path + t1, 'w+', encoding='utf-8') as f:             shutil.move(t, new_path+t1)              print(new_path + t1)  if __name__ == '__main__':     parse_dii()<\/code><\/pre>\n<p><strong><em>\u0424\u0430\u0439\u043b\u044b \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u044b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u044b.<\/em><\/strong><\/p>\n<h3>\u041f\u0438\u0442\u043e\u043d\u0438\u043c \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e<\/h3>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u041f\u0438\u0442\u043e\u043d\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438\u0437 \u0432\u0441\u0435\u0445 12060 csv \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043a\u0430 \u0440\u0435\u0448\u0438\u0442\u044c.  \u0421 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0438 \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044e. <\/p>\n<h3>\u041d\u0435\u0432\u0437\u0438\u0440\u0430\u044f \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435<\/h3>\n<p>\u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0438\u043d\u0438\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0442\u043e \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u043a \u0444\u0438\u043d\u0438\u0448\u0443.  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0448\u043b\u0438 \u0442\u0430\u043a: \u0441\u043b\u0438\u043b\u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0434\u0438\u043d csv \u0444\u0430\u0439\u043b. <\/p>\n<pre><code class=\"python\"># D:\\2021_8_16_oborot\\05.09.2021_all_csv_to_one_csv.py  import os import glob  os.chdir(\"D:\/2021_8_16_oborot\/csv\/\") extension = 'csv' all_filenames = [i for i in glob.glob('*.{}'.format(extension))] combined_csv = '\\n'.join([open(f, 'r', encoding='utf-8').read().strip() for f in all_filenames ]) with open(\"combined_csv.csv\", 'w') as f:     f.write(combined_csv)<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043f\u043e\u0447\u0442\u0438 0,7\u0413\u0411 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e \u0431\u043b\u0430\u0433\u043e\u043f\u043e\u043b\u0443\u0447\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0441\u044f.<\/p>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442 \u0435\u0434\u0438\u043d\u043e\u0433\u043e csv \u0432 SQLite<\/h3>\n<p>\u0420\u0430\u0437 \u0443\u0436 \u0443 \u043d\u0430\u0441 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0434\u0435\u043d\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f, \u0442\u043e \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b SQLite \u0432\u043c\u0435\u0441\u0442\u043e \u041f\u0438\u0442\u043e\u043d\u0430.<\/p>\n<p><strong><u>\u0412 \u0438\u0442\u043e\u0433\u0435:<\/u><\/strong><\/p>\n<ol>\n<li>\n<p><strong><em>DB browser (SQLite)<\/em><\/strong> \u043d\u0435 \u0441\u043c\u043e\u0433 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b. \u0412\u044b\u043b\u0435\u0442\u0435\u043b \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e &#171;\u042d\u0442\u043e \u043d\u0435 \u043e\u0448\u0438\u0431\u043a\u0430, \u043d\u043e \u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u2116 1 125 507 \u0447\u043e\u0439-\u0442\u043e \u043d\u0435 \u0442\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u043d\u0443\u043b \u0438 <strong><em>SQLite Expert<\/em><\/strong><\/p>\n<\/li>\n<li>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439, \u043a\u0442\u043e \u0441\u043c\u043e\u0433 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u044b\u043b <strong><em>SQLite Studio<\/em><\/strong> (ver.3.3.3). \u0411\u044b\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e 1 089 044 \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e \u0438\u0434\u0435\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u042e\u041b. \u041d\u043e \u043a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u0442\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u043e\u0434\u043d\u0443 \u044f\u0447\u0435\u0439\u043a\u0443 \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u042e\u041b, \u0447\u0435\u0433\u043e, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u0431\u044b\u0442\u044c. \u041f\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u0434\u0435\u044f, \u0447\u0442\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0432 csv \u0444\u0430\u0439\u043b\u0430\u0445 \u0435\u0441\u0442\u044c \u0431\u0438\u0442\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u043e\u043c\u0430\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041d\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<h3>\u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p><strong>\u041f\u043b\u0430\u043d\u044b<\/strong> \u043f\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e, \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u0447\u0438\u043d\u044b: \u043f\u0440\u043e\u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0442\u044c \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 (\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0445\u0435\u043c\u0435) \u0432\u0441\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0432\u0441\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 csv \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0432\u0435\u0441\u044c &#171;\u0431\u043e\u043b\u044c\u0448\u043e\u0439&#187; csv \u0444\u0430\u0439\u043b. \u041f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u041f\u0438\u0442\u043e\u043d\u043e\u043c, \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 &#8212; \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p><strong>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0441\u0442\u0440\u043e\u043a \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u042e\u041b \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043d\u0435\u043f\u043b\u043e\u0445\u043e. \u0415\u0441\u043b\u0438 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u042e\u041b \u0434\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u043e \u0420\u0424 \u0434\u043e 4,5 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430, \u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0431\u044b\u043b\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 3 &#8212; 3,5 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0440\u0435\u0442\u044c \u043e\u0442 \u0432\u0441\u0435\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u0432\u043e\u0439\u043d\u0438\u043a\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0435\u0442. \u0422\u043e\u0436\u0435, \u043a\u0441\u0442\u0430\u0442\u0438, \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c.<\/p>\n<p><strong>P.S.<\/strong> \u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 github \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435. <a href=\"https:\/\/github.com\/users\/ra2003\/xml2sqlite\" rel=\"noopener noreferrer nofollow\">\u0411\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0441\u044e\u0434\u0430<\/a><\/p>\n<p><strong>P.S.2<\/strong> \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 xml-\u043a\u0438, \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0445\u0435\u043c\u044b. \u0412\u0441\u0435 \u0431\u044b\u043b\u043e \u041e\u041a. \u041d\u043e, \u043a\u0430\u043a \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044e.<\/p>\n<p><em>\u0410 \u044d\u0442\u043e \u043a\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0433\u043e (\u0438\u0437 12 060) \u0444\u0430\u0439\u043b\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0445\u0435\u043c\u044b.<\/em><\/p>\n<pre><code class=\"python\"># D:\\2021_8_16_oborot\\2021_8_16_xsd_validate_xml_file.py  import lxml from lxml import etree  xml_file = lxml.etree.parse(\"D:\/2021_8_16_oborot\/ish_unziped\/VO_OTKRDAN5_9965_9965_20210729_000f7269-b452-4bb0-85ea-3fa614ec3342.xml\") xml_validator = lxml.etree.XMLSchema(file=\"D:\/2021_8_16_oborot\/structure-20180110.xsd\")  is_valid = xml_validator.validate(xml_file)  print(is_valid)<\/code><\/pre>\n<p><strong>P.S.3.<\/strong> \u0421\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u0431\u0435\u0439\u0442\u0435, \u044d\u0442\u043e \u043d\u0430\u0448 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u0443\u0441 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435.<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/585592\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 (\u0447\u0430\u0441\u0442\u044c 2): &#171;\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441 Python, xml, csv, sqlite. \u0427\u0430\u0441\u0442\u044c 2. \u0418\u0449\u0435\u043c \u0438 \u043f\u0440\u0430\u0432\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0438, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u043b\u0435\u0442\u0430\u0435\u043c \u043d\u0430\u2026&#187;<\/a> <\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/588066\/\" rel=\"noopener noreferrer nofollow\">\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0442\u0440\u0438\u043b\u043e\u0433\u0438\u0438 \u0442\u0443\u0442 (\u0447\u0430\u0441\u0442\u044c 3): &#171;\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u043e-\u043f\u0438\u0442\u043e\u043d\u0438\u0439 \u0431\u043e\u0439 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 sqlite \u0437\u0430 2 174 433 \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0427\u0430\u0441\u0442\u044c 3&#187;<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/577148\/\"> https:\/\/habr.com\/ru\/articles\/577148\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong><em>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f: <\/em><\/strong><em>\u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0438 \u043a\u0440\u0443\u0442\u044b\u043c \u0441\u043f\u0435\u0446\u0430\u043c \u043f\u043e \u043a\u043e\u0434\u0438\u043d\u0433\u0443 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0435\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0412 \u043a\u043e\u0434\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b SQLite. \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c \u043a\u0430\u043a \u043d\u0438\u0436\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e, \u043d\u043e \u0441 \u0437\u0430\u044f\u0432\u043a\u043e\u0439 \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443. \u041a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u0435\u0437 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439, \u043d\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c\u0441\u044f.<\/em><\/p>\n<hr\/>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/585592\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 (\u0447\u0430\u0441\u0442\u044c 2): &#171;\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441 Python, xml, csv, sqlite. \u0427\u0430\u0441\u0442\u044c 2. \u0418\u0449\u0435\u043c \u0438 \u043f\u0440\u0430\u0432\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0438, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u043b\u0435\u0442\u0430\u0435\u043c \u043d\u0430\u2026&#187;<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/588066\/\" rel=\"noopener noreferrer nofollow\">\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0442\u0440\u0438\u043b\u043e\u0433\u0438\u0438 \u0442\u0443\u0442 (\u0447\u0430\u0441\u0442\u044c 3): &#171;\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u043e-\u043f\u0438\u0442\u043e\u043d\u0438\u0439 \u0431\u043e\u0439 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 sqlite \u0437\u0430 2 174 433 \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0427\u0430\u0441\u0442\u044c 3&#187;<\/a><\/p>\n<h3>\u0412\u0432\u043e\u0434\u043d\u0430\u044f<\/h3>\n<p><strong>\u0427\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/strong> \u0432\u0437\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043b\u0438\u0446\u0430\u043c (\u042e\u041b) \u0420\u0424 \u0437\u0430 2019 \u0433\u043e\u0434 (\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u042e\u041b: \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0418\u041d\u041d(\u042e\u041b), \u043e\u0431\u043e\u0440\u043e\u0442, \u0440\u0430\u0441\u0445\u043e\u0434) \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 SQLite. <\/p>\n<p>\u0414\u043b\u044f \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0432 <strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b<\/strong> (\u043d\u043e \u043d\u0435 \u043f\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u043b\u0438):<\/p>\n<ul>\n<li>\n<p>\u0412\u0438\u043d\u0434\u043e\u0432\u0441 7\u044564<\/p>\n<\/li>\n<li>\n<p>\u041f\u0438\u0442\u043e\u043d 3.8.10 (\u0435\u0441\u043b\u0438 \u043d\u0435\u0442, <a href=\"https:\/\/www.python.org\/downloads\/\" rel=\"noopener noreferrer nofollow\">\u0431\u0435\u0440\u0435\u043c \u0442\u0443\u0442<\/a>).<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 IDE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c Visual Studio Code, \u043d\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e, \u0445\u043e\u0442\u044c \u0431\u043b\u043e\u043a\u043d\u043e\u0442.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u0442\u0430\u043f<\/h3>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443:                                                                                                       <strong><u>(cmd) D:\\>mkdir 2021_8_16_oborot<\/u><\/strong>                                                                               \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443: <strong><u>(cmd) D:\\>cd 2021_8_16_oborot<\/u><\/strong>                                                                           \u0418 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430:                                                             <strong><u>(cmd) D:\\2021_8_16_oborot>python -m venv venv<\/u><\/strong>                                                             \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:                                           <strong><u>(cmd) D:\\2021_8_16_oborot>venv\\scripts\\activate<\/u><\/strong>                                                             \u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u043d\u043e \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e IDE \u0438 \u0435\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b.                                                                                               <strong><em>VSCode,<\/em><\/strong> \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<h3>\u041a\u0430\u0447\u0430\u0435\u043c<\/h3>\n<p>\u041a\u0430\u0447\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b. \u041b\u0443\u0447\u0448\u0435 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0430\u0443\u043d\u043b\u043e\u0434\u0435\u0440\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Downloader Master). \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u0445 \u043a\u0430\u0447\u0430\u0442\u044c \u0431\u0430\u0437\u044b \u0441 \u0424\u041d\u0421 \u0438\/\u0438\u043b\u0438 \u0420\u043e\u0441\u0441\u0442\u0430\u0442\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0441\u043a\u0430\u0447\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 <a href=\"https:\/\/data.nalog.ru\/opendata\/7707329152-revexp\/data-20210801-structure-20180801.zip\" rel=\"noopener noreferrer nofollow\">\u0444\u0430\u0439\u043b \u0431\u0435\u0440\u0435\u043c \u0442\u0443\u0442.<\/a>                                                                                                                          \u041a\u043b\u0430\u0434\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043f\u043a\u0443: <strong><em><u>D:\/2021_8_16_oborot\/ish<\/u><\/em><\/strong>                                                \u0422\u0430\u043c \u0436\u0435 \u0431\u0435\u0440\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 <a href=\"https:\/\/data.nalog.ru\/opendata\/7707329152-revexp\/structure-20180110.xsd\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (.xsd).<\/a><\/p>\n<h3>\u0420\u0430\u0441\u0437\u0438\u043f\u043e\u0432\u044b\u0432\u0430\u0435\u043c<\/h3>\n<p>\u041f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0441\u0440\u0430\u0437\u0443 \u0440\u0430\u0441\u0437\u0438\u043f\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code># D\\2021_8_16_oborot\\16.08.2021_unzip_ziped_directory.py  from zipfile import ZipFile  with ZipFile('D:\/2021_8_16_oborot\/ish\/data-20210801-structure-20180801.zip', 'r') as zipObj:     zipObj.extractall('D:\/2021_8_16_oborot\/ish_unziped') <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 IDE (\u043f\u0440\u0430\u0432\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0430 \u043c\u044b\u0448\u0438 \u0438 &#171;Run Python file in Terminal&#187;). \u0415\u0441\u043b\u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <strong><em>zipfile<\/em><\/strong> \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0440\u0443\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0435\u0433\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435. \u041f\u043e\u0442\u043e\u043c\u0443 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 IDE (\u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0412\u0438\u043d\u0434\u043e\u0443\u0441, \u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430):                                                                <strong><u>(venv) D:\\2021_8_16_oborot>pip install zipfile<\/u><\/strong>                          \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 (\u043f\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c\u0438 \u0432 VScode \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430):                                  <strong><u>(venv) D:\\2021_8_16_oborot><\/u><\/strong>                                                                         \u0415\u0441\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0432 \u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0412\u0438\u043d\u0434\u043e\u0443\u0441.  <strong><em>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u0442\u043e\u0433: \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435\u0442, \u0444\u0430\u0439\u043b \u0440\u0430\u0441\u0437\u0438\u043f\u043e\u0432\u0430\u043b\u0441\u044f \u0432 12 060 xml \u0444\u0430\u0439\u043b\u043e\u0432.<\/em><\/strong><\/p>\n<h3>\u041b\u044e\u0431\u0443\u0435\u043c\u0441\u044f \u043d\u0430 xml<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0442\u043e \u0442\u0430\u043c \u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0439 (\u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438) \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438         <\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?>&lt;\u0424\u0430\u0439\u043b \u0418\u0434\u0424\u0430\u0439\u043b=\"VO_OTKRDAN5_9965_9965_20210729_000f7269-b452-4bb0-85ea-3fa614ec3342\" \u0412\u0435\u0440\u0441\u0424\u043e\u0440\u043c=\"4.01\" \u0412\u0435\u0440\u0441\u041f\u0440\u043e\u0433=\"1.0\" \u0422\u0438\u043f\u0418\u043d\u0444=\"&amp;#x41E;&amp;#x422;&amp;#x41A;&amp;#x420;&amp;#x414;&amp;#x410;&amp;#x41D;&amp;#x41D;&amp;#x42B;&amp;#x415;5\" \u041a\u043e\u043b\u0414\u043e\u043a=\"92\">&lt;\u0418\u0434\u041e\u0442\u043f\u0440>&lt;\u0424\u0418\u041e\u041e\u0442\u0432 \u0424\u0430\u043c\u0438\u043b\u0438\u044f=\"_\" \u0418\u043c\u044f=\"_\"\/>&lt;\/\u0418\u0434\u041e\u0442\u043f\u0440>&lt;\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0418\u0434\u0414\u043e\u043a=\"b6db52b9-1955-4c94-8dd8-cbc4a3da40d8\" \u0414\u0430\u0442\u0430\u0414\u043e\u043a=\"30.07.2021\" \u0414\u0430\u0442\u0430\u0421\u043e\u0441\u0442=\"31.12.2019\">&lt;\u0421\u0432\u0435\u0434\u041d\u041f \u041d\u0430\u0438\u043c\u041e\u0440\u0433=\"&amp;#x41E;&amp;#x411;&amp;#x429;&amp;#x415;&amp;#x421;&amp;#x422;&amp;#x412;&amp;#x41E; &amp;#x421;&amp;#x41E;&amp;#x413;&amp;#x420;&amp;#x410;&amp;#x41D;&amp;#x418;&amp;#x427;&amp;#x415;&amp;#x41D;&amp;#x41D;&amp;#x41E;&amp;#x419;&amp;#x41E;&amp;#x422;&amp;#x412;&amp;#x415;&amp;#x422;&amp;#x421;&amp;#x422;&amp;#x412;&amp;#x415;&amp;#x41D;&amp;#x41D;&amp;#x41E;&amp;#x421;&amp;#x422;&amp;#x42C;&amp;#x42E; &amp;quot;&amp;#x424;&amp;#x418;&amp;#x411;&amp;#x420;&amp;#x41E;&amp;#x422;&amp;#x415;&amp;#x41A;&amp;quot;\" \u0418\u041d\u041d\u042e\u041b=\"7816394401\"\/>&lt;\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445 \u0421\u0443\u043c\u0414\u043e\u0445\u043e\u0434=\"0.00\" \u0421\u0443\u043c\u0420\u0430\u0441\u0445\u043e\u0434=\"0.00\"\/>&lt;\/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442>&lt;\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0418\u0434\u0414\u043e\u043a=\"1cd8ab78.....<\/code><\/pre>\n<p>\u0410 \u043d\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043b\u0438\u0446\u0430\u043c. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0444\u0430\u0439\u043b\u0435 xml \u0438\u0445 \u043e\u0442 1 \u0434\u043e 100 (\u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e):<\/p>\n<pre><code class=\"xml\">\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u0438\u0446\u0430 (\u0441\u0430\u043c\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e-\u043f\u0440\u0430\u0432\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0430) \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432 \"\u0421\u0432\u0435\u0434\u041d\u041f \u041d\u0430\u0438\u043c\u041e\u0440\u0433\", \u0418\u041d\u041d\u042e\u041b (\u0438\u043d\u043d \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u0438\u0446\u0430) \u0432 \"\u0421\u0432\u0435\u0434\u041d\u041f \u0418\u041d\u041d\u042e\u041b\", \u0414\u043e\u0445\u043e\u0434 \u0432 \"\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445 \u0421\u0443\u043c\u0414\u043e\u0445\u043e\u0434\", \u0420\u0430\u0441\u0445\u043e\u0434 \u0432 \"\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445 \u0421\u0443\u043c\u0420\u0430\u0441\u0445\u043e\u0434\"<\/code><\/pre>\n<p>\u041d\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u044b \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u043d\u043e .csv \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0443 \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 D:\\2021_8_16_oborot\\csv                                                                       \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e-\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 \u0432\u0437\u044f\u043b\u0438 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u0438\u0437 12 060, \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e \u0432 test.xml \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 .csv \u0444\u0430\u0439\u043b.<\/p>\n<pre><code class=\"python\"># D:\\2021_8_16_oborot\\26.08.2021_finish_xml_to_csv.py  import xml.etree.ElementTree as Xet  f = open('17_your_csv_file.csv', 'w', encoding='utf-8') # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 xmlparse = Xet.parse('D:\/2021_8_16_oborot\/ish_unziped\/test1.xml')  root = xmlparse.getroot()  for i in root:    for i2 in i.findall('\u0421\u0432\u0435\u0434\u041d\u041f'):        f.writelines(i2.attrib['\u041d\u0430\u0438\u043c\u041e\u0440\u0433'])       f.write(',')       f.writelines(i2.attrib['\u0418\u041d\u041d\u042e\u041b'])       f.write(',')              for i2 in i.findall('\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445'):           f.writelines(i2.attrib['\u0421\u0443\u043c\u0414\u043e\u0445\u043e\u0434'])          f.write(',')          f.writelines(i2.attrib['\u0421\u0443\u043c\u0420\u0430\u0441\u0445\u043e\u0434'])          f.write('\\n')      f.close()<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043a\u043e\u0434, \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u041e\u041a. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"markdown\">\u041e\u0411\u0429\u0415\u0421\u0422\u0412\u041e \u0421 \u041e\u0413\u0420\u0410\u041d\u0418\u0427\u0415\u041d\u041d\u041e\u0419 \u041e\u0422\u0412\u0415\u0422\u0421\u0422\u0412\u0415\u041d\u041d\u041e\u0421\u0422\u042c\u042e \"\u0424\u0418\u0411\u0420\u041e\u0422\u0415\u041a\",7816394401,0.00,0.00 \u041e\u0411\u0429\u0415\u0421\u0422\u0412\u041e \u0421 \u041e\u0413\u0420\u0410\u041d\u0418\u0427\u0415\u041d\u041d\u041e\u0419 \u041e\u0422\u0412\u0415\u0422\u0421\u0422\u0412\u0415\u041d\u041d\u041e\u0421\u0422\u042c\u042e \"\u0418\u0417\u0414\u0410\u0422\u0415\u041b\u042c\u0421\u041a\u0418\u0419 \u0414\u041e\u041c \"\u0422\u0412\u0415\u0420\u0421\u041a\u0410\u042f \u0416\u0418\u0417\u041d\u042c\",6901026686,0.00,0.00 \u041e\u0411\u0429\u0415\u0421\u0422\u0412\u041e \u0421 \u041e\u0413\u0420\u0410\u041d\u0418\u0427\u0415\u041d\u041d\u041e\u0419 \u041e\u0422\u0412\u0415\u0422\u0421\u0422\u0412\u0415\u041d\u041d\u041e\u0421\u0422\u042c\u042e \"\u041c\u0420\u0410\u0412\",7726503712,20800000.00,14102000.00 \u041e\u0411\u0429\u0415\u0421\u0422\u0412\u041e \u0421 \u041e\u0413\u0420\u0410\u041d\u0418\u0427\u0415\u041d\u041d\u041e\u0419 \u041e\u0422\u0412\u0415\u0422\u0421\u0422\u0412\u0415\u041d\u041d\u041e\u0421\u0422\u042c\u042e \"\u0410\u0413\u0420\u041e\u0420\u0415\u0421\u0423\u0420\u0421\",6901026703,470000.00,461000.00<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u042e\u041b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435, \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432 \u0446\u0438\u043a\u043b\u0435 \u0431\u0440\u0430\u0442\u044c \u0438 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0432\u0441\u0435 12 060 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<pre><code class=\"python\">import os import xml.etree.ElementTree as Xet  def parse_dii():    path = 'D:\/2021_8_16_oborot\/ish_unziped\/'    fileList = os.listdir(path)    for t in fileList:       with open('D:\/2021_8_16_oborot\/ish_unziped\/' + t, 'r', encoding='utf-8') as ft:          base = os.path.splitext(t)[0]          with open(('D:\/2021_8_16_oborot\/csv' + base + '.csv'), 'w+', encoding='utf-8') as f:             xmlparse = Xet.parse('D:\/2021_8_16_oborot\/ish_unziped\/' + t)             root = xmlparse.getroot()             for i in root:                for i2 in i.findall('\u0421\u0432\u0435\u0434\u041d\u041f'):                f.writelines(i2.attrib['\u041d\u0430\u0438\u043c\u041e\u0440\u0433'])                f.write(',')                f.writelines(i2.attrib['\u0418\u041d\u041d\u042e\u041b'])                f.write(',')                     for i2 in i.findall('\u0421\u0432\u0435\u0434\u0414\u043e\u0445\u0420\u0430\u0441\u0445'):                      f.writelines(i2.attrib['\u0421\u0443\u043c\u0414\u043e\u0445\u043e\u0434'])                      f.write(',')                      f.writelines(i2.attrib['\u0421\u0443\u043c\u0420\u0430\u0441\u0445\u043e\u0434'])                      f.write('\\n')   if __name__ == '__main__':     parse_dii()<\/code><\/pre>\n<h3>\u0421\u0430\u043c\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043d\u0430 \u0433\u0440\u0430\u0431\u043b\u0438, \u0441\u0430\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043c<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u0441\u0435 csv \u0444\u0430\u0439\u043b\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043f\u0443\u0442\u044f\u0445 (\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 &#8216;\/&#8217; \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435:<\/p>\n<pre><code class=\"python\">with open(('D:\/2021_8_16_oborot\/csv' + base + '.csv'), 'w+', encoding='utf-8') as f:) <\/code><\/pre>\n<p>\u0418 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <strong><em><u>D:\\2021_8_16_oborot\\csv\\<\/u><\/em><\/strong> \u043e\u043d\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0431\u0449\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0447\u0442\u043e \u043d\u0435 \u0433\u0443\u0434.                                                                                                        \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u043a\u0443\u0434\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e.<\/p>\n<pre><code class=\"python\"># D:\\2021_8_16_oborot\\26.08.2021_peremeshalka_csv_to_csv_1.py  import os import shutil  def parse_dii():    old_path = 'D:\/2021_8_16_oborot'    new_path = 'D:\/2021_8_16_oborot\/csv\/'    fileList = os.listdir(old_path)         for t in fileList:             if t[0:25] == 'csvVO_OTKRDAN5_9965_9965_':          t1 = t[3:]          with open(new_path + t1, 'w+', encoding='utf-8') as f:             shutil.move(t, new_path+t1)              print(new_path + t1)  if __name__ == '__main__':     parse_dii()<\/code><\/pre>\n<p><strong><em>\u0424\u0430\u0439\u043b\u044b \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u044b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u044b.<\/em><\/strong><\/p>\n<h3>\u041f\u0438\u0442\u043e\u043d\u0438\u043c \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e<\/h3>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u041f\u0438\u0442\u043e\u043d\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438\u0437 \u0432\u0441\u0435\u0445 12060 csv \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043a\u0430 \u0440\u0435\u0448\u0438\u0442\u044c.  \u0421 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0438 \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044e. <\/p>\n<h3>\u041d\u0435\u0432\u0437\u0438\u0440\u0430\u044f \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435<\/h3>\n<p>\u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0438\u043d\u0438\u0448\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0442\u043e \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u043a \u0444\u0438\u043d\u0438\u0448\u0443.  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0448\u043b\u0438 \u0442\u0430\u043a: \u0441\u043b\u0438\u043b\u0438 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0434\u0438\u043d csv \u0444\u0430\u0439\u043b. <\/p>\n<pre><code class=\"python\"># D:\\2021_8_16_oborot\\05.09.2021_all_csv_to_one_csv.py  import os import glob  os.chdir(\"D:\/2021_8_16_oborot\/csv\/\") extension = 'csv' all_filenames = [i for i in glob.glob('*.{}'.format(extension))] combined_csv = '\\n'.join([open(f, 'r', encoding='utf-8').read().strip() for f in all_filenames ]) with open(\"combined_csv.csv\", 'w') as f:     f.write(combined_csv)<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043f\u043e\u0447\u0442\u0438 0,7\u0413\u0411 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e \u0431\u043b\u0430\u0433\u043e\u043f\u043e\u043b\u0443\u0447\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0441\u044f.<\/p>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442 \u0435\u0434\u0438\u043d\u043e\u0433\u043e csv \u0432 SQLite<\/h3>\n<p>\u0420\u0430\u0437 \u0443\u0436 \u0443 \u043d\u0430\u0441 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0434\u0435\u043d\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f, \u0442\u043e \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b SQLite \u0432\u043c\u0435\u0441\u0442\u043e \u041f\u0438\u0442\u043e\u043d\u0430.<\/p>\n<p><strong><u>\u0412 \u0438\u0442\u043e\u0433\u0435:<\/u><\/strong><\/p>\n<ol>\n<li>\n<p><strong><em>DB browser (SQLite)<\/em><\/strong><\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-414232","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/414232","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=414232"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/414232\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=414232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=414232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=414232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}