Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 4.85 KB

pyyaml.md

File metadata and controls

72 lines (49 loc) · 4.85 KB

PyYAML

  • yaml/pyyaml: Canonical source repository for PyYAML PyYAML - The next generation YAML parser and emitter for Python. 同時做為 YAML 的 parser 與 emitter (寫出 YAML)
  • PyYAML - Wiki
    • A complete YAML 1.1 parser. In particular, PyYAML can parse all examples from the specification. 對 YAML 1.2 的支援?
    • Unicode support including UTF-8/UTF-16 input/output and * <-- 最後的星號指的是?
    • Low-level EVENT-BASED parser and emitter API (like SAX).
    • High-level API for serializing and deserializing native Python objects (like DOM or pickle).
    • Support for all types from the YAML types repository. A simple extension API is provided. 若 YAML 支援這麼多 type,那麼 PyYAML 支援 object serialization 也不奇怪了。
    • Both pure-Python and fast LibYAML-based parsers and emitters.
  • Welcome to PyYAML PyYAML is a full-featured YAML FRAMEWORK for the Python programming language. 支援 high-/low-level API、pure-Python/LibYAML-based impl、object serialization、可擴充 YAML type 等,就能理解 framework 的說法。

應用實例 {: #powered-by }

YAML 1.2, ruamel.yaml ?? {: #inactive }

新手上路 ?? {: #getting-started }

讀取 YAML ?? {: #parsing }

參考資料:

Object Serialization ??

  • PyYAML - Wiki 提到 high-level API for serializing and deserializing native Python objects (like DOM or pickle).

LibYAML ??

  • Welcome to PyYAML LibYAML is a YAML parser and emitter written in C 為什麼會特別提及 LibYAML,跟 PyYAML 在同個組織下?
  • PyYAML - Wiki Both pure-Python and fast LibYAML-based parsers and emitters.
  • yaml/pyyaml: Canonical source repository for PyYAML #ril
    • By default, the setup.py script checks whether LibYAML is installed and if so, builds and installs LibYAML bindings. To skip the check and force installation of LibYAML bindings, use the option --with-libyaml: python setup.py --with-libyaml install.
    • To disable the check and skip building and installing LibYAML bindings, use --without-libyaml: python setup.py --without-libyaml install. setup.py 會檢查系統是不是有 LibYAML,如果有的話就安裝 LibYAML binding,若不想安裝 LibYAML binding 則可以加上 --without-libyaml

安裝設置 {: #setup }

參考資料 {: #reference }

社群:

文件:

相關: