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