{"id":1167554,"date":"2025-01-15T15:46:25","date_gmt":"2025-01-15T07:46:25","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1167554.html"},"modified":"2025-01-15T15:46:27","modified_gmt":"2025-01-15T07:46:27","slug":"mac%e4%bd%bf%e7%94%a8python%e5%a6%82%e4%bd%95%e4%bf%9d%e5%ad%98%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1167554.html","title":{"rendered":"mac\u4f7f\u7528python\u5982\u4f55\u4fdd\u5b58\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25211441\/e0d3d86c-db43-4247-adea-d7e2c0bc3255.webp\" alt=\"mac\u4f7f\u7528python\u5982\u4f55\u4fdd\u5b58\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>\u5728Mac\u4e0a\u4f7f\u7528Python\u4fdd\u5b58\u6587\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\uff1a\u4f7f\u7528\u5185\u7f6e\u7684open\u51fd\u6570\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5982pandas\u3001\u4f7f\u7528JSON\u6a21\u5757\u3001\u4ee5\u53ca\u4f7f\u7528pickle\u6a21\u5757\u3002<\/strong>\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u4e14\u57fa\u7840\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u5185\u7f6e\u7684open\u51fd\u6570\uff0c\u5b83\u53ef\u4ee5\u8bfb\u53d6\u548c\u5199\u5165\u6587\u672c\u6587\u4ef6\u6216\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u5185\u7f6e\u7684open\u51fd\u6570<\/h3>\n<\/p>\n<p><h4>1\u3001\u5199\u5165\u6587\u672c\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>open<\/code>\u51fd\u6570\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u5b57\u7b26\u4e32\u5199\u5165\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u6253\u5f00\u6587\u4ef6\uff0c\u6a21\u5f0f\u4e3a&#39;w&#39;\u8868\u793a\u5199\u5165\u6a21\u5f0f<\/p>\n<p>with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&#39;Hello, World!&#39;)<\/p>\n<p>print(&quot;\u6587\u4ef6\u5df2\u4fdd\u5b58&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>open<\/code>\u51fd\u6570\u6253\u5f00\u4e86\u4e00\u4e2a\u540d\u4e3a<code>example.txt<\/code>\u7684\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528\u5199\u5165\u6a21\u5f0f\uff08&#39;w&#39;\uff09\u3002<code>with<\/code>\u5173\u952e\u5b57\u786e\u4fdd\u6587\u4ef6\u64cd\u4f5c\u5b8c\u6210\u540e\u81ea\u52a8\u5173\u95ed\u6587\u4ef6\uff0c\u9632\u6b62\u8d44\u6e90\u6cc4\u6f0f\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u8ffd\u52a0\u5199\u5165<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u60f3\u5728\u6587\u4ef6\u672b\u5c3e\u8ffd\u52a0\u5185\u5bb9\uff0c\u53ef\u4ee5\u4f7f\u7528\u8ffd\u52a0\u6a21\u5f0f\uff08&#39;a&#39;\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;a&#39;) as file:<\/p>\n<p>    file.write(&#39;\\nThis is an appended line.&#39;)<\/p>\n<p>print(&quot;\u5185\u5bb9\u5df2\u8ffd\u52a0\u5230\u6587\u4ef6&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93pandas<\/h3>\n<\/p>\n<p><h4>1\u3001\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>Pandas\u5e93\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u529f\u80fd\uff0c\u5e76\u4e14\u80fd\u591f\u8f7b\u677e\u5730\u5c06DataFrame\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8bDataFrame<\/strong><\/h2>\n<p>data = {&#39;Name&#39;: [&#39;Alice&#39;, &#39;Bob&#39;, &#39;Charlie&#39;],<\/p>\n<p>        &#39;Age&#39;: [24, 27, 22]}<\/p>\n<p>df = pd.DataFrame(data)<\/p>\n<h2><strong>\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6<\/strong><\/h2>\n<p>df.to_csv(&#39;example.csv&#39;, index=False)<\/p>\n<p>print(&quot;DataFrame\u5df2\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4fdd\u5b58\u4e3aExcel\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u9664\u4e86CSV\uff0cpandas\u8fd8\u652f\u6301\u4fdd\u5b58\u4e3aExcel\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4fdd\u5b58\u4e3aExcel\u6587\u4ef6<\/p>\n<p>df.to_excel(&#39;example.xlsx&#39;, index=False)<\/p>\n<p>print(&quot;DataFrame\u5df2\u4fdd\u5b58\u4e3aExcel\u6587\u4ef6&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528JSON\u6a21\u5757<\/h3>\n<\/p>\n<p><h4>1\u3001\u4fdd\u5b58\u4e3aJSON\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>JSON\u662f\u4e00\u79cd\u5e38\u7528\u7684\u6570\u636e\u4ea4\u6362\u683c\u5f0f\uff0cPython\u7684\u5185\u7f6e\u6a21\u5757<code>json<\/code>\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = {&#39;name&#39;: &#39;Alice&#39;, &#39;age&#39;: 24, &#39;city&#39;: &#39;New York&#39;}<\/p>\n<h2><strong>\u4fdd\u5b58\u4e3aJSON\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;example.json&#39;, &#39;w&#39;) as file:<\/p>\n<p>    json.dump(data, file)<\/p>\n<p>print(&quot;\u6570\u636e\u5df2\u4fdd\u5b58\u4e3aJSON\u6587\u4ef6&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528pickle\u6a21\u5757<\/h3>\n<\/p>\n<p><h4>1\u3001\u4fdd\u5b58\u4e3a\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h4>\n<\/p>\n<p><p><code>pickle<\/code>\u6a21\u5757\u53ef\u4ee5\u5c06Python\u5bf9\u8c61\u5e8f\u5217\u5316\u4e3a\u4e8c\u8fdb\u5236\u683c\u5f0f\uff0c\u9002\u7528\u4e8e\u4fdd\u5b58\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pickle<\/p>\n<h2><strong>\u521b\u5efa\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = {&#39;name&#39;: &#39;Alice&#39;, &#39;age&#39;: 24, &#39;city&#39;: &#39;New York&#39;}<\/p>\n<h2><strong>\u4fdd\u5b58\u4e3a\u4e8c\u8fdb\u5236\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;example.pkl&#39;, &#39;wb&#39;) as file:<\/p>\n<p>    pickle.dump(data, file)<\/p>\n<p>print(&quot;\u6570\u636e\u5df2\u4fdd\u5b58\u4e3a\u4e8c\u8fdb\u5236\u6587\u4ef6&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u540c\u6837\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pickle<\/code>\u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n<p>with open(&#39;example.pkl&#39;, &#39;rb&#39;) as file:<\/p>\n<p>    loaded_data = pickle.load(file)<\/p>\n<p>print(&quot;\u6570\u636e\u5df2\u8bfb\u53d6\uff1a&quot;, loaded_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528\u8def\u5f84\u7ba1\u7406\u5e93<\/h3>\n<\/p>\n<p><p>\u5728Mac\u4e0a\uff0c\u6709\u65f6\u9700\u8981\u5904\u7406\u6587\u4ef6\u8def\u5f84\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u6216<code>pathlib<\/code>\u5e93\u6765\u7ba1\u7406\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528os\u6a21\u5757<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/strong><\/h2>\n<p>current_dir = os.getcwd()<\/p>\n<p>print(&quot;\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff1a&quot;, current_dir)<\/p>\n<h2><strong>\u6784\u5efa\u6587\u4ef6\u8def\u5f84<\/strong><\/h2>\n<p>file_path = os.path.join(current_dir, &#39;example.txt&#39;)<\/p>\n<h2><strong>\u5199\u5165\u6587\u4ef6<\/strong><\/h2>\n<p>with open(file_path, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&#39;Hello, World!&#39;)<\/p>\n<p>print(&quot;\u6587\u4ef6\u5df2\u4fdd\u5b58\u5230\uff1a&quot;, file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528pathlib\u5e93<\/h4>\n<\/p>\n<p><p><code>pathlib<\/code>\u5e93\u63d0\u4f9b\u4e86\u66f4\u76f4\u89c2\u7684\u8def\u5f84\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<h2><strong>\u83b7\u53d6\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/strong><\/h2>\n<p>current_dir = Path.cwd()<\/p>\n<p>print(&quot;\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff1a&quot;, current_dir)<\/p>\n<h2><strong>\u6784\u5efa\u6587\u4ef6\u8def\u5f84<\/strong><\/h2>\n<p>file_path = current_dir \/ &#39;example.txt&#39;<\/p>\n<h2><strong>\u5199\u5165\u6587\u4ef6<\/strong><\/h2>\n<p>file_path.write_text(&#39;Hello, World!&#39;)<\/p>\n<p>print(&quot;\u6587\u4ef6\u5df2\u4fdd\u5b58\u5230\uff1a&quot;, file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u6587\u4ef6\u64cd\u4f5c\u7684\u6700\u4f73\u5b9e\u8df5<\/h3>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<\/h4>\n<\/p>\n<p><p>\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\uff08\u5373<code>with<\/code>\u8bed\u53e5\uff09\u662f\u7ba1\u7406\u6587\u4ef6\u64cd\u4f5c\u7684\u6700\u4f73\u5b9e\u8df5\uff0c\u5b83\u786e\u4fdd\u6587\u4ef6\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u81ea\u52a8\u5173\u95ed\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&#39;Hello, World!&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u5904\u7406\u6587\u4ef6\u8def\u5f84<\/h4>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6587\u4ef6\u8def\u5f84\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u6216<code>pathlib<\/code>\u5e93\u6765\u6784\u5efa\u8def\u5f84\uff0c\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>file_path = Path.cwd() \/ &#39;example.txt&#39;<\/p>\n<p>file_path.write_text(&#39;Hello, World!&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u5904\u7406\u5f02\u5e38<\/h4>\n<\/p>\n<p><p>\u5728\u6587\u4ef6\u64cd\u4f5c\u4e2d\uff0c\u5904\u7406\u5f02\u5e38\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u4ee5\u9632\u6b62\u7a0b\u5e8f\u5d29\u6e83\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>        file.write(&#39;Hello, World!&#39;)<\/p>\n<p>except IOError as e:<\/p>\n<p>    print(&quot;\u6587\u4ef6\u64cd\u4f5c\u5931\u8d25\uff1a&quot;, e)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Mac\u4e0a\u4f7f\u7528Python\u4fdd\u5b58\u6587\u4ef6\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5177\u4f53\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u4f60\u7684\u9700\u6c42\u548c\u6570\u636e\u7c7b\u578b\u3002<strong>\u4f7f\u7528\u5185\u7f6e\u7684open\u51fd\u6570\u662f\u6700\u57fa\u7840\u7684\u65b9\u6cd5<\/strong>\uff0c\u5b83\u9002\u7528\u4e8e\u5927\u591a\u6570\u7b80\u5355\u7684\u6587\u4ef6\u64cd\u4f5c\u3002\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u6570\u636e\u5904\u7406\u548c\u4fdd\u5b58\uff0c\u7b2c\u4e09\u65b9\u5e93\u5982pandas\u3001json\u548cpickle\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u529f\u80fd\u3002\u65e0\u8bba\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\uff0c\u786e\u4fdd\u6587\u4ef6\u8def\u5f84\u6b63\u786e\u548c\u5904\u7406\u5f02\u5e38\u90fd\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Mac\u4e0a\u4f7f\u7528Python\u4fdd\u5b58\u6587\u4ef6\u7684\u57fa\u672c\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u8981\u5728Mac\u4e0a\u4f7f\u7528Python\u4fdd\u5b58\u6587\u4ef6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684\u6587\u4ef6\u64cd\u4f5c\u529f\u80fd\u3002\u9996\u5148\uff0c\u6253\u5f00\u7ec8\u7aef\u6216\u60a8\u559c\u6b22\u7684IDE\uff08\u5982PyCharm\u6216VSCode\uff09\u3002\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u521b\u5efa\u6216\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\uff0c\u7136\u540e\u4f7f\u7528<code>write()<\/code>\u65b9\u6cd5\u5c06\u5185\u5bb9\u5199\u5165\u6587\u4ef6\u3002\u6700\u540e\uff0c\u8c03\u7528<code>close()<\/code>\u65b9\u6cd5\u4ee5\u786e\u4fdd\u6587\u4ef6\u6b63\u786e\u4fdd\u5b58\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;w&#39;) as f:  \n    f.write(&#39;Hello, world!&#39;)  \n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>example.txt<\/code>\u7684\u6587\u4ef6\uff0c\u5e76\u5199\u5165\u201cHello, world!\u201d\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u6307\u5b9a\u4fdd\u5b58\u6587\u4ef6\u7684\u8def\u5f84\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728<code>open()<\/code>\u51fd\u6570\u4e2d\u63d0\u4f9b\u5b8c\u6574\u8def\u5f84\u6765\u6307\u5b9a\u6587\u4ef6\u4fdd\u5b58\u7684\u4f4d\u7f6e\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">with open(&#39;\/Users\/username\/Documents\/example.txt&#39;, &#39;w&#39;) as f:  \n    f.write(&#39;Hello, world!&#39;)  \n<\/code><\/pre>\n<p>\u786e\u4fdd\u66ff\u6362<code>username<\/code>\u4e3a\u60a8\u7684Mac\u7528\u6237\u540d\u3002\u8fd9\u6837\uff0c\u6587\u4ef6\u5c06\u4fdd\u5b58\u5230Documents\u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u5728\u4fdd\u5b58\u6587\u4ef6\u65f6\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u4fdd\u5b58\u6587\u4ef6\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u6743\u9650\u4e0d\u8db3\u6216\u8def\u5f84\u9519\u8bef\u7b49\u95ee\u9898\u3002\u4e3a\u907f\u514d\u7a0b\u5e8f\u5d29\u6e83\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u5f02\u5e38\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">try:  \n    with open(&#39;example.txt&#39;, &#39;w&#39;) as f:  \n        f.write(&#39;Hello, world!&#39;)  \nexcept IOError as e:  \n    print(f&quot;An error occurred: {e}&quot;)  \n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u60a8\u8bc6\u522b\u5e76\u5904\u7406\u9519\u8bef\uff0c\u786e\u4fdd\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Mac\u4e0a\u4f7f\u7528Python\u4fdd\u5b58\u6587\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\uff1a\u4f7f\u7528\u5185\u7f6e\u7684open\u51fd\u6570\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5982pandas\u3001\u4f7f [&hellip;]","protected":false},"author":3,"featured_media":1167559,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1167554"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1167554"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1167554\/revisions"}],"predecessor-version":[{"id":1167560,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1167554\/revisions\/1167560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1167559"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1167554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1167554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1167554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}