{"id":380277,"date":"2024-06-28T21:01:20","date_gmt":"2024-06-28T21:01:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=380277"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=380277","title":{"rendered":"<span>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 Python (Gspread)<\/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>\u0414\u0440\u0443\u0437\u044c\u044f, \u043f\u0440\u0438\u0432\u0435\u0442. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0432\u0430\u0441 \u0432\u044b\u0440\u0430\u0437\u0438\u043b\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u043c\u0435\u043d\u044f \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 (Google Sheets) \u0447\u0435\u0440\u0435\u0437 Python. \u041a\u0430\u043a \u0432\u044b \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0432\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Google Sheets \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Python. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c &#8212; Gspread.<\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Gspread, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 Google (\u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0433\u043e \u0435\u0449\u0435 \u043d\u0435\u0442).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h3>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0438 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u043e\u0437\u044c\u043c\u0443 \u0432\u0430\u0441 \u0437\u0430 \u0440\u0443\u043a\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0443 \u043f\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0430\u043f\u0430\u043c \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u044d\u0442\u0430\u043f.<\/p>\n<ul>\n<li>\n<p><strong>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f \u0432 Google.<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 Google Cloud Platform \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 Google: <\/strong><a href=\"https:\/\/console.cloud.google.com\/apis\/dashboar\" rel=\"noopener noreferrer nofollow\">Google Cloud Platform API Dashboard<\/a><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c77\/e98\/9fd\/c77e989fd9c0b11f1bfb7318da26d3a4.jpg\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438 \u0443 \u0432\u0430\u04413\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438 \u0443 \u0432\u0430\u04413\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.\" width=\"1280\" height=\"398\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c77\/e98\/9fd\/c77e989fd9c0b11f1bfb7318da26d3a4.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438 \u0443 \u0432\u0430\u0441<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/strong><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435: <a href=\"https:\/\/console.cloud.google.com\/projectcreate\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>. \u041d\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 &#171;CREATE&#187;:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/0de\/03d\/220\/0de03d22054e9200517bd0d69f8d48b1.jpg\" alt=\"\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0436\u043c\u0435\u043c \u043d\u0430 &quot;CREATE&quot;\" title=\"\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0436\u043c\u0435\u043c \u043d\u0430 &quot;CREATE&quot;\" width=\"601\" height=\"399\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0de\/03d\/220\/0de03d22054e9200517bd0d69f8d48b1.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0436\u043c\u0435\u043c \u043d\u0430 &#171;CREATE&#187;<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>\u0412\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c.<\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 &#171;Credentials&#187; \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435: <a href=\"https:\/\/console.cloud.google.com\/apis\/credentials\" rel=\"noopener noreferrer nofollow\">Google Cloud Credentials<\/a>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 \u0443 \u0432\u0430\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0443\u0442\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043f\u0443\u0442\u044c \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<p><a href=\"https:\/\/console.cloud.google.com\/apis\/credentials?project=yakvenalex-habr-project\" rel=\"noopener noreferrer nofollow\">https:\/\/console.cloud.google.com\/apis\/credentials?project=yakvenalex-habr-project<\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e51\/25f\/5f2\/e5125f5f21c7b7ead5a3bf9d07073379.jpg\" alt=\"\u0416\u043c\u0435\u043c \u043d\u0430 &quot;CREATE SERVICE ACCOUNT&quot;\" title=\"\u0416\u043c\u0435\u043c \u043d\u0430 &quot;CREATE SERVICE ACCOUNT&quot;\" width=\"825\" height=\"396\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e51\/25f\/5f2\/e5125f5f21c7b7ead5a3bf9d07073379.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0416\u043c\u0435\u043c \u043d\u0430 &#171;CREATE SERVICE ACCOUNT&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u2013 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c credentials. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 &#171;Service Accounts&#187;. \u0416\u043c\u0435\u043c \u043d\u0430 &#171;CREATE SERVICE ACCOUNT&#187;.<\/p>\n<p>\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 &#171;DONE&#187;.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d Service Account?<\/h4>\n<p>Service Account (\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442) \u2013 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c Google. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 Google Sheets \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u044d\u0442\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u043f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/8da\/f91\/4a9\/8daf914a964c612afa005fe13953013e.jpg\" width=\"580\" height=\"651\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8da\/f91\/4a9\/8daf914a964c612afa005fe13953013e.jpg\" data-blurred=\"true\"\/><\/figure>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447.<\/strong><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0442\u0440\u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u043e\u0437\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c &#171;Manage keys&#187;.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a47\/38c\/08d\/a4738c08d857bc026434cdd30bb374a1.jpg\" alt=\"\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 Email. \u041c\u043e\u0436\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u043e\u043d \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.\" title=\"\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 Email. \u041c\u043e\u0436\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u043e\u043d \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.\" width=\"783\" height=\"379\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a47\/38c\/08d\/a4738c08d857bc026434cdd30bb374a1.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 Email. \u041c\u043e\u0436\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u043e\u043d \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c &#171;Add key&#187; \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c &#171;Create new key&#187;.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e92\/27f\/80a\/e9227f80a0b8b90ab54b982860c6ca83.jpg\" width=\"668\" height=\"646\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e92\/27f\/80a\/e9227f80a0b8b90ab54b982860c6ca83.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c JSON \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c &#171;CREATE&#187;.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/491\/831\/8a9\/4918318a9f4e5732b1ac92b4035a292e.jpg\" width=\"580\" height=\"410\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/491\/831\/8a9\/4918318a9f4e5732b1ac92b4035a292e.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 JSON \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u043e\u0442 JSON \u0444\u0430\u0439\u043b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 Gspread \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c email \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430.<\/strong><\/p>\n<p>\u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 JSON \u0444\u0430\u0439\u043b\u0430 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430 <code>client_email<\/code>) \u0438\u043b\u0438 \u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430: <a href=\"https:\/\/console.cloud.google.com\/iam-admin\/serviceaccounts\" rel=\"noopener noreferrer nofollow\">Service Accounts<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c35\/067\/92c\/c3506792c1d3059d3c92d357cf273a50.jpg\" alt=\"\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e: yakvenalex-habr-account@yakvenalex-habr-project.iam.gserviceaccount.com\" title=\"\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e: yakvenalex-habr-account@yakvenalex-habr-project.iam.gserviceaccount.com\" width=\"1090\" height=\"417\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c35\/067\/92c\/c3506792c1d3059d3c92d357cf273a50.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e: yakvenalex-habr-account@yakvenalex-habr-project.iam.gserviceaccount.com<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c Google \u043d\u0435 \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438, \u0430 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 (email).<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c Google Sheets API. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <\/strong><a href=\"https:\/\/console.cloud.google.com\/marketplace\/product\/google\/sheets.googleapis.com\" rel=\"noopener noreferrer nofollow\">Google Sheets API<\/a> \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 &#171;ENABLE&#187;. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <strong>Google Sheets API<\/strong><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/621\/ca0\/50a\/621ca050a6d020c1f9b2df3461320699.png\" alt=\"\u0416\u0434\u0435\u043c \u043f\u0430\u0440\u0443 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u0438\u043a\u0430 \u043d\u0430 &quot;ENABLE&quot;.\" title=\"\u0416\u0434\u0435\u043c \u043f\u0430\u0440\u0443 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u0438\u043a\u0430 \u043d\u0430 &quot;ENABLE&quot;.\" width=\"778\" height=\"380\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/621\/ca0\/50a\/621ca050a6d020c1f9b2df3461320699.png\"\/><\/p>\n<div><figcaption>\u0416\u0434\u0435\u043c \u043f\u0430\u0440\u0443 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u0438\u043a\u0430 \u043d\u0430 &#171;ENABLE&#187;.<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0434\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043b\u044f Service Account email.<\/strong><\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0443 \u044f \u043d\u0430\u0437\u043e\u0432\u0443 &#171;Habr table&#187;.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Google Sheets: <a href=\"https:\/\/docs.google.com\/spreadsheets\/\" rel=\"noopener noreferrer nofollow\">Google Sheets<\/a>.<\/p>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 &#171;+&#187; \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/dc6\/58c\/db6\/dc658cdb6f0e3d793318afd388afe5dc.jpg\" alt=\"\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c, \u043d\u043e \u0441\u043c\u044b\u0441\u043b \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.\" title=\"\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c, \u043d\u043e \u0441\u043c\u044b\u0441\u043b \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.\" width=\"1280\" height=\"326\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc6\/58c\/db6\/dc658cdb6f0e3d793318afd388afe5dc.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c, \u043d\u043e \u0441\u043c\u044b\u0441\u043b \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u0435\u043c \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0435 (\u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 &#171;Untitled spreadsheet&#187;) \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/142\/53e\/cb6\/14253ecb6092a2ced4951908de386649.jpg\" width=\"958\" height=\"354\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/142\/53e\/cb6\/14253ecb6092a2ced4951908de386649.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0436\u043c\u0435\u043c \u043d\u0430 &#171;Share&#187;, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c email \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c &#171;Send&#187;.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/da6\/15e\/18d\/da615e18ddb8269ac15ee38378f8d7f4.jpg\" width=\"940\" height=\"617\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/da6\/15e\/18d\/da615e18ddb8269ac15ee38378f8d7f4.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u044b, \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 &#171;Share&#187;.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/559\/ec0\/1a4\/559ec01a4b59ef8088a199f87cd6dbae.jpg\" width=\"933\" height=\"640\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/559\/ec0\/1a4\/559ec01a4b59ef8088a199f87cd6dbae.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a Google Sheets \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438: \u0447\u0442\u0435\u043d\u0438\u0435, \u0437\u0430\u043f\u0438\u0441\u044c, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>Gspread: \u041a\u043e\u0440\u043e\u0442\u043a\u043e \u043e \u0433\u043b\u0430\u0432\u043d\u043e\u043c<\/h4>\n<p><strong>Gspread<\/strong> \u2013 \u044d\u0442\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f Python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438, \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 (\u043d\u0435 Google). \u041e\u043d\u0430 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 Google Sheets, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0421 Gspread \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442\u044b \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Google Sheets \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0451 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0438 \u043c\u043e\u0449\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p>\u042f \u0441\u043e\u0437\u0434\u0430\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 Pycharm \u043f\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a \u0436\u0435.<\/p>\n<p>\u041d\u0430\u0437\u043e\u0432\u0443 \u043f\u0440\u043e\u0435\u043a\u0442 GspreadTech. \u0412\u043e \u0432\u043d\u0443\u0442\u0440\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u043c\u0435\u0449\u0443 \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0439 JSON \u0438 \u0441\u043e\u0437\u0434\u0430\u043c \u0444\u0430\u0439\u043b <code>main.py, <\/code>\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438 \u0431\u0443\u0434\u0443 \u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u043e\u0435\u043c GitHub: <a href=\"https:\/\/github.com\/Yakvenalex\/GspreadTeach\" rel=\"noopener noreferrer nofollow\">GspreadTech<\/a>.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430:<\/p>\n<pre><code class=\"powershell\">pip install -r req.txt<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u044b:<\/p>\n<pre><code class=\"python\">from gspread import Client, Spreadsheet, Worksheet, service_account<\/code><\/pre>\n<ul>\n<li>\n<p><code>Client<\/code>:<\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Google Sheets. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>Spreadsheet<\/code>:<\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 Google Sheets. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043b\u0438\u0441\u0442\u0430\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>Worksheet<\/code>:<\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0447\u0442\u0435\u043d\u0438\u0435, \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>service_account<\/code>:<\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. \u0421 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f (<code>Client<\/code>) \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Google Sheets \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google Sheets \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 JSON:<\/p>\n<pre><code class=\"python\">def client_init_json() -> Client:     \"\"\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google Sheets.\"\"\"     return service_account(filename='yakvenalex-habr-project.json')<\/code><\/pre>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u0434\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043d\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/docs.gspread.org\/en\/v6.0.0\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Gspread<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code>&lt;gspread.client.Client object at 0x00000166052A0380><\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c client, \u0432\u0435\u0434\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441 \u043d\u0435\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u0430\u043b\u0435\u0435 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e 2 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: \u0447\u0435\u0440\u0435\u0437 id \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u0441\u044b\u043b\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 (\u0430 \u0438\u0437 \u043d\u0435\u0435 \u0435\u0449\u0451 \u0438 ID) \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0438\u0434 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/74a\/0d4\/e30\/74a0d4e306f5243903edf0f875a10e74.png\" alt=\"ID \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0441\u043b\u0435 d\/\" title=\"ID \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0441\u043b\u0435 d\/\" width=\"890\" height=\"103\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/74a\/0d4\/e30\/74a0d4e306f5243903edf0f875a10e74.png\"\/><\/p>\n<div><figcaption>ID \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0441\u043b\u0435 d\/<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0412 \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0443\u0436\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0435\u0442\u0441\u044f ee ID.<\/p>\n<p>\u041f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n<pre><code class=\"python\">def get_table_by_url(client: Client, table_url):     \"\"\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 Google Sheets \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435.\"\"\"     return client.open_by_url(table_url)   def get_table_by_id(client: Client, table_url):     \"\"\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 Google Sheets \u043f\u043e ID \u0442\u0430\u0431\u043b\u0438\u0446\u044b.\"\"\"     return client.open_by_key(table_url)<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"python\">def test_get_table(table_url: str, table_key: str):     \"\"\"\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 Google Sheets.\"\"\"     client = client_init_json()     table = get_table_by_url(client, table_url)     print('\u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435: ', table)     table = get_table_by_id(client, table_key)     print('\u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e id: ', table)   if __name__ == '__main__':     test_get_table(table_link, table_id)<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"powershell\">\u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435:  &lt;Spreadsheet 'Habr table' id:1lzQ78nxKShICHQaVW2ZuKw5QBRR1q4gAzPPbVOHsd4Q> \u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e id:  &lt;Spreadsheet 'Habr table' id:1lzQ78nxKShICHQaVW2ZuKw5QBRR1q4gAzPPbVOHsd4Q><\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443 \u043e\u043f\u044b\u0442\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u0438\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435.<\/p>\n<pre><code class=\"python\">def get_worksheet_info(table: Spreadsheet) -> dict:     \"\"\"\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u0438\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f.\"\"\"     worksheets = table.worksheets()     worksheet_info = {         \"count\": len(worksheets),         \"names\": [worksheet.title for worksheet in worksheets]     }     return worksheet_info   def main():     # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443     client = client_init_json()     table = get_table_by_id(client, table_id)      # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043b\u0438\u0441\u0442\u0430\u0445     info = get_worksheet_info(table)     print(f\"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432: {info['count']}\")     print(\"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u043e\u0432:\")     for name in info['names']:         print(name)   if __name__ == '__main__':     main()<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"python\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432: 1 \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u043e\u0432: Sheet1<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u043d\u043e\u0432\u044b\u0435 \u043b\u0438\u0441\u0442\u044b \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0443 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 live-\u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u043b\u0438\u0441\u0442\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043a\u043e\u0434\u0435. \u0423 \u043c\u0435\u043d\u044f \u0438\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0431\u044b\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u043b\u0438 \u043b\u0438\u0441\u0442, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u043a\u043e \u043c\u043d\u0435 \u0441 \u043f\u0440\u0435\u0442\u0435\u043d\u0437\u0438\u044f\u043c\u0438, \u043c\u043e\u043b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6e5\/e0e\/01e\/6e5e0e01e931386530f03541fb1d6a80.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u043b 2 \u043b\u0438\u0441\u0442\u0430. \u0414\u0430\u043b\u0435\u0435 \u0432 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.\" title=\"\u0421\u043e\u0437\u0434\u0430\u043b 2 \u043b\u0438\u0441\u0442\u0430. \u0414\u0430\u043b\u0435\u0435 \u0432 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.\" width=\"543\" height=\"684\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e5\/e0e\/01e\/6e5e0e01e931386530f03541fb1d6a80.png\"\/><\/p>\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043b 2 \u043b\u0438\u0441\u0442\u0430. \u0414\u0430\u043b\u0435\u0435 \u0432 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"lua\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432: 2 \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u043e\u0432: \u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421 \u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04422<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043b \u0441 \u043a\u0430\u043a\u0438\u043c \u043b\u0438\u0441\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u0438\u0441\u0442. \u0420\u0435\u0447\u044c \u043f\u0440\u043e \u0442\u0430\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u0430\u043a: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 (\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u0435\u0435). \u0410 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043b\u0438\u0441\u0442 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"python\">def create_worksheet(table: Spreadsheet, title: str, rows: int, cols: int):     \"\"\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.\"\"\"     return table.add_worksheet(title, rows, cols)<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c<\/p>\n<pre><code class=\"python\">def test_create_worksheet():     client = client_init_json()     table = get_table_by_id(client, table_id)     rez = create_worksheet(table, '\u041d\u043e\u0432\u044b\u0439\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u0442', rows=15, cols=10)     print(rez)   test_create_worksheet()<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">&lt;Worksheet '\u041d\u043e\u0432\u044b\u0439\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u0442' id:2135109655><\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041b\u0438\u0441\u0442\u0443 \u043f\u0440\u0438\u0441\u0432\u043e\u0435y id. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/110\/444\/2cf\/1104442cfcd2e57f0f5428c67d307694.png\" alt=\"\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a.\" title=\"\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a.\" width=\"945\" height=\"691\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/110\/444\/2cf\/1104442cfcd2e57f0f5428c67d307694.png\"\/><\/p>\n<div><figcaption>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a.<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">def delete_worksheet(table: Spreadsheet, title: str):     \"\"\"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.\"\"\"     table.del_worksheet(table.worksheet(title))<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\">def test_dell_worksheet():     client = client_init_json()     table = get_table_by_id(client, table_id)     delete_worksheet(table, title='\u041d\u043e\u0432\u044b\u0439\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u0442')   test_dell_worksheet()<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e table.worksheet(title). \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044e \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442. \u0414\u0430\u043b\u0435\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u043b\u0438\u0441\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0441\u0443\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0435\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (\u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0438\u0434\u0435\u0442 \u0441\u0432\u0435\u0440\u0445\u0443-\u0432\u043d\u0438\u0437). \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f insert_row, \u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<pre><code class=\"python\">def insert_one(table: Spreadsheet, title: str, data: list, index: int = 1):     \"\"\"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043b\u0438\u0441\u0442.\"\"\"     worksheet = table.worksheet(title)     worksheet.insert_row(data, index=index)<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041c\u044b \u0431\u044b \u043c\u043e\u0433\u043b\u0438 \u0432 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c worksheet, \u043d\u043e, \u0441 \u043e\u043f\u044b\u0442\u0430 \u0441\u043a\u0430\u0436\u0443 \u0447\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u044f\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u043b\u0438\u0441\u0442\u0430. \u041c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u043e\u0442\u043e\u043c.<\/p>\n<p>\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u0441 0, \u043a\u0430\u043a \u043c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438, \u0430 \u0441 1. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (\u0438\u043d\u0434\u0435\u043a\u0441 1), \u043d\u043e \u044f \u0435\u0433\u043e \u0440\u0435\u0448\u0438\u043b \u044f\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0447\u0442\u043e\u0431 \u043f\u0443\u0442\u0430\u043d\u043d\u0438\u0446\u044b \u043d\u0435 \u0431\u044b\u043b\u043e. \u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0436\u0435\u043c 2, \u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<pre><code class=\"python\">def test_add_data():     \"\"\"\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.\"\"\"     client = client_init_json()     table = get_table_by_id(client, table_id)     worksheet_info = get_worksheet_info(table)     print('\u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435: ', worksheet_info)     insert_one(table=table,                title=worksheet_info['names'][0],                data=['name', 'address', 'email', 'phone_number', 'birth_date', 'company', 'job'])   test_add_data()<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0443\u0442 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u043b\u0438\u0441\u0442\u0430 \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 worksheet_info \u0438 \u0434\u043e\u0441\u0442\u0430\u043b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u0443. \u0421\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u0430.<\/p>\n<p>data &#8212; \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u0435\u043a\u0438\u0439 header \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u0434 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0b4\/86a\/62c\/0b486a62c3582c8534fe5d015e3c3549.png\" width=\"759\" height=\"279\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0b4\/86a\/62c\/0b486a62c3582c8534fe5d015e3c3549.png\"\/><\/figure>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b. \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435 \u043f\u043b\u043e\u0445\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0445 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u0430 \u043a\u0430\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u043e\u0432\u043e, \u043d\u0435 \u043f\u043e 1 \u0441\u0442\u0440\u043e\u043a\u0435.<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 faker.<\/p>\n<pre><code class=\"python\">from faker import Faker   def generate_fake_user():     fake = Faker('ru_RU')      return {         'name': fake.name(),         'address': fake.address(),         'email': fake.email(),         'phone_number': fake.phone_number(),         'birth_date': fake.date_of_birth().strftime(\"%d.%m.%Y\"),         'company': fake.company(),         'job': fake.job()     }   def get_fake_users(count: int):     return [generate_fake_user() for _ in range(count)]<\/code><\/pre>\n<p>\u0421\u043c\u044b\u0441\u043b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0443\u043a\u0430\u0436\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0445 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0421\u0430\u043c \u043a\u043e\u0434 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0447\u0442\u043e\u0431 \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c main.py.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u043f\u0440\u043e\u0441\u0442\u043e\u0439)<\/p>\n<pre><code class=\"python\">def add_data_to_worksheet_var_1(table: Spreadsheet, title: str, data: List[Dict], start_row: int = 2) -> None:     \"\"\"     \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442 \u0432 Google Sheets.      :param table: \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (Spreadsheet).     :param title: \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430.     :param data: \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.     :param start_row: \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.     \"\"\"     try:         worksheet = table.worksheet(title)     except exceptions.WorksheetNotFound:         worksheet = create_worksheet(table, title, rows=100, cols=20)      # \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 insert_rows     headers = list(data[0].keys())     rows = [[row[header] for header in headers] for row in data]      # \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442     worksheet.insert_rows(rows, row=start_row)<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c, \u043f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u043b\u0438\u0441\u0442\u0430, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043f\u0438\u0441\u043a\u043e\u0432 (<code>rows<\/code>), \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <code>insert_rows<\/code>, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0443\u0436\u0435 \u0438\u0434\u0435\u0442 \u0441\u0430\u043c \u043c\u0435\u0442\u043e\u0434 insert_rows. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"python\">def test_add_many_data():     \"\"\"\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442.\"\"\"     client = client_init_json()     table = get_table_by_id(client, table_id)     users_data = get_fake_users(10)     add_data_to_worksheet_var_1(table=table,                                 title='\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421',                                 data=users_data)   test_add_many_data()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fd7\/9da\/135\/fd79da1352d3adb75c9c0239dc7099fa.png\" alt=\"\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b.\" title=\"\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b.\" width=\"911\" height=\"292\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fd7\/9da\/135\/fd79da1352d3adb75c9c0239dc7099fa.png\"\/><\/p>\n<div><figcaption>\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b.<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 get_fake_users \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 10 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u043f\u043e\u0441\u043b\u0435, \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0438\u0445 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c &#8216;\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421&#8217;.<\/p>\n<p>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438, \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0437\u0430\u0434\u0430\u0447 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043c\u0435\u0442\u043e\u0434, \u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443.<\/p>\n<pre><code class=\"python\">def add_data_to_worksheet_var_2(table: Spreadsheet, title: str, data: List[Dict], start_row: int = 2) -> None:     \"\"\"     \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442 \u0432 Google Sheets.      :param table: \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (Spreadsheet).     :param title: \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430.     :param data: \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.     :param start_row: \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.     \"\"\"     try:         worksheet = table.worksheet(title)     except exceptions.WorksheetNotFound:         worksheet = create_worksheet(table, title, rows=100, cols=20)      headers = data[0].keys()     end_row = start_row + len(data) - 1     end_col = chr(ord('A') + len(headers) - 1)      cell_range = f'A{start_row}:{end_col}{end_row}'     cell_list = worksheet.range(cell_range)      flat_data = []     for row in data:         for header in headers:             flat_data.append(row[header])      for i, cell in enumerate(cell_list):         cell.value = flat_data[i]      worksheet.update_cells(cell_list)<\/code><\/pre>\n<p>\u041d\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b:<\/p>\n<ul>\n<li>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u044f\u0447\u0435\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0432 \u043f\u043b\u043e\u0441\u043a\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044f\u0447\u0435\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 update_cells).<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435, \u043d\u043e, \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u044f\u0447\u0435\u0439\u043a\u0430\u0445 (\u043c\u0435\u0442\u043e\u0434 <code>update_cells<\/code>).<\/p>\n<p>\u041f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">def extract_data_from_sheet(table: Spreadsheet, sheet_name: str) -> List[Dict]:     \"\"\"     \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439.      :param table: \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets (Spreadsheet).     :param sheet_name: \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.     :return: \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.     \"\"\"     worksheet = table.worksheet(sheet_name)     rows = worksheet.get_all_records()     return rows<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>get_all_records<\/code>.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0443\u0434\u043e\u0431\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0441\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0445 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044f \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u0430\u043a \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043b\u044e\u0447\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"python\">def test_get_data():     \"\"\"\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets.\"\"\"     client = client_init_json()     table = get_table_by_id(client, table_id)     data = extract_data_from_sheet(table, '\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421')     for i in data:         print(i)   test_get_data()<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/76b\/485\/41f\/76b48541f92290ae3afcd2e70ac1da75.png\" alt=\"\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0432\u043b\u0435\u0437\u043b\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d, \u043d\u043e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b.\" title=\"\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0432\u043b\u0435\u0437\u043b\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d, \u043d\u043e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b.\" width=\"1679\" height=\"254\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/76b\/485\/41f\/76b48541f92290ae3afcd2e70ac1da75.png\"\/><\/p>\n<div><figcaption>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0432\u043b\u0435\u0437\u043b\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d, \u043d\u043e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b.<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <code>get_all_records()<\/code>, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <code>gspread<\/code>, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a <code>get<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u044f\u0447\u0435\u0435\u043a. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 <code>get<\/code>:<\/p>\n<pre><code class=\"python\">def extract_data_from_sheet_var_2(table: Spreadsheet, sheet_name: str) -> List[Dict]:     \"\"\"     \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439.      :param table: \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets (Spreadsheet).     :param sheet_name: \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.     :return: \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.     \"\"\"     worksheet = table.worksheet(sheet_name)     headers = worksheet.row_values(1)  # \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438      data = []     rows = worksheet.get_all_values()[1:]  # \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438      for row in rows:         row_dict = {headers[i]: value for i, value in enumerate(row)}         data.append(row_dict)      return data<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043c\u0443 \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ul>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u044f\u0447\u0435\u0435\u043a \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043b\u0438\u0441\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">def clear_range(table: Spreadsheet, sheet_name: str, start_cell: str, end_cell: str) -> None:     \"\"\"     \u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u044f\u0447\u0435\u0435\u043a \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043b\u0438\u0441\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets.      :param table: \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets (Spreadsheet).     :param sheet_name: \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.     :param start_cell: \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 'A1').     :param end_cell: \u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 'B10').     \"\"\"     worksheet = table.worksheet(sheet_name)     cell_list = worksheet.range(f\"{start_cell}:{end_cell}\")     for cell in cell_list:         cell.value = ''     worksheet.update_cells(cell_list)     print(f\"\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 {start_cell}:{end_cell} \u043d\u0430 \u043b\u0438\u0441\u0442\u0435 '{sheet_name}' \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u044b.\")<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 A10:G11<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2cb\/e8f\/efb\/2cbe8fefbd50298b2840adf2f32a8e69.png\" width=\"958\" height=\"324\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2cb\/e8f\/efb\/2cbe8fefbd50298b2840adf2f32a8e69.png\"\/><\/figure>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"python\">def test_dell_data():     \"\"\"\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443.\"\"\"     client = client_init_json()     table = get_table_by_id(client, table_id)     clear_range(table=table, sheet_name=\"\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421\", start_cell=\"A10\", end_cell=\"G11\")   test_dell_data()<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c:<\/p>\n<pre><code class=\"python\">\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 A10:G11 \u043d\u0430 \u043b\u0438\u0441\u0442\u0435 '\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421' \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u044b.<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/150\/029\/88c\/15002988c5948fb5c0589e9cda6eba25.png\" alt=\"2 \u043d\u0438\u0436\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0447\u0438\u0441\u0442\u0438\u043b\u0438\u0441\u044c\" title=\"2 \u043d\u0438\u0436\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0447\u0438\u0441\u0442\u0438\u043b\u0438\u0441\u044c\" width=\"950\" height=\"287\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/150\/029\/88c\/15002988c5948fb5c0589e9cda6eba25.png\"\/><\/p>\n<div><figcaption>2 \u043d\u0438\u0436\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0447\u0438\u0441\u0442\u0438\u043b\u0438\u0441\u044c<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0434\u0430\u043b\u0438\u043c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430:<\/p>\n<pre><code class=\"python\">def clear_sheet(table: Spreadsheet, sheet_name: str) -> None:     \"\"\"     \u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets.      :param table: \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Google Sheets (Spreadsheet).     :param sheet_name: \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.     \"\"\"     worksheet = table.worksheet(sheet_name)     worksheet.clear()     print(f\"\u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043b\u0438\u0441\u0442\u0435 '{sheet_name}' \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u044b.\")<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">def test_dell_all_data():     \"\"\"\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443.\"\"\"     client = client_init_json()     table = get_table_by_id(client, table_id)     clear_sheet(table=table, sheet_name=\"\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421\")   test_dell_all_data()<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c:<\/p>\n<pre><code class=\"python\">\u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043b\u0438\u0441\u0442\u0435 '\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421' \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u044b.<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/746\/409\/2cc\/7464092cc556ddd202f00a381fdd5473.png\" width=\"1215\" height=\"668\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/746\/409\/2cc\/7464092cc556ddd202f00a381fdd5473.png\"\/><\/figure>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/Yakvenalex\/GspreadTeach\" rel=\"noopener noreferrer nofollow\">GspreadTeach<\/a><\/p>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 Python \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Gspread \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 Google, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>Gspread \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Google Sheets \u0432 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u0445, \u0442\u0430\u043a \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437 \u043b\u0438\u0441\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u0432\u0430\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 Python \u0438 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b\u043e \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0449\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043b\u0430\u0439\u043a\u043e\u043c \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u043e\u0439.<\/p>\n<p>\u0414\u043e \u0441\u043a\u043e\u0440\u043e\u0433\u043e!<\/p>\n<p>P.S. \u0414\u043e\u0440\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0437\u044c\u044f! \u042f \u0445\u043e\u0447\u0443 \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u0441\u043a\u0440\u0435\u043d\u043d\u044e\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0432\u0430\u0441 \u0437\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043b\u0430\u0439\u043a\u0438, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0437\u0430 \u043f\u043e\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0443\u0431\u043b\u0435\u043c. \u0412\u0441\u0435 \u044d\u0442\u043e, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0431\u0435\u0441\u0446\u0435\u043d\u043d\u043e. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0448\u0435\u043b \u0432 \u0442\u043e\u043f-100 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 (\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043d\u0430 101 \u043c\u0435\u0441\u0442\u0435) \u0438 \u0434\u043e\u0441\u0442\u0438\u0433 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u043e\u0442\u043d\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432, \u044f \u043e\u0431\u0435\u0449\u0430\u044e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u043e\u043f\u044b\u0442\u043e\u043c, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u044f \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0430\u043c!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/825404\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0425\u043e\u0442\u0438\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0437\u043e\u0440 Gspread?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">25% <\/span><span class=\"tm-article-poll__answer-label\">\u041a\u043e\u043d\u0435\u0447\u043d\u043e!<\/span><span class=\"tm-article-poll__answer-votes\">1<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 25%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">75% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442.<\/span><span class=\"tm-article-poll__answer-votes\">3<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 75%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 4 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.    \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/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\/articles\/825404\/\"> https:\/\/habr.com\/ru\/articles\/825404\/<\/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>\u0414\u0440\u0443\u0437\u044c\u044f, \u043f\u0440\u0438\u0432\u0435\u0442. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0432\u0430\u0441 \u0432\u044b\u0440\u0430\u0437\u0438\u043b\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u043c\u0435\u043d\u044f \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 (Google Sheets) \u0447\u0435\u0440\u0435\u0437 Python. \u041a\u0430\u043a \u0432\u044b \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0432\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Google Sheets \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Python. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e, \u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c &#8212; Gspread.<\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Gspread, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 Google (\u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0433\u043e \u0435\u0449\u0435 \u043d\u0435\u0442).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h3>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0438 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u043e\u0437\u044c\u043c\u0443 \u0432\u0430\u0441 \u0437\u0430 \u0440\u0443\u043a\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0443 \u043f\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0430\u043f\u0430\u043c \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u044d\u0442\u0430\u043f.<\/p>\n<ul>\n<li>\n<p><strong>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f \u0432 Google.<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 Google Cloud Platform \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 Google: <\/strong><a href=\"https:\/\/console.cloud.google.com\/apis\/dashboar\" rel=\"noopener noreferrer nofollow\">Google Cloud Platform API Dashboard<\/a><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438 \u0443 \u0432\u0430\u0441<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/strong><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435: <a href=\"https:\/\/console.cloud.google.com\/projectcreate\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>. \u041d\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 &#171;CREATE&#187;:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0436\u043c\u0435\u043c \u043d\u0430 &#171;CREATE&#187;<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>\u0412\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c.<\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 &#171;Credentials&#187; \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435: <a href=\"https:\/\/console.cloud.google.com\/apis\/credentials\" rel=\"noopener noreferrer nofollow\">Google Cloud Credentials<\/a>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 \u0443 \u0432\u0430\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0443\u0442\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043f\u0443\u0442\u044c \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<p><a href=\"https:\/\/console.cloud.google.com\/apis\/credentials?project=yakvenalex-habr-project\" rel=\"noopener noreferrer nofollow\">https:\/\/console.cloud.google.com\/apis\/credentials?project=yakvenalex-habr-project<\/a><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0416\u043c\u0435\u043c \u043d\u0430 &#171;CREATE SERVICE ACCOUNT&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u2013 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c credentials. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 &#171;Service Accounts&#187;. \u0416\u043c\u0435\u043c \u043d\u0430 &#171;CREATE SERVICE ACCOUNT&#187;.<\/p>\n<p>\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 &#171;DONE&#187;.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d Service Account?<\/h4>\n<p>Service Account (\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442) \u2013 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c Google. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 Google Sheets \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u044d\u0442\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u043f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447.<\/strong><\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0442\u0440\u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u043e\u0437\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c &#171;Manage keys&#187;.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 Email. \u041c\u043e\u0436\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u043e\u043d \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c &#171;Add key&#187; \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c &#171;Create new key&#187;.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c JSON \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c &#171;CREATE&#187;.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 JSON \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u043e\u0442 JSON \u0444\u0430\u0439\u043b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 Gspread \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c email \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430.<\/strong><\/p>\n<p>\u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 JSON \u0444\u0430\u0439\u043b\u0430 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430 <code>client_email<\/code>) \u0438\u043b\u0438 \u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430: <a href=\"https:\/\/console.cloud.google.com\/iam-admin\/serviceaccounts\" rel=\"noopener noreferrer nofollow\">Service Accounts<\/a>.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e: yakvenalex-habr-account@yakvenalex-habr-project.iam.gserviceaccount.com<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c Google \u043d\u0435 \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438, \u0430 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 (email).<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c Google Sheets API. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <\/strong><a href=\"https:\/\/console.cloud.google.com\/marketplace\/product\/google\/sheets.googleapis.com\" rel=\"noopener noreferrer nofollow\">Google Sheets API<\/a> \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 &#171;ENABLE&#187;. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <strong>Google Sheets API<\/strong><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u0416\u0434\u0435\u043c \u043f\u0430\u0440\u0443 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u0438\u043a\u0430 \u043d\u0430 &#171;ENABLE&#187;.<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0434\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043b\u044f Service Account email.<\/strong><\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0443 \u044f \u043d\u0430\u0437\u043e\u0432\u0443 &#171;Habr table&#187;.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Google Sheets: <a href=\"https:\/\/docs.google.com\/spreadsheets\/\" rel=\"noopener noreferrer nofollow\">Google Sheets<\/a>.<\/p>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 &#171;+&#187; \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c, \u043d\u043e \u0441\u043c\u044b\u0441\u043b \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u0435\u043c \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0435 (\u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 &#171;Untitled spreadsheet&#187;) \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0436\u043c\u0435\u043c \u043d\u0430 &#171;Share&#187;, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c email \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c &#171;Send&#187;.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u044b, \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 &#171;Share&#187;.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a Google Sheets \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438: \u0447\u0442\u0435\u043d\u0438\u0435, \u0437\u0430\u043f\u0438\u0441\u044c, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>Gspread: \u041a\u043e\u0440\u043e\u0442\u043a\u043e \u043e \u0433\u043b\u0430\u0432\u043d\u043e\u043c<\/h4>\n<p><strong>Gspread<\/strong> \u2013 \u044d\u0442\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f Python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google \u0422\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438, \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 (\u043d\u0435 Google). \u041e\u043d\u0430 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 Google Sheets, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0421 Gspread \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442\u044b \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Google Sheets \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0451 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0438 \u043c\u043e\u0449\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p>\u042f \u0441\u043e\u0437\u0434\u0430\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 Pycharm \u043f\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a \u0436\u0435.<\/p>\n<p>\u041d\u0430\u0437\u043e\u0432\u0443 \u043f\u0440\u043e\u0435\u043a\u0442 GspreadTech. \u0412\u043e \u0432\u043d\u0443\u0442\u0440\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u043c\u0435\u0449\u0443 \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0439 JSON \u0438 \u0441\u043e\u0437\u0434\u0430\u043c \u0444\u0430\u0439\u043b <code>main.py, <\/code>\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438 \u0431\u0443\u0434\u0443 \u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u043e\u0435\u043c GitHub: <a href=\"https:\/\/github.com\/Yakvenalex\/GspreadTeach\" rel=\"noopener noreferrer nofollow\">GspreadTech<\/a>.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430:<\/p>\n<pre><code class=\"powershell\">pip install -r req.txt<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u044b:<\/p>\n<pre><code class=\"python\">from gspread import Client, Spreadsheet, Worksheet, service_account<\/code><\/pre>\n<ul>\n<li>\n<p><code>Client<\/code>:<\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Google Sheets. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>Spreadsheet<\/code>:<\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 Google Sheets. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043b\u0438\u0441\u0442\u0430\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>Worksheet<\/code>:<\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043b\u0438\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0447\u0442\u0435\u043d\u0438\u0435, \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>service_account<\/code>:<\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. \u0421 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f (<code>Client<\/code>) \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Google Sheets \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google Sheets \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 JSON:<\/p>\n<pre><code class=\"python\">def client_init_json() -> Client:     \"\"\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google Sheets.\"\"\"     return service_account(filename='yakvenalex-habr-project.json')<\/code><\/pre>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u0434\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043d\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/docs.gspread.org\/en\/v6.0.0\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Gspread<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code>&lt;gspread.client.Client object at 0x00000166052A0380><\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c client, \u0432\u0435\u0434\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441 \u043d\u0435\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u0430\u043b\u0435\u0435 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e 2 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: \u0447\u0435\u0440\u0435\u0437 id \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u0441\u044b\u043b\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 (\u0430 \u0438\u0437 \u043d\u0435\u0435 \u0435\u0449\u0451 \u0438 ID) \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0438\u0434 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>ID \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0441\u043b\u0435 d\/<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0412 \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0443\u0436\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0435\u0442\u0441\u044f ee ID.<\/p>\n<p>\u041f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n<pre><code class=\"python\">def get_table_by_url(client: Client, table_url):     \"\"\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 Google Sheets \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435.\"\"\"     return client.open_by_url(table_url)   def get_table_by_id(client: Client, table_url):     \"\"\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 Google Sheets \u043f\u043e ID \u0442\u0430\u0431\u043b\u0438\u0446\u044b.\"\"\"     return client.open_by_key(table_url)<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"python\">def test_get_table(table_url: str, table_key: str):     \"\"\"\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 Google Sheets.\"\"\"     client = client_init_json()     table = get_table_by_url(client, table_url)     print('\u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435: ', table)     table = get_table_by_id(client, table_key)     print('\u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e id: ', table)   if __name__ == '__main__':     test_get_table(table_link, table_id)<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"powershell\">\u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435:  &lt;Spreadsheet 'Habr table' id:1lzQ78nxKShICHQaVW2ZuKw5QBRR1q4gAzPPbVOHsd4Q> \u0418\u043d\u0444\u043e \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u043e id:  &lt;Spreadsheet 'Habr table' id:1lzQ78nxKShICHQaVW2ZuKw5QBRR1q4gAzPPbVOHsd4Q><\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443 \u043e\u043f\u044b\u0442\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u0438\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435.<\/p>\n<pre><code class=\"python\">def get_worksheet_info(table: Spreadsheet) -> dict:     \"\"\"\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u0438\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f.\"\"\"     worksheets = table.worksheets()     worksheet_info = {         \"count\": len(worksheets),         \"names\": [worksheet.title for worksheet in worksheets]     }     return worksheet_info   def main():     # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443     client = client_init_json()     table = get_table_by_id(client, table_id)      # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043b\u0438\u0441\u0442\u0430\u0445     info = get_worksheet_info(table)     print(f\"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432: {info['count']}\")     print(\"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u043e\u0432:\")     for name in info['names']:         print(name)   if __name__ == '__main__':     main()<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"python\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432: 1 \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u043e\u0432: Sheet1<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u043d\u043e\u0432\u044b\u0435 \u043b\u0438\u0441\u0442\u044b \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0443 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 live-\u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u043b\u0438\u0441\u0442\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043a\u043e\u0434\u0435. \u0423 \u043c\u0435\u043d\u044f \u0438\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0431\u044b\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u043b\u0438 \u043b\u0438\u0441\u0442, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u043a\u043e \u043c\u043d\u0435 \u0441 \u043f\u0440\u0435\u0442\u0435\u043d\u0437\u0438\u044f\u043c\u0438, \u043c\u043e\u043b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043e\u0437\u0434\u0430\u043b 2 \u043b\u0438\u0441\u0442\u0430. \u0414\u0430\u043b\u0435\u0435 \u0432 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"lua\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u0441\u0442\u043e\u0432: 2 \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u043e\u0432: \u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04421 \u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u04422<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043b \u0441 \u043a\u0430\u043a\u0438\u043c \u043b\u0438\u0441\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u0438\u0441\u0442. \u0420\u0435\u0447\u044c \u043f\u0440\u043e \u0442\u0430\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u0430\u043a: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 (\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u0435\u0435). \u0410 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043b\u0438\u0441\u0442 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"python\">def create_worksheet(table: Spreadsheet, title: str, rows: int, cols: int):     \"\"\"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043b\u0438\u0441\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.\"\"\"     return table.add_worksheet(title, rows, cols)<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c<\/p>\n<pre><code class=\"python\">def test_create_worksheet():     client = client_init_json()     table = get_table_by_id(client, table_id)     rez = create_worksheet(table, '\u041d\u043e\u0432\u044b\u0439\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u0442', rows=15, cols=10)     print(rez)   test_create_worksheet()<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">&lt;Worksheet '\u041d\u043e\u0432\u044b\u0439\u0420\u0430\u0431\u043e\u0447\u0438\u0439\u041b\u0438\u0441\u0442' id:2135109655><\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041b\u0438\u0441\u0442\u0443 \u043f\u0440\u0438\u0441\u0432\u043e\u0435y id. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a.<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043b\u0438\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">def<\/code><\/pre>\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-380277","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/380277","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=380277"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/380277\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=380277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=380277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=380277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}