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 |
Tags
- 다이어트
- IOS
- MySQL
- ASP
- Excel
- 유니티
- mssql
- PER
- MS-SQL
- node.js
- port
- Unity
- tensorflow
- pandas
- 라즈베리파이
- 함수
- GIT
- sqlite
- javascript
- Linux
- PyQt
- 맛집
- python
- 리눅스
- ubuntu
- 날짜
- PyQt5
- urllib
- swift
- flutter
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