{"id":964640,"date":"2024-12-27T04:30:15","date_gmt":"2024-12-26T20:30:15","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/964640.html"},"modified":"2024-12-27T04:30:17","modified_gmt":"2024-12-26T20:30:17","slug":"python%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e6%96%87%e4%bb%b6%e4%bf%9d%e6%8a%a4","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/964640.html","title":{"rendered":"Python\u5982\u4f55\u5b9e\u73b0\u6587\u4ef6\u4fdd\u62a4"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24181327\/cfdb3828-620c-428b-a795-f369768a1990.webp\" alt=\"Python\u5982\u4f55\u5b9e\u73b0\u6587\u4ef6\u4fdd\u62a4\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c\u5b9e\u73b0\u6587\u4ef6\u4fdd\u62a4\u53ef\u4ee5\u901a\u8fc7<strong>\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650\u3001\u52a0\u5bc6\u6587\u4ef6\u5185\u5bb9\u3001\u4f7f\u7528\u5bc6\u7801\u4fdd\u62a4\u3001\u5907\u4efd\u6587\u4ef6<\/strong>\u7b49\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002\u5176\u4e2d\uff0c<strong>\u52a0\u5bc6\u6587\u4ef6\u5185\u5bb9<\/strong>\u662f\u4e00\u79cd\u5e38\u89c1\u4e14\u6709\u6548\u7684\u6587\u4ef6\u4fdd\u62a4\u624b\u6bb5\u3002\u901a\u8fc7\u4f7f\u7528\u52a0\u5bc6\u6280\u672f\uff0c\u53ef\u4ee5\u786e\u4fdd\u5373\u4f7f\u6587\u4ef6\u88ab\u672a\u7ecf\u6388\u6743\u7684\u4eba\u5458\u8bbf\u95ee\uff0c\u4e5f\u65e0\u6cd5\u8bfb\u53d6\u5176\u5185\u5bb9\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u4e00\u4e9b\u5b9e\u73b0\u7684\u793a\u4f8b\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650<\/p>\n<\/p>\n<p><p>\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u6bcf\u4e2a\u6587\u4ef6\u90fd\u6709\u76f8\u5e94\u7684\u6743\u9650\u8bbe\u7f6e\uff0c\u8fd9\u4e9b\u6743\u9650\u51b3\u5b9a\u4e86\u54ea\u4e9b\u7528\u6237\u53ef\u4ee5\u8bfb\u53d6\u3001\u5199\u5165\u6216\u6267\u884c\u6587\u4ef6\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u6765\u4fee\u6539\u6587\u4ef6\u7684\u6743\u9650\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528os.chmod\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650<\/strong><\/li>\n<\/ol>\n<p><p><code>os.chmod()<\/code>\u51fd\u6570\u53ef\u4ee5\u7528\u6765\u4fee\u6539\u6587\u4ef6\u7684\u6743\u9650\u3002\u6743\u9650\u901a\u5e38\u4ee5\u516b\u8fdb\u5236\u6570\u8868\u793a\uff0c\u5982<code>0o755<\/code>\u8868\u793a\u6240\u6709\u8005\u53ef\u8bfb\u3001\u53ef\u5199\u3001\u53ef\u6267\u884c\uff0c\u7ec4\u7528\u6237\u548c\u5176\u4ed6\u7528\u6237\u53ef\u8bfb\u3001\u53ef\u6267\u884c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u8bbe\u7f6e\u6587\u4ef6\u8def\u5f84<\/strong><\/h2>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<h2><strong>\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650\u4e3a755<\/strong><\/h2>\n<p>os.chmod(file_path, 0o755)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528os.umask\u8bbe\u7f6e\u9ed8\u8ba4\u6743\u9650<\/strong><\/li>\n<\/ol>\n<p><p><code>os.umask()<\/code>\u51fd\u6570\u7528\u4e8e\u8bbe\u7f6e\u5f53\u524d\u8fdb\u7a0b\u7684\u6587\u4ef6\u521b\u5efa\u6743\u9650\u5c4f\u853d\u5b57\u3002\u901a\u8fc7umask\uff0c\u53ef\u4ee5\u63a7\u5236\u65b0\u6587\u4ef6\u7684\u9ed8\u8ba4\u6743\u9650\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<h2><strong>\u8bbe\u7f6e\u9ed8\u8ba4\u6743\u9650\u5c4f\u853d\u5b57<\/strong><\/h2>\n<p>os.umask(0o077)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u52a0\u5bc6\u6587\u4ef6\u5185\u5bb9<\/p>\n<\/p>\n<p><p>\u52a0\u5bc6\u662f\u4fdd\u62a4\u6587\u4ef6\u5185\u5bb9\u7684\u91cd\u8981\u65b9\u6cd5\u3002\u901a\u8fc7\u52a0\u5bc6\uff0c\u6587\u4ef6\u5185\u5bb9\u88ab\u8f6c\u6362\u4e3a\u4e0d\u53ef\u8bfb\u7684\u5f62\u5f0f\uff0c\u53ea\u6709\u6301\u6709\u6b63\u786e\u5bc6\u94a5\u7684\u4eba\u624d\u80fd\u89e3\u5bc6\u8bfb\u53d6\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5bf9\u79f0\u52a0\u5bc6<\/strong><\/li>\n<\/ol>\n<p><p>\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u4f7f\u7528\u76f8\u540c\u7684\u5bc6\u94a5\u8fdb\u884c\u52a0\u5bc6\u548c\u89e3\u5bc6\u3002\u5e38\u7528\u7684\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u5305\u62ecAES\u3001DES\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from Crypto.Cipher import AES<\/p>\n<p>import os<\/p>\n<p>def encrypt_file(file_name, key):<\/p>\n<p>    with open(file_name, &#39;rb&#39;) as file:<\/p>\n<p>        pl<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ntext = file.read()<\/p>\n<p>    # \u4f7f\u7528AES\u5bf9\u79f0\u52a0\u5bc6<\/p>\n<p>    cipher = AES.new(key, AES.MODE_EAX)<\/p>\n<p>    ciphertext, tag = cipher.encrypt_and_digest(plaintext)<\/p>\n<p>    with open(file_name + &#39;.enc&#39;, &#39;wb&#39;) as file_enc:<\/p>\n<p>        [file_enc.write(x) for x in (cipher.nonce, tag, ciphertext)]<\/p>\n<p>def decrypt_file(file_name_enc, key):<\/p>\n<p>    with open(file_name_enc, &#39;rb&#39;) as file_enc:<\/p>\n<p>        nonce, tag, ciphertext = [file_enc.read(x) for x in (16, 16, -1)]<\/p>\n<p>    cipher = AES.new(key, AES.MODE_EAX, nonce=nonce)<\/p>\n<p>    plaintext = cipher.decrypt_and_verify(ciphertext, tag)<\/p>\n<p>    with open(file_name_enc[:-4], &#39;wb&#39;) as file_dec:<\/p>\n<p>        file_dec.write(plaintext)<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>key = os.urandom(16)  # \u751f\u6210\u968f\u673a\u5bc6\u94a5<\/p>\n<p>encrypt_file(&#39;example.txt&#39;, key)<\/p>\n<p>decrypt_file(&#39;example.txt.enc&#39;, key)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u975e\u5bf9\u79f0\u52a0\u5bc6<\/strong><\/li>\n<\/ol>\n<p><p>\u975e\u5bf9\u79f0\u52a0\u5bc6\u4f7f\u7528\u4e00\u5bf9\u5bc6\u94a5\uff1a\u516c\u94a5\u548c\u79c1\u94a5\u3002\u516c\u94a5\u7528\u4e8e\u52a0\u5bc6\uff0c\u79c1\u94a5\u7528\u4e8e\u89e3\u5bc6\u3002\u5e38\u7528\u7684\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u5305\u62ecRSA\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from Crypto.PublicKey import RSA<\/p>\n<p>from Crypto.Cipher import PKCS1_OAEP<\/p>\n<p>def generate_keys():<\/p>\n<p>    key = RSA.generate(2048)<\/p>\n<p>    private_key = key.export_key()<\/p>\n<p>    public_key = key.publickey().export_key()<\/p>\n<p>    return private_key, public_key<\/p>\n<p>def encrypt_file_with_public_key(file_name, public_key):<\/p>\n<p>    with open(file_name, &#39;rb&#39;) as file:<\/p>\n<p>        plaintext = file.read()<\/p>\n<p>    recipient_key = RSA.import_key(public_key)<\/p>\n<p>    cipher_rsa = PKCS1_OAEP.new(recipient_key)<\/p>\n<p>    ciphertext = cipher_rsa.encrypt(plaintext)<\/p>\n<p>    with open(file_name + &#39;.enc&#39;, &#39;wb&#39;) as file_enc:<\/p>\n<p>        file_enc.write(ciphertext)<\/p>\n<p>def decrypt_file_with_private_key(file_name_enc, private_key):<\/p>\n<p>    with open(file_name_enc, &#39;rb&#39;) as file_enc:<\/p>\n<p>        ciphertext = file_enc.read()<\/p>\n<p>    key = RSA.import_key(private_key)<\/p>\n<p>    cipher_rsa = PKCS1_OAEP.new(key)<\/p>\n<p>    plaintext = cipher_rsa.decrypt(ciphertext)<\/p>\n<p>    with open(file_name_enc[:-4], &#39;wb&#39;) as file_dec:<\/p>\n<p>        file_dec.write(plaintext)<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>private_key, public_key = generate_keys()<\/p>\n<p>encrypt_file_with_public_key(&#39;example.txt&#39;, public_key)<\/p>\n<p>decrypt_file_with_private_key(&#39;example.txt.enc&#39;, private_key)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528\u5bc6\u7801\u4fdd\u62a4<\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u8981\u6c42\u7528\u6237\u8f93\u5165\u5bc6\u7801\u6765\u8bbf\u95ee\u6587\u4ef6\uff0c\u4ece\u800c\u589e\u52a0\u4e00\u5c42\u5b89\u5168\u4fdd\u62a4\u3002\u5bc6\u7801\u53ef\u4ee5\u7528\u4e8e\u52a0\u5bc6\u5bc6\u94a5\u6216\u76f4\u63a5\u7528\u4e8e\u6587\u4ef6\u52a0\u5bc6\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u57fa\u4e8e\u5bc6\u7801\u7684\u6587\u4ef6\u52a0\u5bc6<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u4f7f\u7528Python\u7684<code>cryptography<\/code>\u5e93\u4e2d\u7684<code>Fernet<\/code>\u65b9\u6cd5\u6765\u5b9e\u73b0\u57fa\u4e8e\u5bc6\u7801\u7684\u52a0\u5bc6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from cryptography.fernet import Fernet<\/p>\n<p>import base64<\/p>\n<p>import os<\/p>\n<p>from cryptography.hazmat.primitives import hashes<\/p>\n<p>from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC<\/p>\n<p>def generate_key_from_password(password, salt):<\/p>\n<p>    kdf = PBKDF2HMAC(<\/p>\n<p>        algorithm=hashes.SHA256(),<\/p>\n<p>        length=32,<\/p>\n<p>        salt=salt,<\/p>\n<p>        iterations=100000,<\/p>\n<p>    )<\/p>\n<p>    return base64.url<a href=\"https:\/\/docs.pingcode.com\/agile\/agile-at-scale\/what-is-safe\" target=\"_blank\">SAFe<\/a>_b64encode(kdf.derive(password.encode()))<\/p>\n<p>def encrypt_file_with_password(file_name, password):<\/p>\n<p>    salt = os.urandom(16)<\/p>\n<p>    key = generate_key_from_password(password, salt)<\/p>\n<p>    fernet = Fernet(key)<\/p>\n<p>    with open(file_name, &#39;rb&#39;) as file:<\/p>\n<p>        plaintext = file.read()<\/p>\n<p>    ciphertext = fernet.encrypt(plaintext)<\/p>\n<p>    with open(file_name + &#39;.enc&#39;, &#39;wb&#39;) as file_enc:<\/p>\n<p>        file_enc.write(salt + ciphertext)<\/p>\n<p>def decrypt_file_with_password(file_name_enc, password):<\/p>\n<p>    with open(file_name_enc, &#39;rb&#39;) as file_enc:<\/p>\n<p>        salt = file_enc.read(16)<\/p>\n<p>        ciphertext = file_enc.read()<\/p>\n<p>    key = generate_key_from_password(password, salt)<\/p>\n<p>    fernet = Fernet(key)<\/p>\n<p>    plaintext = fernet.decrypt(ciphertext)<\/p>\n<p>    with open(file_name_enc[:-4], &#39;wb&#39;) as file_dec:<\/p>\n<p>        file_dec.write(plaintext)<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>password = &#39;my_secure_password&#39;<\/p>\n<p>encrypt_file_with_password(&#39;example.txt&#39;, password)<\/p>\n<p>decrypt_file_with_password(&#39;example.txt.enc&#39;, password)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u5907\u4efd\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u5b9a\u671f\u5907\u4efd\u6587\u4ef6\u662f\u4fdd\u62a4\u6587\u4ef6\u7684\u91cd\u8981\u624b\u6bb5\u4e4b\u4e00\u3002\u5907\u4efd\u53ef\u4ee5\u9632\u6b62\u56e0\u610f\u5916\u5220\u9664\u3001\u786c\u4ef6\u6545\u969c\u7b49\u5bfc\u81f4\u7684\u6570\u636e\u4e22\u5931\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u624b\u52a8\u5907\u4efd<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u5b9a\u671f\u624b\u52a8\u5c06\u91cd\u8981\u6587\u4ef6\u590d\u5236\u5230\u5b89\u5168\u7684\u4f4d\u7f6e\uff0c\u5982\u5916\u90e8\u786c\u76d8\u3001\u4e91\u5b58\u50a8\u7b49\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u81ea\u52a8\u5907\u4efd<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u4f7f\u7528Python\u811a\u672c\u5b9e\u73b0\u6587\u4ef6\u7684\u81ea\u52a8\u5907\u4efd\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import shutil<\/p>\n<p>import os<\/p>\n<p>import time<\/p>\n<p>def backup_file(src_file, dest_dir):<\/p>\n<p>    if not os.path.exists(dest_dir):<\/p>\n<p>        os.makedirs(dest_dir)<\/p>\n<p>    file_name = os.path.basename(src_file)<\/p>\n<p>    backup_name = f&quot;{file_name}_{int(time.time())}.bak&quot;<\/p>\n<p>    shutil.copy(src_file, os.path.join(dest_dir, backup_name))<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>backup_file(&#39;example.txt&#39;, &#39;backup_directory&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u5b9e\u73b0\u6587\u4ef6\u4fdd\u62a4\uff0c\u786e\u4fdd\u6587\u4ef6\u7684\u5b89\u5168\u6027\u548c\u5b8c\u6574\u6027\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u6216\u8005\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u4ee5\u63d0\u9ad8\u6587\u4ef6\u7684\u5b89\u5168\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u52a0\u5bc6\u6587\u4ef6\u4ee5\u4fdd\u62a4\u5185\u5bb9\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5e93\u5982 <code>cryptography<\/code> \u6765\u52a0\u5bc6\u6587\u4ef6\u3002\u9996\u5148\uff0c\u5b89\u88c5\u8be5\u5e93\u5e76\u5bfc\u5165\u6240\u9700\u6a21\u5757\u3002\u7136\u540e\uff0c\u4f7f\u7528\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff08\u5982AES\uff09\u751f\u6210\u5bc6\u94a5\uff0c\u5e76\u5229\u7528\u8be5\u5bc6\u94a5\u5bf9\u6587\u4ef6\u5185\u5bb9\u8fdb\u884c\u52a0\u5bc6\u3002\u52a0\u5bc6\u540e\u7684\u6587\u4ef6\u53ef\u4ee5\u5b89\u5168\u5b58\u50a8\uff0c\u800c\u53ea\u6709\u6301\u6709\u5bc6\u94a5\u7684\u4eba\u624d\u80fd\u89e3\u5bc6\u8bbf\u95ee\u3002<\/p>\n<p><strong>\u6709\u54ea\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u9650\u5236Python\u6587\u4ef6\u7684\u8bbf\u95ee\u6743\u9650\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u7684\u6587\u4ef6\u6743\u9650\u8bbe\u7f6e\u6765\u9650\u5236\u6587\u4ef6\u7684\u8bbf\u95ee\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>os<\/code> \u6a21\u5757\u6765\u4fee\u6539\u6587\u4ef6\u6743\u9650\uff0c\u4f8b\u5982\u4f7f\u7528 <code>os.chmod()<\/code> \u51fd\u6570\u3002\u901a\u8fc7\u8bbe\u7f6e\u6587\u4ef6\u4e3a\u53ea\u8bfb\u6216\u9650\u5236\u7279\u5b9a\u7528\u6237\u7684\u8bbf\u95ee\uff0c\u53ef\u4ee5\u6709\u6548\u4fdd\u62a4\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u68c0\u6d4b\u6587\u4ef6\u662f\u5426\u88ab\u7be1\u6539\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u751f\u6210\u6587\u4ef6\u7684\u54c8\u5e0c\u503c\u6765\u68c0\u6d4b\u6587\u4ef6\u7684\u5b8c\u6574\u6027\u3002Python\u4e2d\u7684 <code>hashlib<\/code> \u6a21\u5757\u53ef\u4ee5\u8ba1\u7b97\u6587\u4ef6\u7684MD5\u6216SHA-256\u54c8\u5e0c\u503c\u3002\u4fdd\u5b58\u521d\u59cb\u54c8\u5e0c\u503c\u540e\uff0c\u4efb\u4f55\u65f6\u5019\u901a\u8fc7\u91cd\u65b0\u8ba1\u7b97\u54c8\u5e0c\u503c\u4e0e\u539f\u59cb\u503c\u5bf9\u6bd4\uff0c\u4fbf\u80fd\u5224\u65ad\u6587\u4ef6\u662f\u5426\u88ab\u7be1\u6539\u3002\u8fd9\u6837\u53ef\u4ee5\u6709\u6548\u4fdd\u62a4\u6587\u4ef6\u5185\u5bb9\u7684\u5b89\u5168\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u5b9e\u73b0\u6587\u4ef6\u4fdd\u62a4\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650\u3001\u52a0\u5bc6\u6587\u4ef6\u5185\u5bb9\u3001\u4f7f\u7528\u5bc6\u7801\u4fdd\u62a4\u3001\u5907\u4efd\u6587\u4ef6\u7b49\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002\u5176\u4e2d\uff0c\u52a0 [&hellip;]","protected":false},"author":3,"featured_media":964645,"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\/964640"}],"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=964640"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/964640\/revisions"}],"predecessor-version":[{"id":964646,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/964640\/revisions\/964646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/964645"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=964640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=964640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=964640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}