Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- swift
- Unity
- sqlite
- flutter
- 유니티
- PyQt
- MySQL
- ASP
- PER
- 다이어트
- javascript
- ubuntu
- node.js
- PyQt5
- 라즈베리파이
- Excel
- 함수
- mssql
- port
- GIT
- pandas
- 맛집
- IOS
- urllib
- MS-SQL
- python
- 날짜
- tensorflow
- 리눅스
- Linux
Archives
아미(아름다운미소)
Yml 본문
import yaml
# YAML 파일 로드
with open('config.yml') as f:
config = yaml.safe_load(f)
# 값 접근
print(config['app']['name']) # "My Awesome App"
print(config['database']['production']['credentials']['username']) # "admin"
# 리스트 항목 접근
for feature in config['app']['features']:
print(feature)
app:
name: "My Awesome App"
version: 2.3.1
features:
- "authentication"
- "data_export"
- "notifications"
settings:
cache_enabled: true
max_retries: 3
allowed_file_types: [".jpg", ".png", ".pdf"]
Comments