Today I Learned
CtrlK
  • Introduction
  • Problem Solving
    • leetcode
      • 1. Two Sum
        • CPP
        • Java
        • JavaScript
        • Kotlin
        • Python
    • contest
      • google code jam
  • developer
    • ansible
    • python
      • line_by_line
      • config
        • yaml
        • configparser
  • linux
    • cut
  • Programming Languages
    • javascript
      • array
      • base64
      • canvas
      • date
        • moment.js
      • jquery
      • json
      • jsplumb
      • konva
      • nodejs
      • react
      • string
    • kotlin
      • 2 코틀린 기초.md
  • spring framework
    • spring boot
  • game
    • ingress
    • Rockman
      • Rockman X 1
      • Rockman X 2
      • Rockman X 3
  • database
    • mysql
  • me
    • resume
      • experience
      • extracurricular_activities
Powered by GitBook
On this page
  • installation
  • sample
  • 정리
  • References

Was this helpful?

  1. developer
  2. python
  3. config

yaml

installation

pip install pyyaml

sample

member.yaml

developer:
  - june
  - hello
  - world
import yaml

with open('members.yaml') as file:
    members = yaml.load(file, Loader=yaml.FullLoader)
    print(members)
{'developer': ['june', 'hello', 'world']}

정리

  • python - pyyaml 기본 사용법 2019.11.11

References

  • PyYAML

  • %YAML 1.2

  • Reading and Writing YAML to a File in Python

PreviousconfigNextconfigparser

Last updated 5 years ago

Was this helpful?