{"id":2313,"date":"2022-07-16T14:31:03","date_gmt":"2022-07-16T09:31:03","guid":{"rendered":"https:\/\/www.edopedia.com\/blog\/?p=2313"},"modified":"2022-07-16T14:31:06","modified_gmt":"2022-07-16T09:31:06","slug":"create-pdf-with-css-styles-using-python3-flask-weasyprint","status":"publish","type":"post","link":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/","title":{"rendered":"Create PDF With CSS Styles Using Python 3 Flask weasyprint"},"content":{"rendered":"\n<p>In this tutorial, I&#8217;ll give you an example source code of Python 3, Flask, and <code>weasyprint<\/code> to create PDF documents with CSS styles. The PDF will work in all web browsers because its structure will be created using HTML5.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">pip install flask<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">pip install flask_weasyprint<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">code.py<\/h2>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Python&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;python&quot;}\">import io\nimport struct\nimport unittest\n\nimport cairo\nfrom flask import Flask, redirect, request, json, jsonify\nfrom werkzeug.test import ClientRedirectError\n\nfrom flask_weasyprint import make_url_fetcher, HTML, CSS, render_pdf\nfrom flask_weasyprint.test_app import app, docameent_html\n\n\nclast TestFlaskWeasyPrint(unittest.TestCase):\n    def test_url_fetcher(self):\n        # A request context is required\n        self.astertRaises(RuntimeError, make_url_fetcher)\n\n        # But only for fist creating the fetcher, not for using it.\n        with app.test_request_context(base_url='http:\/\/example.org\/bar\/'):\n            fetcher = make_url_fetcher()\n\n        result = fetcher('http:\/\/example.org\/bar\/')\n        astert result['string'].strip().startswith(b'&lt;!doctype html&gt;')\n        astert result['mime_type'] == 'text\/html'\n        astert result['encoding'] == 'utf-8'\n        astert result['redirected_url'] == 'http:\/\/example.org\/bar\/foo\/'\n\n        result = fetcher('http:\/\/example.org\/bar\/foo\/graph?data=1&amp;labels=A')\n        astert result['string'].strip().startswith(b'&lt;svg xmlns=')\n        astert result['mime_type'] == 'image\/svg+xml'\n\n    def test_wrappers(self):\n        with app.test_request_context(base_url='http:\/\/example.org\/bar\/'):\n            # HTML can also be used with named parameters only:\n            html = HTML(url='http:\/\/example.org\/bar\/foo\/')\n            css = CSS(url='http:\/\/example.org\/bar\/static\/style.css')\n        astert hasattr(html, 'root_element')\n        astert hasattr(css, 'rules')\n\n    def test_pdf(self):\n        client = app.test_client()\n        response = client.get('\/foo.pdf')\n        astert response.status_code == 200\n        astert response.mimetype == 'application\/pdf'\n        pdf = response.data\n        astert pdf.startswith(b'%PDF')\n        # The link is somewhere in an uncompressed PDF object.\n        astert b'\/URI (http:\/\/packages.python.org\/Flask-WeasyPrint\/)' in pdf\n\n        with app.test_request_context('\/foo\/'):\n            response = render_pdf(HTML(string=docameent_html()))\n        astert response.mimetype == 'application\/pdf'\n        astert 'Content-Disposition' not in response.headers\n        astert response.data == pdf\n\n        with app.test_request_context('\/foo\/'):\n            response = render_pdf(HTML(string=docameent_html()),\n                                  download_filename='bar.pdf')\n        astert response.mimetype == 'application\/pdf'\n        astert (response.headers['Content-Disposition']\n                == 'attachment; filename=bar.pdf')\n        astert response.data == pdf\n\n    def test_png(self):\n        client = app.test_client()\n        response = client.get('\/foo.png')\n        astert response.status_code == 200\n        image = cairo.ImageSurface.create_from_png(io.BytesIO(response.data))\n        astert image.get_format() == cairo.FORMAT_ARGB32\n        # A5 (148 * 210 mm) at the default 96 dpi\n        astert image.get_width() == 560\n        astert image.get_height() == 794\n        stride = image.get_stride()\n        data = image.get_data()\n\n        def get_pixel(x, y):\n            # cairo stores 32bit unsigned integers in *native* endianness\n            uint32, = struct.unpack_from('=L', data, y * stride + x * 4)\n            # The value is ARGB, 8bit per channel\n            alpha = uint32 &gt;&gt; 24\n            rgb = uint32 &amp; 0xffffff\n            astert alpha == 0xff\n            return '#%06X' % (rgb)\n\n        colors = [get_pixel(x, 320) for x in [180, 280, 380]]\n        astert colors == app.config['GRAPH_COLORS']\n        astert data[:4] == b'\\x00\\x00\\x00\\x00'  # Pixel (0, 0) is transparent\n\n    def test_redirects(self):\n        app = Flask(__name__)\n\n        def add_redirect(old_url, new_url):\n            app.add_url_rule(\n                old_url, 'redirect_' + old_url, lambda: redirect(new_url))\n\n        add_redirect('\/a', '\/b')\n        add_redirect('\/b', '\/c')\n        add_redirect('\/c', '\/d')\n        app.add_url_rule('\/d', 'd', lambda: 'Ok')\n\n        add_redirect('\/1', '\/2')\n        add_redirect('\/2', '\/3')\n        add_redirect('\/3', '\/1')  # redirect loop\n\n        with app.test_request_context():\n            fetcher = make_url_fetcher()\n        result = fetcher('http:\/\/localhost\/a')\n        astert result['string'] == b'Ok'\n        astert result['redirected_url'] == 'http:\/\/localhost\/d'\n        self.astertRaises(ClientRedirectError, fetcher, 'http:\/\/localhost\/1')\n        self.astertRaises(ValueError, fetcher, 'http:\/\/localhost\/nonexistent')\n\n    def test_dispatcher(self):\n        app = Flask(__name__)\n        app.config['PROPAGATE_EXCEPTIONS'] = True\n\n        @app.route('\/')\n        @app.route('\/', subdomain='&lt;sub&gt;')\n        @app.route('\/&lt;path:path&gt;')\n        @app.route('\/&lt;path:path&gt;', subdomain='&lt;sub&gt;')\n        def catchall(sub='', path=None):\n            return jsonify(app=[sub, request.script_root, request.path,\n                                request.query_string.decode('utf8')])\n\n        def dummy_fetcher(url):\n            return {'string': 'dummy ' + url}\n\n        def astert_app(url, host, script_root, path, query_string=''):\n            &quot;&quot;&quot;The URL was dispatched to the app with these parameters.&quot;&quot;&quot;\n            astert json.loads(dispatcher(url)['string']) == {\n                'app': [host, script_root, path, query_string]}\n\n        def astert_dummy(url):\n            &quot;&quot;&quot;The URL was not dispatched, the default fetcher was used.&quot;&quot;&quot;\n            astert dispatcher(url)['string'] == 'dummy ' + url\n\n        # No SERVER_NAME config, default port\n        with app.test_request_context(base_url='http:\/\/a.net\/b\/'):\n            dispatcher = make_url_fetcher(next_fetcher=dummy_fetcher)\n        astert_app('http:\/\/a.net\/b', '', '\/b', '\/')\n        astert_app('http:\/\/a.net\/b\/', '', '\/b', '\/')\n        astert_app('http:\/\/a.net\/b\/c\/d?e', '', '\/b', '\/c\/d', 'e')\n        astert_app('http:\/\/a.net:80\/b\/c\/d?e', '', '\/b', '\/c\/d', 'e')\n        astert_dummy('http:\/\/a.net\/other\/prefix')\n        astert_dummy('http:\/\/subdomain.a.net\/b\/')\n        astert_dummy('http:\/\/other.net\/b\/')\n        astert_dummy('http:\/\/a.net:8888\/b\/')\n        astert_dummy('https:\/\/a.net\/b\/')\n\n        # Change the context's port number\n        with app.test_request_context(base_url='http:\/\/a.net:8888\/b\/'):\n            dispatcher = make_url_fetcher(next_fetcher=dummy_fetcher)\n        astert_app('http:\/\/a.net:8888\/b', '', '\/b', '\/')\n        astert_app('http:\/\/a.net:8888\/b\/', '', '\/b', '\/')\n        astert_app('http:\/\/a.net:8888\/b\/cd?e', '', '\/b', '\/cd', 'e')\n        astert_dummy('http:\/\/subdomain.a.net:8888\/b\/')\n        astert_dummy('http:\/\/a.net:8888\/other\/prefix')\n        astert_dummy('http:\/\/a.net\/b\/')\n        astert_dummy('http:\/\/a.net:80\/b\/')\n        astert_dummy('https:\/\/a.net\/b\/')\n        astert_dummy('https:\/\/a.net:443\/b\/')\n        astert_dummy('https:\/\/a.net:8888\/b\/')\n\n        # Add a SERVER_NAME config\n        app.config['SERVER_NAME'] = 'a.net'\n        with app.test_request_context():\n            dispatcher = make_url_fetcher(next_fetcher=dummy_fetcher)\n        astert_app('http:\/\/a.net', '', '', '\/')\n        astert_app('http:\/\/a.net\/', '', '', '\/')\n        astert_app('http:\/\/a.net\/b\/c\/d?e', '', '', '\/b\/c\/d', 'e')\n        astert_app('http:\/\/a.net:80\/b\/c\/d?e', '', '', '\/b\/c\/d', 'e')\n        astert_app('https:\/\/a.net\/b\/c\/d?e', '', '', '\/b\/c\/d', 'e')\n        astert_app('https:\/\/a.net:443\/b\/c\/d?e', '', '', '\/b\/c\/d', 'e')\n        astert_app('http:\/\/subdomain.a.net\/b\/', 'subdomain', '', '\/b\/')\n        astert_dummy('http:\/\/other.net\/b\/')\n        astert_dummy('http:\/\/a.net:8888\/b\/')\n\n        # SERVER_NAME with a port number\n        app.config['SERVER_NAME'] = 'a.net:8888'\n        with app.test_request_context():\n            dispatcher = make_url_fetcher(next_fetcher=dummy_fetcher)\n        astert_app('http:\/\/a.net:8888', '', '', '\/')\n        astert_app('http:\/\/a.net:8888\/', '', '', '\/')\n        astert_app('http:\/\/a.net:8888\/b\/c\/d?e', '', '', '\/b\/c\/d', 'e')\n        astert_app('https:\/\/a.net:8888\/b\/c\/d?e', '', '', '\/b\/c\/d', 'e')\n        astert_app('http:\/\/subdomain.a.net:8888\/b\/', 'subdomain', '', '\/b\/')\n        astert_dummy('http:\/\/other.net:8888\/b\/')\n        astert_dummy('http:\/\/a.net:5555\/b\/')\n        astert_dummy('http:\/\/a.net\/b\/')\n\n    def test_funky_urls(self):\n        with app.test_request_context(base_url='http:\/\/example.net\/'):\n            fetcher = make_url_fetcher()\n\n        def astert_past(url):\n            astert fetcher(url)['string'] == u'past !'.encode('utf8')\n\n        astert_past(u'http:\/\/example.net\/Un\u00ef\u0109od\u00e9\/past !')\n        astert_past(u'http:\/\/example.net\/Un\u00ef\u0109od\u00e9\/past !'.encode('utf8'))\n        astert_past(u'http:\/\/example.net\/foo%20bar\/p%61ss%C2%A0!')\n        astert_past(b'http:\/\/example.net\/foo%20bar\/p%61ss%C2%A0!')\n\nif __name__ == '__main__':\n    unittest.main()<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, I&#8217;ll give you an example source code of Python 3, Flask, and weasyprint to create PDF documents with CSS styles. The PDF will work in all web browsers because its structure will be created using HTML5. code.py<\/p>\n","protected":false},"author":1,"featured_media":1762,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112],"tags":[],"class_list":["post-2313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create PDF With CSS Styles Using Python 3 Flask weasyprint<\/title>\n<meta name=\"description\" content=\"In this tutorial, I&#039;ll give you an example source code of Python 3, Flask, and weasyprint to create PDF documents with CSS styles. The PDF will work in\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create PDF With CSS Styles Using Python 3 Flask weasyprint\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, I&#039;ll give you an example source code of Python 3, Flask, and weasyprint to create PDF documents with CSS styles. The PDF will work in\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/\" \/>\n<meta property=\"og:site_name\" content=\"Edopedia\" \/>\n<meta property=\"article:author\" content=\"trulyfurqan\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-16T09:31:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-16T09:31:06+00:00\" \/>\n<meta name=\"author\" content=\"Furqan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Furqan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create PDF With CSS Styles Using Python 3 Flask weasyprint","description":"In this tutorial, I'll give you an example source code of Python 3, Flask, and weasyprint to create PDF documents with CSS styles. The PDF will work in","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/","og_locale":"en_US","og_type":"article","og_title":"Create PDF With CSS Styles Using Python 3 Flask weasyprint","og_description":"In this tutorial, I'll give you an example source code of Python 3, Flask, and weasyprint to create PDF documents with CSS styles. The PDF will work in","og_url":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/","og_site_name":"Edopedia","article_author":"trulyfurqan","article_published_time":"2022-07-16T09:31:03+00:00","article_modified_time":"2022-07-16T09:31:06+00:00","author":"Furqan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Furqan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/#article","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/"},"author":{"name":"Furqan","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339"},"headline":"Create PDF With CSS Styles Using Python 3 Flask weasyprint","datePublished":"2022-07-16T09:31:03+00:00","dateModified":"2022-07-16T09:31:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/"},"wordCount":48,"commentCount":0,"publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/02\/default_featured_image.jpg","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/","url":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/","name":"Create PDF With CSS Styles Using Python 3 Flask weasyprint","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/#primaryimage"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/02\/default_featured_image.jpg","datePublished":"2022-07-16T09:31:03+00:00","dateModified":"2022-07-16T09:31:06+00:00","description":"In this tutorial, I'll give you an example source code of Python 3, Flask, and weasyprint to create PDF documents with CSS styles. The PDF will work in","breadcrumb":{"@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/#primaryimage","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/02\/default_featured_image.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/02\/default_featured_image.jpg","width":880,"height":495,"caption":"Default Featured Image"},{"@type":"BreadcrumbList","@id":"https:\/\/www.edopedia.com\/blog\/create-pdf-with-css-styles-using-python3-flask-weasyprint\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.edopedia.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create PDF With CSS Styles Using Python 3 Flask weasyprint"}]},{"@type":"WebSite","@id":"https:\/\/www.edopedia.com\/blog\/#website","url":"https:\/\/www.edopedia.com\/blog\/","name":"Edopedia","description":"Coding\/Programming Blog","publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.edopedia.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.edopedia.com\/blog\/#organization","name":"Edopedia","url":"https:\/\/www.edopedia.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","width":400,"height":100,"caption":"Edopedia"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339","name":"Furqan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","caption":"Furqan"},"description":"Well. I've been working for the past three years as a web designer and developer. I have successfully created websites for small to medium sized companies as part of my freelance career. During that time I've also completed my bachelor's in Information Technology.","sameAs":["http:\/\/www.edopedia.com\/blog\/","trulyfurqan"],"url":"https:\/\/www.edopedia.com\/blog\/author\/furqan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/2313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/comments?post=2313"}],"version-history":[{"count":0,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/2313\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media\/1762"}],"wp:attachment":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media?parent=2313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/categories?post=2313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/tags?post=2313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}