{"id":100504,"date":"2025-03-07T17:57:46","date_gmt":"2025-03-07T14:27:46","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi\/"},"modified":"2025-03-07T17:57:46","modified_gmt":"2025-03-07T14:27:46","slug":"%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi\/","title":{"rendered":"\u0627\u062c\u0631\u0627\u06cc \u0627\u0633\u062a\u0631\u0627\u062d\u062a &#8220;\u0627\u0633\u0646\u0627\u062f&#8221; \u0628\u0627 Fastapi"},"content":{"rendered":"<div data-article-id=\"2317184\" id=\"article-body\">\n<p>\u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0645\u0648\u0646\u0647 \u06a9\u0647 \u0646\u0634\u0627\u0646 \u062f\u0647\u0646\u062f\u0647 \u0627\u062c\u0631\u0627\u06cc \u0627\u0633\u0646\u0627\u062f \u0648 \u0645\u062f\u0627\u0631\u06a9 \u060c \u062f\u0631 \u0645\u0639\u0631\u0636 \u0646\u0645\u0627\u06cc\u0634\u06af\u0627\u0647 \u0627\u0633\u062a\u0631\u0627\u062d\u062a \u060c \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 FastPi \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0633\u062a.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/media2.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxc4ot7cooapweljoxqsm.png\" alt=\"\u0634\u0631\u062d \u062a\u0635\u0648\u06cc\u0631\" loading=\"lazy\" width=\"800\" height=\"401\" title=\"\"><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter-rtl ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0641\u0647\u0631\u0633\u062a \u0645\u0637\u0627\u0644\u0628<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/nabfollower.com\/blog\/%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi\/#%D9%85%D9%82%D8%AF%D9%85%D9%87\" >\u0645\u0642\u062f\u0645\u0647<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/nabfollower.com\/blog\/%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi\/#%DA%86%D9%87_%DA%86%DB%8C%D8%B2%DB%8C_%D8%A7%D8%B3%D8%AA\" >\u0686\u0647 \u0686\u06cc\u0632\u06cc \u0627\u0633\u062a<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/nabfollower.com\/blog\/%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi\/#%D9%88%DB%8C%DA%98%DA%AF%DB%8C_%D9%87%D8%A7%DB%8C_%D8%A7%D8%B3%D9%86%D8%A7%D8%AF\" >\u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0627\u0633\u0646\u0627\u062f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/nabfollower.com\/blog\/%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi\/#%D8%A7%D8%AC%D8%B1%D8%A7%DB%8C\" >\u0627\u062c\u0631\u0627\u06cc<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/nabfollower.com\/blog\/%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi\/#%D9%BE%D8%A7%DB%8C%D8%A7%D9%86\" >\u067e\u0627\u06cc\u0627\u0646<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/nabfollower.com\/blog\/%d8%a7%d8%ac%d8%b1%d8%a7%db%8c-%d8%a7%d8%b3%d8%aa%d8%b1%d8%a7%d8%ad%d8%aa-%d8%a7%d8%b3%d9%86%d8%a7%d8%af-%d8%a8%d8%a7-fastapi\/#%D9%BE%DB%8C%D9%88%D9%86%D8%AF%D9%87%D8%A7%DB%8C_%D9%85%D9%81%DB%8C%D8%AF\" >\u067e\u06cc\u0648\u0646\u062f\u0647\u0627\u06cc \u0645\u0641\u06cc\u062f<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%D9%85%D9%82%D8%AF%D9%85%D9%87\"><\/span>\n<p>  \u0645\u0642\u062f\u0645\u0647<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0627\u06cc\u0646 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u062f\u06cc\u06af\u0631\u06cc \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 (\u0628\u0633\u06cc\u0627\u0631 \u0633\u0627\u062f\u0647) \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0633\u062a\u0631\u0627\u062d\u062a \u0628\u0631 \u0627\u0633\u0627\u0633 \u062a\u0628\u062f\u06cc\u0644 \u0633\u0646\u062f \u0627\u0633\u0646\u0627\u062f \u0627\u0632 PDF \u0628\u0647 Markdown \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 FastAPI \u0627\u0633\u062a.<\/p>\n<p>\u0627\u0648\u0644 \u0686\u06cc\u0632\u0647\u0627 \u0627\u0648\u0644 \u060c \u0686\u0647 \u0686\u06cc\u0632\u06cc \u062f\u0631 \u062d\u0627\u0644 \u0627\u0633\u0646\u0627\u062f \u0627\u0633\u062a \u0648 \u0627\u06af\u0631 \u0634\u0645\u0627 \u062f\u0631 \u0645\u0648\u0631\u062f \u0622\u0646 \u0646\u0634\u0646\u06cc\u062f\u0647 \u0627\u06cc\u062f \u0686\u0647 \u06a9\u0627\u0631\u06cc \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f \ud83d\ude32\ud83d\ude33<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%DA%86%D9%87_%DA%86%DB%8C%D8%B2%DB%8C_%D8%A7%D8%B3%D8%AA\"><\/span>\n<p>  \u0686\u0647 \u0686\u06cc\u0632\u06cc \u0627\u0633\u062a<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0627\u0633\u0646\u0627\u062f \u067e\u0631\u062f\u0627\u0632\u0634 \u0627\u0633\u0646\u0627\u062f \u0631\u0627 \u0633\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f \u060c \u0627\u0632 \u0642\u0627\u0644\u0628 \u0647\u0627\u06cc \u0645\u062a\u0646\u0648\u0639\u06cc &#8211; \u0627\u0632 \u062c\u0645\u0644\u0647 \u062f\u0631\u06a9 \u067e\u06cc\u0634\u0631\u0641\u062a\u0647 PDF &#8211; \u062a\u062c\u0632\u06cc\u0647 \u0648 \u062a\u062d\u0644\u06cc\u0644 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0627\u062f\u063a\u0627\u0645 \u0647\u0627\u06cc \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 \u0631\u0627 \u0628\u0627 \u0627\u06a9\u0648\u0633\u06cc\u0633\u062a\u0645 Gen AI \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%D9%88%DB%8C%DA%98%DA%AF%DB%8C_%D9%87%D8%A7%DB%8C_%D8%A7%D8%B3%D9%86%D8%A7%D8%AF\"><\/span>\n<p>  \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0627\u0633\u0646\u0627\u062f<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>\ud83d\uddc2 \u062a\u062c\u0632\u06cc\u0647 \u0686\u0646\u062f\u06cc\u0646 \u0642\u0627\u0644\u0628 \u0645\u0633\u062a\u0646\u062f \u0634\u0627\u0645\u0644. PDF \u060c DOCX \u060c XLSX \u060c HTML \u060c \u062a\u0635\u0627\u0648\u06cc\u0631 \u0648 \u0645\u0648\u0627\u0631\u062f \u062f\u06cc\u06af\u0631<\/li>\n<li>\ud83d\udcd1 \u062f\u0631\u06a9 \u067e\u06cc\u0634\u0631\u0641\u062a\u0647 PDF \u0634\u0627\u0645\u0644. \u0686\u06cc\u062f\u0645\u0627\u0646 \u0635\u0641\u062d\u0647 \u060c \u062a\u0631\u062a\u06cc\u0628 \u062e\u0648\u0627\u0646\u062f\u0646 \u060c \u0633\u0627\u062e\u062a\u0627\u0631 \u062c\u062f\u0648\u0644 \u060c \u06a9\u062f \u060c \u0641\u0631\u0645\u0648\u0644 \u0647\u0627 \u060c \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0648 \u0645\u0648\u0627\u0631\u062f \u062f\u06cc\u06af\u0631<\/li>\n<li>\ud83e\uddec \u0642\u0627\u0644\u0628 \u0646\u0645\u0627\u06cc\u0646\u062f\u06af\u06cc DoclingDocument Unified \u0648 Expressive<\/li>\n<li>\u21aa \u0642\u0627\u0644\u0628 \u0647\u0627 \u0648 \u06af\u0632\u06cc\u0646\u0647 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0635\u0627\u062f\u0631\u0627\u062a\u06cc \u060c \u0627\u0632 \u062c\u0645\u0644\u0647 Markdown \u060c HTML \u0648 JSON \u0628\u062f\u0648\u0646 \u0636\u0631\u0631<\/li>\n<li>\ud83d\udd12 \u0642\u0627\u0628\u0644\u06cc\u062a \u0647\u0627\u06cc \u0627\u062c\u0631\u0627\u06cc \u0645\u062d\u0644\u06cc \u0628\u0631\u0627\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u062d\u0633\u0627\u0633 \u0648 \u0645\u062d\u06cc\u0637 \u0647\u0627\u06cc \u062f\u0627\u0631\u0627\u06cc \u0647\u0648\u0627<\/li>\n<li>integrations inclications incl. Langchain \u060c Llamaindex \u060c \u062e\u062f\u0645\u0647 AI \u0648 Haystack \u0628\u0631\u0627\u06cc Aticic AI<\/li>\n<li>\ud83d\udd0d \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u06af\u0633\u062a\u0631\u062f\u0647 OCR \u0628\u0631\u0627\u06cc PDF \u0648 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0627\u0633\u06a9\u0646 \u0634\u062f\u0647<\/li>\n<li>cli \u0633\u0627\u062f\u0647 \u0648 \u0631\u0627\u062d\u062a CLI<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"%D8%A7%D8%AC%D8%B1%D8%A7%DB%8C\"><\/span>\n<p>  \u0627\u062c\u0631\u0627\u06cc<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0627\u0648\u0644\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0645\u0648\u0646\u0647 \u062f\u0631 \u06cc\u06a9 \u067e\u0644\u062a \u0641\u0631\u0645 \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 CPU \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>\u0645\u0631\u0627\u062d\u0644 \u062a\u0648\u0635\u06cc\u0647 \u0634\u062f\u0647 \u062f\u0631 \u0632\u06cc\u0631 \u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>#macos\/linux version\npython3.11 -m venv myenv\nsource myenv\/bin\/activate\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<ul>\n<li>\u0628\u0633\u062a\u0647 \u0647\u0627 \u0648 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f.\n<\/li>\n<\/ul>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>pip install fastapi uvicorn docling python-multipart\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>from fastapi import FastAPI, UploadFile, File, HTTPException\nfrom docling.document_converter import DocumentConverter, ConverterConfig\nfrom pathlib import Path\n\napp = FastAPI()\n\n@app.post(\"\/convert_pdf_to_markdown\/\")\nasync def convert_pdf_to_markdown(file: UploadFile = File(...)):\n    if file.content_type != \"application\/pdf\":\n        raise HTTPException(status_code=400, detail=\"Invalid file type. Only PDF files are allowed.\")\n\n    try:\n        temp_file_path = Path(f\".\/temp_{file.filename}\")\n        with open(temp_file_path, \"wb\") as f:\n            f.write(await file.read())\n\n        config = ConverterConfig(ocr_backend=\"default\", layout_backend=\"default\")\n        converter = DocumentConverter(config=config)\n\n        result = converter.convert(str(temp_file_path))\n        markdown_output = result.document.export_to_markdown()\n\n        temp_file_path.unlink()\n\n        return {\"markdown\": markdown_output}\n\n    except Exception as e:\n        if temp_file_path.exists():\n            temp_file_path.unlink()\n        raise HTTPException(status_code=500, detail=f\"An error occurred during conversion: {str(e)}\")\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<ul>\n<li>\u06a9\u062f \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f.\n<\/li>\n<\/ul>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code># you can change the defauly port number from 8000 to another one\n# if already in use\nuvicorn main:app --port 8080\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<ul>\n<li>\u06a9\u062f \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062f\u06cc\u06af\u0631\u06cc \u0622\u0632\u0645\u0627\u06cc\u0634 \u06a9\u0646\u06cc\u062f (DUH \ud83e\udd13)\n<\/li>\n<\/ul>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>curl -X POST -F \"file=@.\/docker-commands.pdf\" http:\/\/127.0.0.1:8080\/convert_pdf_to_markdown\/\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>{\"markdown\":\"## All Docker Commands\\n\\nHere's a comprehensive list of commonly used Docker commands, along with their usage:\\n\\n## Basic Docker Commands\\n\\n- 1. ocker version d Displays Docker version information. :\\n- 2. ocker info d Provides detailed information about the   Docker installation. :\\n- 3. ocker --help d Lists all available Docker commands   and options. :\\n\\n## mage Management Commands I\\n\\n- 1. ocker pull &lt;image&gt; d Downloads an image from a Docker   registry (e.g., Docker : Hub).\\n- \u25cb Example: ocker pull nginx d 2. ocker images d Lists all Docker images available on   the system. : \u25cb Example: ocker images d 3. ocker rmi &lt;image&gt; d Deletes a Docker image from the   system. : \u25cb Example: ocker rmi nginx d 4. ocker build -t &lt;name&gt; &lt;path&gt; d Builds a Docker image   from a Dockerfile. : \u25cb Example: ocker build -t myapp:latest . d 5. ocker tag &lt;source\\\\_image&gt; &lt;target\\\\_image&gt; d Tags an   image with a new : name. \u25cb Example: ocker tag nginx:latest myrepo\/nginx:v1 d 6. ocker save -o &lt;file&gt; &lt;image&gt; d Saves an image to a   tar archive. : \u25cb Example: ocker save -o nginx.tar nginx:latest d 7. ocker load -i &lt;file&gt; d Loads an image from a tar archive. :\\n- ocker load -i nginx.tar\\n- \u25cb Example: d\\n\\n## Container Management Commands\\n\\n- 1. ocker run &lt;image&gt; d Creates and starts a new container   from an image. :\\n- \u25cb Example: d\\n- 2. ocker run -d &lt;image&gt; d : background).\\n- \u25cb Example: d\\n- 3. ocker run -it &lt;image&gt; d Runs a container interactively with a terminal. :\\n- \u25cb Example: d\\n- 4. ocker ps d :\\n- \u25cb Example: d\\n- 5. ocker ps -a d :\\n- \u25cb Example: ocker ps -a d\\n- 6. ocker stop &lt;container&gt; d Stops a running container. :\\n- \u25cb Example: ocker stop my\\\\_container d\\n- 7. ocker start &lt;container&gt; d Starts a stopped container. :\\n- \u25cb Example: ocker start my\\\\_container d\\n- 8. ocker restart &lt;container&gt; d Restarts a container. :\\n- \u25cb Example: ocker restart my\\\\_container d\\n- 9. ocker rm &lt;container&gt; d Deletes a stopped container. :\\n- \u25cb Example: ocker rm my\\\\_container d\\n- 10. ocker exec -it &lt;container&gt; &lt;command&gt; d Executes a   command in a : unning container. r\\n- \u25cb Example: ocker exec -it my\\\\_container bash d\\n- 1. 1 ocker logs &lt;container&gt; d Displays logs from a container. :\\n- \u25cb Example: ocker logs my\\\\_container d\\n- 12. ocker attach &lt;container&gt; d Attaches to a running container's   console. :\\n- \u25cb Example: ocker attach my\\\\_container d\\n- 13.\\n- ocker kill &lt;container&gt; d Forcefully stops a container. :\\n- \u25cb Example: ocker kill my\\\\_container d\\n\\n```\n\n\\nocker run nginx Runs a container in detached   mode (in the ocker run -d nginx ocker run -it ubuntu bash Lists all running containers. ocker ps Lists all containers, including stopped   ones.\\n\n\n```\\n\\n## Container Networking Commands\\n\\n- 1. ocker network ls d Lists all Docker networks. :\\n- \u25cb Example: ocker network ls d\\n- 2. ocker network create &lt;name&gt; d Creates a new Docker   network. :\\n- \u25cb Example: ocker network create my\\\\_network d\\n- 3. ocker network rm &lt;name&gt; d Deletes a Docker network. :\\n- \u25cb Example: ocker network rm my\\\\_network d\\n- 4. ocker network connect &lt;network&gt; &lt;container&gt; d Connects   a container to : a network.\\n- \u25cb Example: ocker network connect my\\\\_network my\\\\_container d\\n- 5. ocker network disconnect &lt;network&gt; &lt;container&gt; d Disconnects   a : ontainer from a network. c\\n- \u25cb Example: ocker network disconnect my\\\\_network my\\\\_container d\\n\\n## Volume Management Commands\\n\\n- 1. ocker volume ls d Lists all Docker volumes. :\\n- \u25cb Example: ocker volume ls d\\n- 2. ocker volume create &lt;name&gt; d Creates a new Docker volume. :\\n- \u25cb Example: ocker volume create my\\\\_volume d\\n- 3. ocker volume rm &lt;name&gt; d Deletes a Docker volume. :\\n- \u25cb Example: ocker volume rm my\\\\_volume d\\n- 4. ocker volume inspect &lt;name&gt; d Displays detailed information   about a volume. :\\n- \u25cb Example: ocker volume inspect my\\\\_volume d 5. ocker run -v &lt;volume&gt;:\/path\/in\/container &lt;image&gt; d Mounts a volume : nto a container. i \u25cb Example: ocker run -v my\\\\_volume:\/data nginx d\\n\\n## Dockerfile Commands\\n\\n- 1. ocker build -f &lt;Dockerfile&gt; d Builds an image from   a specific Dockerfile. : \u25cb Example: ocker build -f Dockerfile . d\\n\\n## Docker Compose Commands\\n\\n- 1. ocker-compose up d Starts containers defined in a : ocker-compose.yml d ile. f\\n- ocker-compose up\\n- \u25cb Example: d\\n- 2. ocker-compose down d Stops and removes containers,   networks, and volumes : reated by c ocker-compose up d .\\n- \u25cb Example: ocker-compose down d\\n- 3. ocker-compose ps d Lists containers created by Docker   Compose. :\\n- \u25cb Example: ocker-compose ps d\\n- 4. ocker-compose logs d Shows logs for containers managed   by Docker Compose. :\\n- \u25cb Example: ocker-compose logs d\\n- 5. ocker-compose build d Builds or rebuilds services   defined in a Compose file. :\\n- \u25cb Example: ocker-compose build d\\n\\n## mage and Container Inspection I\\n\\n- 1. ocker inspect &lt;container\\\\_or\\\\_image&gt; d Returns low-level   information about : a container or image.\\n- \u25cb Example: ocker inspect my\\\\_container d\\n- 2. ocker top &lt;container&gt; d Displays running processes   in a container. :\\n- \u25cb Example: ocker top my\\\\_container d\\n- 3. ocker stats d Displays resource usage statistics of   running containers. :\\n- \u25cb Example: ocker stats d\\n\\n## System Cleanup Commands\\n\\n- 1. ocker system df d :\\n- \u25cb Example: d\\n- 2. ocker system prune d : networks, dangling images).\\n- \u25cb Example: d\\n- 3. ocker image prune d :\\n- \u25cb Example: d\\n- 4. ocker container prune d Removes all stopped containers. :\\n- \u25cb\\n- Example: d\\n\\n```\n\n\\nDisplays information about disk   usage by Docker. ocker system df Removes unused data (stopped containers, unused ocker system prune Removes unused and dangling images. ocker image prune\\n\n\n```\\n\\nocker container prune\\n\\n## Other Commands\\n\\n- 1. ocker commit &lt;container&gt; &lt;image&gt; d Creates a new image   from a : ontainer's changes. c\\n- \u25cb Example: ocker commit my\\\\_container my\\\\_image d\\n- 2. ocker export &lt;container&gt; d Exports a container's filesystem   to a tar archive. :\\n- \u25cb\\n- Example: ocker export my\\\\_container &gt; container.tar d\\n- 3. ocker import &lt;file&gt; d Imports a tarball to create   an image. :\\n- \u25cb Example: ocker import container.tar my\\\\_imported\\\\_image d\\n\\nThese Docker commands cover the most common activities when working with Docker, anging from managing containers, images, and volumes to orchestrating multi-container r applications with Docker Compose. Mastering these commands helps in efficiently creating, deploying, and managing containerized applications.\"}%            \n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0648 \u0647\u0645\u06cc\u0646 \u0627\u0633\u062a!<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%D9%BE%D8%A7%DB%8C%D8%A7%D9%86\"><\/span>\n<p>  \u067e\u0627\u06cc\u0627\u0646<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u060c \u0627\u062c\u0631\u0627\u06cc \u0627\u0633\u062a\u0631\u0627\u062d\u062a \u0633\u0627\u062f\u0647 \u0627\u0632 \u0638\u0631\u0641\u06cc\u062a \u0647\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0627\u0633\u0646\u0627\u062f \u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u062f\u0627\u0633\u062a\u0627\u0646 \u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631 \u0628\u0627 \u0645\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627\u0634\u06cc\u062f<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%D9%BE%DB%8C%D9%88%D9%86%D8%AF%D9%87%D8%A7%DB%8C_%D9%85%D9%81%DB%8C%D8%AF\"><\/span>\n<p>  \u067e\u06cc\u0648\u0646\u062f\u0647\u0627\u06cc \u0645\u0641\u06cc\u062f<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0645\u0648\u0646\u0647 \u06a9\u0647 \u0646\u0634\u0627\u0646 \u062f\u0647\u0646\u062f\u0647 \u0627\u062c\u0631\u0627\u06cc \u0627\u0633\u0646\u0627\u062f \u0648 \u0645\u062f\u0627\u0631\u06a9 \u060c \u062f\u0631 \u0645\u0639\u0631\u0636 \u0646\u0645\u0627\u06cc\u0634\u06af\u0627\u0647 \u0627\u0633\u062a\u0631\u0627\u062d\u062a \u060c \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 FastPi \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0633\u062a. \u0645\u0642\u062f\u0645\u0647 \u0627\u06cc\u0646 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u062f\u06cc\u06af\u0631\u06cc \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 (\u0628\u0633\u06cc\u0627\u0631 \u0633\u0627\u062f\u0647) \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0633\u062a\u0631\u0627\u062d\u062a \u0628\u0631 \u0627\u0633\u0627\u0633 \u062a\u0628\u062f\u06cc\u0644 \u0633\u0646\u062f \u0627\u0633\u0646\u0627\u062f \u0627\u0632 PDF \u0628\u0647 Markdown \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 FastAPI \u0627\u0633\u062a. \u0627\u0648\u0644 \u0686\u06cc\u0632\u0647\u0627 \u0627\u0648\u0644 \u060c &hellip;<\/p>\n","protected":false},"author":2,"featured_media":100505,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/media2.dev.to\/dynamic\/image\/width=1000,height=500,fit=cover,gravity=auto,format=auto\/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fibc5x172vgi4ccfzyhj7.png","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-100504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/100504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=100504"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/100504\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/100505"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=100504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=100504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=100504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}