Cloud Deployment Manager akan mencapai akhir dukungan pada 31 Desember 2025. Jika saat ini Anda menggunakan Deployment Manager, migrasikan ke Infrastructure Manager atau teknologi deployment alternatif paling lambat 31 Desember 2025 untuk memastikan layanan Anda berlanjut tanpa gangguan.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda dapat menggunakan library Python dalam template Python. Deployment Manager mengupload dan menjalankan kode Python dalam template Anda di lingkungan yang aman.
Anda dapat menggunakan library yang didukung oleh Deployment Manager, yang tercantum di bawah. Untuk
menggunakan library Python yang berbeda, impor sumber library lengkap di template Anda.
Library yang didukung
Deployment Manager mendukung library Python tertentu yang dapat Anda gunakan dalam
template. Library ini mencakup:
Jika Anda ingin mengimpor library yang tidak didukung secara eksplisit, impor
library menggunakan nama file. Hal ini sangat berguna jika Anda ingin
mengimpor metode helper Anda sendiri. Pembatasan yang sama untuk panggilan sistem juga berlaku untuk
library kustom.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 UTC."],[[["\u003cp\u003ePython libraries can be used within Python templates in Deployment Manager, which runs the code in a secure environment.\u003c/p\u003e\n"],["\u003cp\u003eDeployment Manager supports specific Python libraries, such as \u003ccode\u003ebase64\u003c/code\u003e, \u003ccode\u003ecollections\u003c/code\u003e, \u003ccode\u003ejson\u003c/code\u003e, \u003ccode\u003emath\u003c/code\u003e, \u003ccode\u003eyaml\u003c/code\u003e, and others.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize unsupported libraries, you can import the full library source file directly into your template.\u003c/p\u003e\n"],["\u003cp\u003eSystem or network calls are strictly prohibited in templates, including any system call functionality within the supported libraries, and will result in rejection.\u003c/p\u003e\n"],["\u003cp\u003eCustom libraries are allowed but must also follow the restrictions preventing system or network calls.\u003c/p\u003e\n"]]],[],null,["# Importing Python Libraries\n\nYou can use Python libraries in your Python templates. Deployment Manager\nuploads and runs the Python code in your templates in a secure environment.\n\nYou can use libraries that are supported by Deployment Manager, listed below. To\nuse a different Python library, import the full library source in your template.\n\nSupported libraries\n-------------------\n\nDeployment Manager supports specific Python libraries that you can use in your\ntemplates. These libraries include:\n\n- [`base64`](https://docs.python.org/3/library/base64.html)\n- [`collections`](https://docs.python.org/3/library/collections.html)\n- [`encodings`](https://docs.python.org/3/library/codecs.html)\n- [`encodings.utf_8`](https://docs.python.org/3/library/codecs.html)\n- [`encodings.utf_16`](https://docs.python.org/3/library/codecs.html)\n- [`hashlib`](https://docs.python.org/3/library/hashlib.html)\n- [`json`](https://docs.python.org/3/library/json.html)\n- [`math`](https://docs.python.org/3/library/math.html)\n- [`random`](https://docs.python.org/3/library/random.html)\n- [`io`](https://docs.python.org/3/library/io.html)\n- [`sys`](https://docs.python.org/3/library/sys.html)\n- [`string`](https://docs.python.org/3/library/string.html)\n- [`time`](https://docs.python.org/3/library/time.html)\n- [`yaml`](https://github.com/yaml/pyyaml)\n- [`zipfile`](https://docs.python.org/3/library/zipfile.html)\n\n| **Caution:** Do not use system calls in your template. If a template contains any code that makes system or network calls, it is rejected. This includes any method that performs system calls using the supported libraries listed above. For example, `sys` contains a number of system calls that will automatically be rejected if you use them in your template.\n\nIf you want to import libraries that are not explicitly supported, import\nthe library using the filename. This is especially useful if you want to\nimport your own helper methods. The same restrictions for system calls apply to\ncustom libraries as well."]]