<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4234107158556246636</id><updated>2025-12-09T07:51:08.498-08:00</updated><category term="Python"/><category term="GraphQL"/><category term="Strawberry"/><category term="arch"/><category term="Stock"/><category term="ffmpeg"/><category term="linux"/><category term="주식"/><category term="Bijection"/><category term="USD"/><category term="chatGPT"/><category term="fastpi"/><category term="finviz"/><category term="mysql"/><category term="paramiko"/><category term="sftp"/><category term="shorturl"/><category term="sqlmodel"/><category term="youtube"/><category term="구글"/><category term="리눅스"/><category term="미국주식"/><category term="크롬"/><title type='text'>EDITORS</title><subtitle type='html'>This is Diss!!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-9112647487568751673</id><published>2023-07-23T22:30:00.007-07:00</published><updated>2023-07-24T02:46:43.646-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="arch"/><category scheme="http://www.blogger.com/atom/ns#" term="구글"/><category scheme="http://www.blogger.com/atom/ns#" term="리눅스"/><category scheme="http://www.blogger.com/atom/ns#" term="크롬"/><title type='text'>Arch 계열 리눅스 구글 크롬 설치</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcxomsOpg9sTfWHPx3ZoLhuPv82LdtcB1avMKKwOOCyomTg7HphAXxa-rGmTpPXeycCV2DBWkz1PY0-telgu1V0h8y7pQg8PAqPOrPoED5G1GUcWorjdBHjyErUpRktmD6YxrEN5oORXrsnghE1QPO97Xy-rq6Hocy9D549h7Ji-QmQHAAwQ3fHnW2bw/s383/arch.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;321&quot; data-original-width=&quot;383&quot; height=&quot;335&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcxomsOpg9sTfWHPx3ZoLhuPv82LdtcB1avMKKwOOCyomTg7HphAXxa-rGmTpPXeycCV2DBWkz1PY0-telgu1V0h8y7pQg8PAqPOrPoED5G1GUcWorjdBHjyErUpRktmD6YxrEN5oORXrsnghE1QPO97Xy-rq6Hocy9D549h7Ji-QmQHAAwQ3fHnW2bw/w400-h335/arch.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;



&lt;h1 id=&quot;&quot;&gt;개요&lt;/h1&gt;
&lt;p&gt;리눅스 계열 데스크탑 OS 는 기본적으로 파이어폭스가 기본 브라우져로 설치 되어있다. 아무래도 이제 크롬이 익숙하다보니 크롬을 찾는 경우도 많고 리눅스와 파이썬 좀 한다 싶음 자동화 때문에라도 크롬을 찾기 마련이라 크롬을 설치해본다.&lt;/p&gt;
&lt;h2 id=&quot;aurhelper&quot;&gt;패키지 수동 설치 (AUR Helper 사용 안함)&lt;/h2&gt;
&lt;h3 id=&quot;basedevel&quot;&gt;base-devel 패키지 설치&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;$ sudo pacman -S --needed base-devel git
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;aurgitchrome&quot;&gt;AUR 레포지토리(git 사용)에서 Chrome 설치&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;$ git clone https://aur.archlinux.org/google-chrome.git
$ cd google-chrome
$ makepkg -si
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;-1&quot;&gt;버전 업그레이드&lt;/h3&gt;
&lt;p&gt;AUR에서 버전 릴리즈가 이루어지면  수동으로 업그레이드 할 수 있다. &lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;$ git pull
$ makepkg -si
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h2 id=&quot;aurhelper-1&quot;&gt;AUR Helper 사용 설치&lt;/h2&gt;
&lt;h3 id=&quot;aurhelper-2&quot;&gt;AUR Helper 를 수동 패키지 처리&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;$ sudo pacman -S --needed base-devel git
$ git clone https://aur.archlinux.org/yay-git.git
$ cd yay
$ makepkg -si
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;-2&quot;&gt;크롬 설치&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;$ yay -S google-chrome
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;-3&quot;&gt;버전 업그레이드&lt;/h3&gt;
&lt;p&gt;주의 pacman과 달리 yay는 &quot;sudo&quot;권한으로 실행하면 안된다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;$ yay -Syu
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/9112647487568751673/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/07/arch.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/9112647487568751673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/9112647487568751673'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/07/arch.html' title='Arch 계열 리눅스 구글 크롬 설치'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcxomsOpg9sTfWHPx3ZoLhuPv82LdtcB1avMKKwOOCyomTg7HphAXxa-rGmTpPXeycCV2DBWkz1PY0-telgu1V0h8y7pQg8PAqPOrPoED5G1GUcWorjdBHjyErUpRktmD6YxrEN5oORXrsnghE1QPO97Xy-rq6Hocy9D549h7Ji-QmQHAAwQ3fHnW2bw/s72-w400-h335-c/arch.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-4504573720293005073</id><published>2023-07-20T10:33:00.004-07:00</published><updated>2023-07-20T10:53:06.654-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Stock"/><category scheme="http://www.blogger.com/atom/ns#" term="미국주식"/><category scheme="http://www.blogger.com/atom/ns#" term="주식"/><title type='text'>Johnson &amp; Johnson (JNJ )의 2Q 매출/이익 예상치 상회 </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfIRNbB2ZYn2-Guxs4BiG3sPmVOybOfbPPPmnmWP_jcbDDlgCsKWtmZ7rjRm239tBx54pbJlt1a-ZsrT7lymRQGgXZkvlWyWuMB59I0wBO45Iz_pyQrrhPoJdK06R6nKJq_92tbv33AGeUObMJDIRCRxFhyq0iFjE8fHoZXCEVeJWCvzIyAcb42_WcmutM/s4977/00000000000000232606.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;3318&quot; data-original-width=&quot;4977&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfIRNbB2ZYn2-Guxs4BiG3sPmVOybOfbPPPmnmWP_jcbDDlgCsKWtmZ7rjRm239tBx54pbJlt1a-ZsrT7lymRQGgXZkvlWyWuMB59I0wBO45Iz_pyQrrhPoJdK06R6nKJq_92tbv33AGeUObMJDIRCRxFhyq0iFjE8fHoZXCEVeJWCvzIyAcb42_WcmutM/s400/00000000000000232606.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;Johnson &amp;amp; Johnson의 2분기 매출/이익이 예상치를 상회했다.
COVID-19로 인해 노화방지와 메디테크(Medtech Product)에 대한 수요 증가로 인해 주목을 받아왔다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h1 id=&quot;&quot;&gt;연간 수익 및 매출 전망치 상향 조정&lt;/h1&gt;
&lt;p&gt;Johnson &amp;amp; Johnson( JNJ )의 주가는 제약/의료 제품 회사가 예상보다 나은 결과를 제시하고 의료 기술 제품에 대한 높은 수요에 대한 지침을 높이면서 상승 반전 했다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;2023년 2분기 주당순이익(EPS)이 2.80달러, 매출이 6.3% 증가한 255억3000만달러를 보고, 모두 예상을 초과 달성&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1 id=&quot;-1&quot;&gt;제약 및 의료 기술 혁신에 중점&lt;/h1&gt;
&lt;p&gt;수술, 정형외과 및 시력 향상 기기를 만드는 J&amp;amp;J의 MedTech 사업부 매출은 팬데믹 기간 동안 미국인들이 미뤄둔 의료절차를 재개함에 따라 12.9% 증가했다고 보고 했다.&lt;/p&gt;
&lt;p&gt;이어 제약 매출은 COVID-19 백신 판매 감소로 인해 3.1% 증가했고 소비자 건강 사업부 수익은 5.4% 증가했다.&lt;/p&gt;
&lt;p&gt;CEO인 Joaquin Duato는 J&amp;amp;J가 &quot;제약 및 의료 기술 혁신에 중점을 둔 2개 부문 회사가 되는 것을 포함하여&quot; 수많은 촉매제 덕분에 하반기에는 강한 포지션에 접어들고 있다고 답했다. &lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;5월에 회사는 소비자 건강 사업부를 Kenvue( KVUE ) 라는 독립 회사로 분사&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1 id=&quot;-2&quot;&gt;시장전망&lt;/h1&gt;
&lt;p&gt;J&amp;amp;J는 연간 EPS를 이전의 $10.60에서 $10.70에서 $10.70에서 $10.80로 높였습니다. 하지만 매출은 988억~998억 달러로 당초 예상했던 979억~989억 달러보다 적다.&lt;/p&gt;
&lt;p&gt;J&amp;amp;J 주가는 보도 이후 20일 장초반 거래에서 6% 상승했으나 연중 하락세를 보여왔다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/4504573720293005073/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/07/johnson-johnson-jnj-2q.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4504573720293005073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4504573720293005073'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/07/johnson-johnson-jnj-2q.html' title='Johnson &amp; Johnson (JNJ )의 2Q 매출/이익 예상치 상회 '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfIRNbB2ZYn2-Guxs4BiG3sPmVOybOfbPPPmnmWP_jcbDDlgCsKWtmZ7rjRm239tBx54pbJlt1a-ZsrT7lymRQGgXZkvlWyWuMB59I0wBO45Iz_pyQrrhPoJdK06R6nKJq_92tbv33AGeUObMJDIRCRxFhyq0iFjE8fHoZXCEVeJWCvzIyAcb42_WcmutM/s72-c/00000000000000232606.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-3870505677063537426</id><published>2023-06-02T19:55:00.006-07:00</published><updated>2023-06-02T20:04:08.554-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="finviz"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Stock"/><category scheme="http://www.blogger.com/atom/ns#" term="USD"/><category scheme="http://www.blogger.com/atom/ns#" term="주식"/><title type='text'>미국 주식 Ticker(종목) 데이터 리스트업 #핀비즈 #자동화</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://cdn.icon-icons.com/icons2/2699/PNG/512/python_vertical_logo_icon_168039.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;502&quot; data-original-width=&quot;449&quot; height=&quot;320&quot; src=&quot;https://cdn.icon-icons.com/icons2/2699/PNG/512/python_vertical_logo_icon_168039.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;h1 id=&quot;&quot;&gt;개요&lt;/h1&gt;
&lt;p&gt;해외 주식을 하다보면 네이버 증권의 시가총액 목록 처럼 목록화 하는 페이지를 보고 싶어하는 분들이 많지만 미국 주식이 그렇게 호락호락 하지않음을 잘 알것이다.&lt;/p&gt;
&lt;p&gt;돌고돌다 보면 finviz.com(이하 핀비즈)의 Screener(이하 스크리너) 페이지를 통해서 목록화를 시도 하는게 가장 깔끔하다.&lt;/p&gt;
&lt;p&gt;pandas 모듈을 활용하는 Python 패키지 pyfinviz 를 소개 해본다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;from pyfinviz.screener import Screener

# 매개변수 없음(기본 스크리너 테이블)
screener = Screener()
# with params (Analyst가 강력 매수 추천하는 &quot;STOCKS ONLY&quot;의 처음 3페이지)
options = [Screener.IndustryOption.STOCKS_ONLY_EX_FUNDS, Screener.AnalystRecomOption.STRONG_BUY_1]
screener = Screener(filter_options=options, view_option=Screener.ViewOption.VALUATION,
                    pages=[x for x in range(1, 4)])

# available variables:
print(screener.main_url)  # 스크랩 URL
print(screener.soups)  # beautiful soup 페이지 단위 오브젝트 {1: soup, 2: soup, ...}
print(screener.data_frames[0][&#39;Ticker&#39;])  # 페이지 단위 pd.DataFrame 오브젝트 테이블 정보 {1: table_df, 2, table_df, ...}
&lt;/code&gt;&lt;/pre&gt;


&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJllGjILQq2hFEIuSE6ey2okK4kydJDxu6NJNhA_xjoPc20Zmf07iUpE0NX4n49Vk-oJeyJ8A1cHVrQxoEXPKBgJG-8aOSq3xoDWiP84aVbqKGcLxerzfW1ctgtDGppQAdeL2U6AGrF0bU3T87c2sgn7g0TxVTpnQY3DI8tdPkV5B9o3nUx7W65sWcYg/s2174/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-06-03%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%2011.31.42.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;1796&quot; data-original-width=&quot;2174&quot; height=&quot;528&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJllGjILQq2hFEIuSE6ey2okK4kydJDxu6NJNhA_xjoPc20Zmf07iUpE0NX4n49Vk-oJeyJ8A1cHVrQxoEXPKBgJG-8aOSq3xoDWiP84aVbqKGcLxerzfW1ctgtDGppQAdeL2U6AGrF0bU3T87c2sgn7g0TxVTpnQY3DI8tdPkV5B9o3nUx7W65sWcYg/w640-h528/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-06-03%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%2011.31.42.png&quot; style=&quot;max-width: 100%;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;p&gt;크게 레인지를 주면 뻗어 버릴 가능성이 농후하니 머리를 많이 써야 한다 한다. ㅎㅎ&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/3870505677063537426/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/06/blog-post.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/3870505677063537426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/3870505677063537426'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/06/blog-post.html' title='미국 주식 Ticker(종목) 데이터 리스트업 #핀비즈 #자동화'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJllGjILQq2hFEIuSE6ey2okK4kydJDxu6NJNhA_xjoPc20Zmf07iUpE0NX4n49Vk-oJeyJ8A1cHVrQxoEXPKBgJG-8aOSq3xoDWiP84aVbqKGcLxerzfW1ctgtDGppQAdeL2U6AGrF0bU3T87c2sgn7g0TxVTpnQY3DI8tdPkV5B9o3nUx7W65sWcYg/s72-w640-h528-c/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-06-03%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%2011.31.42.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-2263618776475048673</id><published>2023-05-17T22:35:00.010-07:00</published><updated>2023-07-20T08:52:58.014-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bijection"/><category scheme="http://www.blogger.com/atom/ns#" term="chatGPT"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="shorturl"/><title type='text'>Bijection #짧은주소 를 만들어보자</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://cdn.icon-icons.com/icons2/2699/PNG/512/python_vertical_logo_icon_168039.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;502&quot; data-original-width=&quot;449&quot; height=&quot;320&quot; src=&quot;https://cdn.icon-icons.com/icons2/2699/PNG/512/python_vertical_logo_icon_168039.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;h2 id=&quot;bitly&quot;&gt;bit.ly 를 보다보니&lt;/h2&gt;
&lt;p&gt;Short URL 서비스를 보다보니 다합쳐도 글자수로 22열 이다. (예: https://bit.ly/3o5QAs3) 문득 path 쪽을 유심히 보면 일정한 규칙에 의해서 작성이 되는듯하다 &lt;/p&gt;
&lt;p&gt;bit.ly 는 월에 2억개의 URL이 생성된다고 주장한다  Int(4byte) unsigned 기준으로 대략 42.8억의 표기를 한다 쳐도 10자리가 필요하다. 그것도 주장 대로라면 대략 21개월이면 꽉 채워 진다.&lt;/p&gt;
&lt;h2 id=&quot;&quot;&gt;늘 그렇듯 검색의 바다에서 원리를 찾아 떠나다&lt;/h2&gt;
&lt;p&gt;이래저래 찾다보니 전단사 대응에 대해서 알게 되었다. 사실 우여 곡절이 많았다 BASE64 부터 md5, hex 등등 원하는 값이나 길이에 못미치는 상태 였다. &lt;/p&gt;
&lt;h2 id=&quot;chatgpt&quot;&gt;여윽시 chatGPT?&lt;/h2&gt;
&lt;p&gt;Bijection(전단사 대응)은 한 세트의 원소들을 다른 세트의 원소들로 일대일로 대응시키는 함수입니다. Python에서 bijection을 구현하는 방법은 여러 가지가 있지만, 가장 간단한 방법은 딕셔너리를 사용하는 것입니다. 딕셔너리는 각 원소를 키(key)와 값(value)으로 매핑하는 자료형입니다.&lt;/p&gt;
&lt;p&gt;답은 쉽게 구할 수 있었지만 이 과정까지 가는데 검색 엔진을 이래저래 뒤지고 또 뒤지고 나서야 Bijection이라는 용어를 알게 되었다 사실 대략적으로 숫자의 값을 나눠서 나머지 (hex 와 비슷할꺼라 생각) 를 매칭할 계획이었다.&lt;/p&gt;
&lt;h2 id=&quot;chatgpt-1&quot;&gt;chatGPT 가 만들어준 코드&lt;/h2&gt;
&lt;p&gt;chatGPT는 개인적으로 중급 이상의 개발자에겐 정말 부사수 같은 개발자이지 싶다.
큰 그림을 그리다가 막상 코딩을 하려면 어디서 부터 할지 또는 중간 중간 검색을 통해서 그걸 검증하고 하는데 시간이 많이 걸리는데 chatGPT는 그런 부분에서 상당히 시간을 줄일 수 있도록 도와준다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;def create_bijection(keys, values):
    if len(keys) != len(values):
        raise ValueError(&quot;The number of keys and values must be the same.&quot;)

    bijection = {}
    for i in range(len(keys)):
        key = keys[i]
        value = values[i]
        if key in bijection:
            raise ValueError(&quot;Duplicate key found: &quot; + str(key))
        if value in bijection.values():
            raise ValueError(&quot;Duplicate value found: &quot; + str(value))
        bijection[key] = value

    return bijection

# 예시 사용법
keys = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]
values = [1, 2, 3]
bijection = create_bijection(keys, values)
print(bijection)  # 출력: {&#39;a&#39;: 1, &#39;b&#39;: 2, &#39;c&#39;: 3}

# 특정 키에 대응하는 값을 얻을 수 있습니다.
print(bijection[&#39;a&#39;])  # 출력: 1
print(bijection[&#39;b&#39;])  # 출력: 2
print(bijection[&#39;c&#39;])  # 출력: 3
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;-1&quot;&gt;옥헤이 좀더 디벨롭을 해보자&lt;/h2&gt;
&lt;p&gt;라고 외치지만 이미 누군가가 코딩을 잘 해둔게 있었다. 그냥 쓰자 ㅋ &lt;/p&gt;

&lt;p&gt;해보니 뭔가 이상하다 무조건 가져다 쓰다가 낭패를 보았다.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;class Dencoder():
    BASE64 = list(&quot;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/&quot;)
    SAFE_BASE64 = list(&quot;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_&quot;)
    URL_SAFE = list(&quot;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_;:.+=$&quot;)
    BASE62 = list(&quot;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789&quot;)
    HEX = list(&quot;0123456789ABCDEF&quot;)
    alphabet = BASE62

    def __init__(self, alphabet=None):
        if alphabet:
                self.alphabet = alphabet
        self.base = len(self.alphabet)

    def encode(self, number):
        if number == 0:
                return self.alphabet[0]
        s = &#39;&#39;
        while number &amp;gt; 0: 
                s += self.alphabet[number % self.base] # 이부분에 문제가 있다. (2023.07.20)
                number /= self.base
        return s[::-1] # reverse string

    def decode(self, s):
        i = 0
        for char in s:
                i = i * self.base + self.alphabet.index(char)
        return i

    def in_alphabet(self, s):
        for char in s:
                if char not in self.alphabet:
                        return False
        return True
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt; 다른건 문제 없었고 인코드 부분을 고쳐 보았다.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;
	
def encode(self, number):
  if number == 0:
    return self.alphabet[0]
  s = &#39;&#39;
  # 받아오는 number 가 0 에 대해서는 위에서 처리하니 넘어가자

  while number &gt;= self.base: # 나누는 인수보다 작으면 루프가 돌지 않도록 구성
    remainder = number % self.base # 루프가 도는 동안 나머지에 대해서 Bijection 캐릭터에 매칭한다
    number = int(number // self.base) # 몫만 구한다 몫이 인수 보다 같거나 크면 계속 돌도록 한다
    s += self.alphabet[remainder] # String 에 매칭 되도록 한다.

  if number &lt; self.base and number &gt; 0 : # 최종 몫에 대해서 String 매칭을 한다.
    s += self.alphabet[number]

  return s[::-1] # reverse string

&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;-2&quot;&gt;사용법&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;from dencoder import Dencoder

d = Dencoder()
print ( d.encode(234) )
print ( d.decode(&quot;xyz&quot;) )
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;일단 나의 경우에는 마리아DB 에서 프라이머리키 에서 사용을 해보려 한다 역수로 일일이 계산해서 넣을 계획은 아니고 어플리케이션에서 디코딩 후 역수처리를 할 계획이다.&lt;/p&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/2263618776475048673/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/05/bijection.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/2263618776475048673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/2263618776475048673'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/05/bijection.html' title='Bijection #짧은주소 를 만들어보자'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-7059630611264030956</id><published>2023-04-30T21:16:00.005-07:00</published><updated>2023-05-13T16:16:03.388-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fastpi"/><category scheme="http://www.blogger.com/atom/ns#" term="GraphQL"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlmodel"/><category scheme="http://www.blogger.com/atom/ns#" term="Strawberry"/><title type='text'>Python Strawberry GraphQL 예제 (feat. #sqlmodel, #mysql)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpCm95rmHDtAgke6EjiZDWEdWL2xJxINMByH-hLWlMG7xS0D4YVyO4-gOFIDNdHYjfcGBtZ2FCCJjy1IKcTuTdMnjQogSBVsp7FPrgDDGi9mzcxD-wDP02Rm0ZshjBMNrJMSn5tRQeaddU2cEpWVi53-lsJz1nUpOmocMTT3GAqySKokT2WE2Vc8YM_g/s1600/62a86c6914a38cce0c371c0e.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;1426&quot; data-original-width=&quot;1298&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpCm95rmHDtAgke6EjiZDWEdWL2xJxINMByH-hLWlMG7xS0D4YVyO4-gOFIDNdHYjfcGBtZ2FCCJjy1IKcTuTdMnjQogSBVsp7FPrgDDGi9mzcxD-wDP02Rm0ZshjBMNrJMSn5tRQeaddU2cEpWVi53-lsJz1nUpOmocMTT3GAqySKokT2WE2Vc8YM_g/w291-h320/62a86c6914a38cce0c371c0e.png&quot; width=&quot;291&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;h2 id=&quot;api&quot;&gt;API보다 유연한 무엇을 찾아 나서다&lt;/h2&gt;
&lt;p&gt;API를 기획하거나 제작 하다보면 엔드포인트에서 유연하게 작동할 수 있는 무엇(?)을 원하게 된다.
그러다보면 API에서 필드의 스콥을 정하는 필드를 만드는 악수를 두는 상황이 벌어질 수도 있다
중급이상 개발자야 알고있거나 찾아놨거나 만들었겠지만 뭐 여튼 이래저래 찾다보면 GraphQL을 만나게 된다. &lt;/p&gt;
&lt;h2 id=&quot;graphql&quot;&gt;GraphQL&lt;/h2&gt;
&lt;p&gt;GraphQL은 애플리케이션 프로그래밍 인터페이스(API)를 위한 쿼리 언어이자 서버측 런타임으로 클라이언트에게 요청한 만큼의 데이터를 제공하는 데 우선 순위를 부여한다 바로 이점 에서 장점이 생기는데 이부분으로 인해 차후 네트워크 대역폭을 절약시키는 데 도움을 주기도 한다.&lt;/p&gt;
&lt;h2 id=&quot;python&quot;&gt;파이썬 (#python)&lt;/h2&gt;
&lt;p&gt;최근들어서 #머신러닝 이나 #AI 관련 프로젝트에 대한 이야기만 나오면 나오는 언어가 바로 파이썬이다.
GraphQL공식 사이트 가보면 알겠지만 프로젝트의 큰 부분을 차지하는게 JS 지만
관리 하는 입장이라면 아무래도 통합적으로 관리하기를 원할 수 있다보니 API 도 파이썬으로 개발 운영 해보는걸로 택했다.&lt;/p&gt;
&lt;h2 id=&quot;fastapigraphqlstrawberrysqlmodel&quot;&gt;FastAPI + GraphQL (#strawberry) + SQLmodel&lt;/h2&gt;
&lt;p&gt;파이썬에 대해서 알아가는 중이기도 하지만 조금만 찾아보면 API만든다고 하면 많은 메뉴얼이 뜨고 있는 FastAPI(이름부터 마음에 듬) 를 택했다.&lt;/p&gt;
&lt;p&gt;문제는 GraphQL 작성을 위한 프레임워크 인데 가장 많이 쓰이고 있는게 Graphene (star 7.7k) 이다.
코드를 보니 크게 어려운건 없지만 2위의 #strawberry 가 유독 끌렸다. 깃헙에서 스타갯수도 3.2k 로 한참 밀리는 느낌이지만
릴리즈 수가 압도적이었다. (어떤면에서 불안할 수 있다고 할 수 있겠지만 크게 Deprecated 되는 것이 없었다)
ORM은 직관적이라고 판단한 SQLmodel을 활용하기로 했다.&lt;/p&gt;
&lt;h2 id=&quot;&quot;&gt;패키지 관리&lt;/h2&gt;
&lt;p&gt;패키지 관리툴은 poetry를 사용 했다. &lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;toml language-toml&quot;&gt;[tool.poetry.dependencies]
python = &quot;^3.9&quot;
mysqlclient = &quot;^2.1.1&quot;
python-dotenv = &quot;^0.21.0&quot;
databases = {extras = [&quot;mysql&quot;], version = &quot;^0.6.1&quot;}
fastapi = &quot;^0.95.0&quot;
SQLAlchemy = &quot;^1.4.41&quot;
uvicorn = {extras = [&quot;standard&quot;], version = &quot;^0.18.3&quot;}
strawberry-graphql = {extras = [&quot;fastapi&quot;], version = &quot;^0.177.0&quot;}
sqlmodel = &quot;^0.0.8&quot;
python-jose = {extras = [&quot;cryptography&quot;], version = &quot;^3.3.0&quot;}
passlib = {extras = [&quot;bcrypt&quot;], version = &quot;^1.7.4&quot;}
python-mecab-ko = &quot;^1.3.3&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;modelspy&quot;&gt;models.py&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;from typing import Optional, List, Union, Dict
from pydantic import condecimal, BaseModel
from os import environ
from dotenv.main import load_dotenv
from sqlmodel import (
    SQLModel,
    Field,
    create_engine,
    Relationship
)

# .env 환경파일 로드
load_dotenv()


# DB connection (모양을 이쁘게?)
DB_CONN_URL = &#39;{}://{}:{}@{}:{}/{}&#39;.format(
    environ[&#39;DB_TYPE&#39;],
    environ[&#39;DB_USER&#39;],
    environ[&#39;DB_PASSWD&#39;],
    environ[&#39;DB_HOST&#39;],
    environ[&#39;DB_PORT&#39;],
    environ[&#39;DB_NAME&#39;],
)

engine = create_engine(DB_CONN_URL, echo=True)

class TeamModel(SQLModel, table=True):
    __tablename__ = &quot;team&quot;
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    headquarters: str

    heroes: List[&quot;HeroModel&quot;] = Relationship(back_populates=&quot;team&quot;)


class HeroModel(SQLModel, table=True):
    __tablename__ = &quot;hero&quot;
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    secret_name: str
    age: Optional[int] = None

    team_id: Optional[int] = Field(default=None, foreign_key=&quot;team.id&quot;)
    team: Optional[TeamModel] = Relationship(back_populates=&quot;heroes&quot;)

# 테이블이 생성 (유연하게 하고 싶으면 주석 처리)
SQLModel.metadata.create_all(engine)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;resolverpy&quot;&gt;resolver.py&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;from typing import Optional, List, Union, Dict
from sqlmodel import Session, select
from sqlalchemy.orm import joinedload, lazyload
from datetime import datetime, timedelta
from models import (
    TeamModel
    ,HeroModel
    ,engine
) 


def get_heroes():
    with Session(engine) as session:
        heroes = session.exec(select(HeroModel)).all()
        return heroes


def get_teams():
    with Session(engine) as session:
       # use eager loading for up to three level nesting. probably want to add this dynamically.
        heroes = session.exec(select(TeamModel).options(selectinload(TeamModel.heroes).selectinload(HeroModel.team))).all()
        return heroes
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;graphqlpy&quot;&gt;graphql.py&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;from typing import Optional, List, Dict, Union, Annotated, Tuple
from pydantic import condecimal, BaseModel
import decimal
import strawberry
from strawberry.fastapi import GraphQLRouter
from resolver import (
	get_heroes
	,get_teams
)


@strawberry.type
class Hero:
    id: Optional[int]
    name: str
    secret_name: str
    age: Optional[int]
    team_id: Optional[int]
    team: Optional[strawberry.LazyType[&quot;Team&quot;, __module__]]


@strawberry.type
class Team:
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    headquarters: str
    heroes: List[&quot;Hero&quot;]


@strawberry.type
class Query:
    allHeroes: List[Hero] = strawberry.field(resolver=get_heroes)
    allTeams: Team = strawberry.field(resolver=get_teams)


schema = strawberry.Schema(
    query=Query,
    # mutation=Mutation
)

graphql_app = GraphQLRouter(schema)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;mainpy&quot;&gt;main.py&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;from typing import Optional, List, Union, Annotated
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from graphql import graphql_app 

app = FastAPI()

app.add_middleware(
    CORSMiddleware,
    # allow_origins=[&quot;*&quot;],
    allow_origins=origins,
    allow_credentials=True,
    allow_methods=[&quot;*&quot;],
    allow_headers=[&quot;*&quot;],
)

app.include_router(graphql_app, prefix=&#39;/graphql&#39;)

@app.get(&quot;/test&quot;)
async def test_obj():
    return {&quot;test&quot; : &quot;test message&quot; }
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;-1&quot;&gt;실행&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;shell language-shell&quot;&gt;$ poetry run uvicorn main:app --reload --host 0.0.0.0 --port 8080
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/7059630611264030956/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/04/python-strawberry-graphql-feat-sqlmodel.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/7059630611264030956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/7059630611264030956'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/04/python-strawberry-graphql-feat-sqlmodel.html' title='Python Strawberry GraphQL 예제 (feat. #sqlmodel, #mysql)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpCm95rmHDtAgke6EjiZDWEdWL2xJxINMByH-hLWlMG7xS0D4YVyO4-gOFIDNdHYjfcGBtZ2FCCJjy1IKcTuTdMnjQogSBVsp7FPrgDDGi9mzcxD-wDP02Rm0ZshjBMNrJMSn5tRQeaddU2cEpWVi53-lsJz1nUpOmocMTT3GAqySKokT2WE2Vc8YM_g/s72-w291-h320-c/62a86c6914a38cce0c371c0e.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-4798348067977417443</id><published>2023-03-06T19:12:00.001-08:00</published><updated>2023-03-13T22:42:28.493-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GraphQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Strawberry"/><title type='text'>1-2-2. Strawberry graphql 지원 유형 ( #Supported #types )</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/Basic-Data-Types-in-Python_Watermarked.e3dd34457952.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;450&quot; data-original-width=&quot;800&quot; src=&quot;https://files.realpython.com/media/Basic-Data-Types-in-Python_Watermarked.e3dd34457952.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;h2 id=&quot;&quot;&gt;지원되는 타입&lt;/h2&gt;
&lt;p&gt;GraphQL은 아래와 같은 타입을 지원한다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;스칼라 타입 (Scalar types)&lt;/li&gt;
&lt;li&gt;개체 타입 (Object types)&lt;/li&gt;
&lt;li&gt;쿼리 타입 (The Query type)&lt;/li&gt;
&lt;li&gt;뮤테이션 타입 (The Mutation type)&lt;/li&gt;
&lt;li&gt;입력 타입 (Input types)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;scalartypes&quot;&gt;스칼라 타입 (Scalar types)&lt;/h2&gt;
&lt;p&gt;스칼라 타입은 Python 의 기본 타입과 유사하다. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Int: 32비트 정수 integer는 Python의 &lt;strong&gt;int&lt;/strong&gt;에 매핑&lt;/li&gt;
&lt;li&gt;Float: Python의 float에 매핑&lt;/li&gt;
&lt;li&gt;String: 파이썬의 str에 매핑&lt;/li&gt;
&lt;li&gt;Boolean(참 또는 거짓)은 파이썬의 bool에 매핑&lt;/li&gt;
&lt;li&gt;고유 식별자 ID는 문자열로 직렬화되고 다음과 같이 사용 가능 strawberry.ID(“value”) 개체를 가져오거나 캐시의 키로 사용됨 &lt;/li&gt;
&lt;li&gt;UUID, 문자열로 직렬화된 UUID 값&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
  &lt;p&gt;@ Strawberry는 날짜, 시간 및 날짜/시간 개체에 대한 지원을 포함하고 있다. 공식적으로 GraphQL 사양에는 포함되어 있지 않지만 대부분 서버에서 지원하고 있다. ISO-8601 (날짜와 시간과 관련된 데이터 교환을 다루는 국제 표준) 로 일련번호가 지정되어 있다.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;기초 적인 스칼라 타입의 요소로도 작동하지만 고유한 스칼라 타입을 지원한다.&lt;/p&gt;
&lt;h2 id=&quot;thequerytype&quot;&gt;개체 타입(The Query type)&lt;/h2&gt;
&lt;p&gt;GraphQL 스키마에서 정의하는 대부분의 타입은 객체 타입이고 개체 타입에는 필드 모음이 포함되며 각 필드는 스칼라 타입 이나 다른 개체형일 수 있다.&lt;/p&gt;
&lt;p&gt;Tip. &quot;개체 타입&quot;은 이전 스키마 에서와 같이 서로를 참조할 수 있다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;import typing
import strawberry


@strawberry.type
class Book:
    title: str
    author: &quot;Author&quot;


@strawberry.type
class Author:
    name: str
    books: typing.List[Book]
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;-1&quot;&gt;필드에 데이터 제공&lt;/h2&gt;
&lt;p&gt;위의 스키마에서 Book에는 author필드가 있고 Author에는 books 필드가 있지만 해당 스키마의 구조를 실행하기 위해 데이터를 어떻게 매핑 하는지가 이해가 안될 수 있다.&lt;/p&gt;
&lt;p&gt;이부분에서 함수를 통해 필드에 일부 데이터를 제공 하는 &lt;strong&gt;리졸버&lt;/strong&gt; 를 사용한다.&lt;/p&gt;
&lt;p&gt;Book 과 Author에 대한 이이해를 돕기위해 아래 예제 처럼 필드에 값을 제공하도록 &lt;strong&gt;리졸버&lt;/strong&gt;를 작성한다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;def get_author_for_book(root) -&amp;gt; &quot;Author&quot;:
    return Author(name=&quot;Michael Crichton&quot;)


@strawberry.type
class Book:
    title: str
    author: &quot;Author&quot; = strawberry.field(resolver=get_author_for_book)


def get_books_for_author(root):
    return [Book(title=&quot;Jurassic Park&quot;)]


@strawberry.type
class Author:
    name: str
    books: typing.List[Book] = strawberry.field(resolver=get_books_for_author)


def get_authors(root) -&amp;gt; typing.List[Author]:
    return [Author(name=&quot;Michael Crichton&quot;)]


@strawberry.type
class Query:
    authors: typing.List[Author] = strawberry.field(resolver=get_authors)
    books: typing.List[Book] = strawberry.field(resolver=get_books_for_author)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;strawberry.field 요청 시 GraphQL 쿼리에 데이터를 렌더링하는 기능을 제공하며 GraphQL API의 기본 기능에 속한다.&lt;/p&gt;
&lt;p&gt;예시의 데이터가 정적이어서  예가는 간단 할 순 있다 그러나 보다 복잡한 API를 구축할 때 리졸버는 SQLAlchemy를 사용하여 SQL 쿼리를 만들고 aiohttp 등을 사용하여 HTTP 요청을 만드는 다른 API에서 데이터베이스의 데이터를 매핑하도록 작성할 수 있다.&lt;/p&gt;
&lt;p&gt;(자세한 내용은 리졸버 섹션 을 참조)&lt;/p&gt;
&lt;h2 id=&quot;thequerytype-1&quot;&gt;쿼리 타입 (The Query type)&lt;/h2&gt;
&lt;p&gt;타입은 Query클라이언트가 데이터에 대해 실행할 수 있는 GraphQL 쿼리(즉, 읽기 작업)를 정확하게 정의할 수 있다. 
(객체 타입과 유사하지만 이름은 항상 Query임)&lt;/p&gt;
&lt;p&gt;타입의 각 필드는 Query로 지원되는 다른 쿼리의 이름과 반환 타입을 정의한다. 
(클라이언트에서 가장 많이 호출하게 될듯)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;@strawberry.type
class Query:
    books: typing.List[Book]
    authors: typing.List[Author]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;이 쿼리는  Book 과 Author 라는 쿼리를 정의한다. 각 쿼리는 List 로 리턴 하는 것을 할 수 있다.&lt;/p&gt;
&lt;p&gt;tip. REST API에서는 Book 과 Author 가 서로 다른 엔드포인트(예: /api/books 및 /api/authors)에서 결과를 리턴한다. 
GraphQL은 단일 요청으로 두 리소스 모두 쿼리가 가능 하다.&lt;/p&gt;
&lt;h2 id=&quot;-2&quot;&gt;쿼리 구조화&lt;/h2&gt;
&lt;p&gt;클라이언트에서 실행할 쿼리를 작성할 때 해당 쿼리는 스키마에서 미리 정의한 개체 타입의 형태와 일치 함을 알 수 있다.&lt;/p&gt;
&lt;p&gt;지금까지 예제(쿼리 및 리졸버)를 기반으로 클라이언트에서 Book 과 Author 목록을 모두 요청하는 쿼리를 실행가능함을 알 수 있다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;graphql language-graphql&quot;&gt;# 쿼리 요청 
query {
  books {
    title
  }

  authors {
    name
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;그런 다음 서버는 다음과 같이 쿼리 구조와 일치하는 결과로 쿼리에 응답합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;json language-json&quot;&gt;// 응답 내용 JSON
{
  &quot;data&quot;: {
    &quot;books&quot;: [{ &quot;title&quot;: &quot;Jurassic Park&quot; }],
    &quot;authors&quot;: [{ &quot;name&quot;: &quot;Michael Crichton&quot; }]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;경우에 따라 이 두 리스트를 각각 가져오는 것이 유용할 수도 있지만 클라이언트는 각 books 의 author가 결과에 포함된 단일 책 목록을 가져오는 것을 선호할 수도 있다.&lt;/p&gt;
&lt;p&gt;스키마의 Book 타입에는 Author 타입의 작성자 필드가 있으므로 클라이언트는 다음과 같이 쿼리를 구성이 가능하다&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;graphql language-graphql&quot;&gt;query {
  books {
    title
    author {
      name
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;json language-json&quot;&gt;// 응답 내용 JSON
{
  &quot;data&quot;: {
    &quot;books&quot;: [
      { &quot;title&quot;: &quot;Jurassic Park&quot;, &quot;author&quot;: { &quot;name&quot;: &quot;Michael Crichton&quot; } }
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;themutationtype&quot;&gt;뮤테이션 (The Mutation type)&lt;/h2&gt;
&lt;p&gt;Mutation 은 Query 와 구조 및 목적이 유사하지만 쿼리는 데이터의 리딩을 반면 Mutation은 쓰기 작업을 할때 쓰인다.&lt;/p&gt;
&lt;p&gt;ARGS로 보이는 필드의 타입은 입력 및 반환 타입을 사전에 정의 한다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;@strawberry.type
class Mutation:
    @strawberry.field
    def add_book(self, title: str, author: str) -&amp;gt; Book:
        ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;addBook을 통해서 두 개의 ARGS (제목 및 저자)를 수락하고 새로 생성된 Book 을 반환한다. 
예상은 했겠지만 이 -&amp;gt; Book (개체)은 스키마에서 미리 정의한 구조에서 리턴 한다&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;@참고
  Strawberry는 스네이크 케이스를  카멜 케이스로 필드 이름을 변환한다. ( 코드 : add_books / 클라이언트 : addBooks )&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;-3&quot;&gt;뮤테이션 구조화&lt;/h3&gt;
&lt;p&gt;쿼리와 마찬가지로 변형은 스키마의 타입 정의 구조와 일치하는것을 확인할 수 있으며 다음 예제는 새 Book을 title 과 author만들고 생성된 객체의 특정 필드를 반환 값으로 요청하는 예제이다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;graphql language-graphql&quot;&gt;mutation {
  addBook(title: &quot;Fox in Socks&quot;, author: &quot;Dr. Seuss&quot;) {
    title
    author {
      name
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;쿼리와 마찬가지로 GraphQL 서버는 다음과 같이 뮤테이션에서 요청 했던 리턴 형태와 일치하는 결과로 응답한다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;json language-json&quot;&gt;{
  &quot;data&quot;: {
    &quot;addBook&quot;: {
      &quot;title&quot;: &quot;Fox in Socks&quot;,
      &quot;author&quot;: {
        &quot;name&quot;: &quot;Dr. Seuss&quot;
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;inputtypes&quot;&gt;입력 타입 (Input types)&lt;/h2&gt;
&lt;p&gt;입력 타입은 객체를 쿼리 및 변형에 대한 인수로 전달할 수 있는 특수 객체 타입이다 &lt;/p&gt;
&lt;p&gt;(스칼라 타입만 전달하는 것과 반대) &lt;/p&gt;
&lt;p&gt;입력 타입을 선언 한는것은 무결성 검사시에 매우 유용하다 &lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;@strawberry.type
class Mutation:
    @strawberry.field
    def add_book(self, title: str, author: str) -&amp;gt; Book:
        ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;두 개의 인수를 허용하는 대신 이 뮤테이션은 모든 필드를 포함하는 단일 입력 타입을 허용 한다.&lt;/p&gt;
&lt;p&gt;입력 타입의 정의는 객체 타입의 정의와 유사하지만 입력 키워드를 사용합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;@strawberry.input
class AddBookInput:
    title: str
    author: str


@strawberry.type
class Mutation:
    @strawberry.field
    def add_book(self, book: AddBookInput) -&amp;gt; Book:
        ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;이렇게 하면 스키마 내에서 AddBookInput 타입을 쉽게 전달할 수 있을 뿐만 아니라 GraphQL 지원 도구에 의해 자동으로 노출되는 설명으로 필드에 주석을 달기 위한 기반도 제공한다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;@strawberry.input
class AddBookInput:
    title: str = strawberry.field(description=&quot;The title of the book&quot;)
    author: str = strawberry.field(description=&quot;The name of the author&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;여러 작업에 정확히 동일한 정보 집합이 필요한 경우 입력 타입이 유용할 수 있다 하지만 재사용은 자재 하길 바란다.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/4798348067977417443/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/01/1-2-2-supported-types.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4798348067977417443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4798348067977417443'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/01/1-2-2-supported-types.html' title='1-2-2. Strawberry graphql 지원 유형 ( #Supported #types )'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-4404178415003058092</id><published>2023-03-01T06:58:00.008-08:00</published><updated>2023-03-01T07:01:07.074-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="paramiko"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="sftp"/><title type='text'>PYTHON SFTP 파일전송 (paramiko)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://cdn.icon-icons.com/icons2/2699/PNG/512/python_vertical_logo_icon_168039.png&quot; style=&quot;display: block; padding: 1em 0; text-align: center; &quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;320&quot; data-original-height=&quot;502&quot; data-original-width=&quot;449&quot; src=&quot;https://cdn.icon-icons.com/icons2/2699/PNG/512/python_vertical_logo_icon_168039.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;서버를 운영하다 보면  사용자들이 업로드한 파일을 분산 처리 하거나 하는 일이 상당히 많을 것이다.&lt;br/&gt;
파일 서버마다 WAS를 설치 하기도 그렇고 리눅스 서버를 사용한다면 SSH가 거의 기본으로 사용하다 보니 용이하게 파일 업로드 할 수 있도록 사용하는게 어떨가 싶다.&lt;/p&gt;

&lt;p&gt;찾아보니 파이썬에서는 paramiko 라는 라이브러리가 있고 간단하게 사용 가능 하기에 정리 해둔다.&lt;/p&gt;


&lt;h1 id=&quot;1&quot;&gt;1. 패키지 설치&lt;/h1&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ pip install paramiko
&lt;/code&gt;&lt;/pre&gt;
&lt;h1 id=&quot;2&quot;&gt;2. 코드구성&lt;/h1&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;import paramiko

# 호스트 (사용가능한것을 입력, 아래는 예시)
host = &quot;10.10.10.1&quot; 

# 포트 (운영 서버라면 기본 포트 이외로 하는게 좋다)
port = 22 

# 트랜스포트 생성
transprot = paramiko.transport.Transport(host,port)

# 사용자 아이디 패스워드 (일반 사용자로 구성)
userId = &quot;user&quot; 
password = &#39;passwd&#39;

# 커넥션
transprot.connect(username = userId, password = password)
sftp = paramiko.SFTPClient.from_transport(transprot)


# 변수에 로컬 원격 파일명 선언 ( 같은 이름으로 해도 상관 없다 / 예시는 이해하기 쉽도록)
localPath  = &#39;local_img.png&#39; 
remotePath = &#39;remote_img.png&#39; 

# 파일 업로드
sftp.put(localpath, remotepath)

# 파일 다운로드 (PUT 의 반대)
sftp.get(remotepath, localpath) 

# Close
sftp.close()
transprot.close()
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;간단 하지만 매우 강력한 파일 업로드를 구성 할 수 있다. 여러 언어와 섞어서 쓰기도 좋을 듯하다.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/4404178415003058092/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/03/python-sftp-paramiko.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4404178415003058092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4404178415003058092'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/03/python-sftp-paramiko.html' title='PYTHON SFTP 파일전송 (paramiko)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-4486387009698193790</id><published>2023-01-30T22:19:00.006-08:00</published><updated>2023-01-30T22:27:17.263-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ffmpeg"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="youtube"/><title type='text'>#파이썬 #유튜브 영상 이미지 추출</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkdl_s2w3pFMkV329pVjtZeSVlG0cbs3IEx-lJcGY6GIGIWMg-2zoAxp2VPsC-IaH47k90dnQCUoQO3wquorvvwenQmwypp9hXppPEFGnTSBBJK_O3TgszjNO9_aiw4hl22jfbvVlNgw76T6Jy4RHZmkccsT7GbITC52UkEs-h2yf-fbBInyCG2pP-_g/s475/%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C.png&quot; style=&quot;display: block; padding: 1em 0; text-align: center; &quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; width=&quot;400&quot; data-original-height=&quot;106&quot; data-original-width=&quot;475&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkdl_s2w3pFMkV329pVjtZeSVlG0cbs3IEx-lJcGY6GIGIWMg-2zoAxp2VPsC-IaH47k90dnQCUoQO3wquorvvwenQmwypp9hXppPEFGnTSBBJK_O3TgszjNO9_aiw4hl22jfbvVlNgw76T6Jy4RHZmkccsT7GbITC52UkEs-h2yf-fbBInyCG2pP-_g/s400/%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;




&lt;h2 id=&quot;&quot;&gt;최근에 드라마를 보다가 스크랩을 하고 싶어졌다.&lt;/h2&gt;
&lt;p&gt;인스타나 블로그질이라는걸 해보고 싶었는데 뭔가 이미지를 따는게 귀찮았다.
찾아보니 유튜브 영상을 바로 다운로드 해줄 수 있는 파이썬 라이브러리가 있길래 영상을 다운로드 받아서 이미지 추출까지 해주는 라이브러리를 한큐에 만들고자 한다.&lt;/p&gt;
&lt;h2 id=&quot;pytube&quot;&gt;pytube 설치&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ pip install pytube
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;ffmpeg&quot;&gt;ffmpeg 설치&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;# 윈도우의 경우에는 다운로드 받아서 폴더에 압축을 풀고 환경설정만 잡으면 된다.
$ sudo apt install ffmpeg
&lt;/code&gt;&lt;/pre&gt;



&lt;h2 id=&quot;-1&quot;&gt;코드작성&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;from pytube import YouTube
from urllib import parse
import datetime as dt
import sys
import os

DOWNLOAD_FOLDER = &quot;./Downloads&quot;


url = None
duration = 1
distdate = dt.datetime.now().strftime(&quot;%Y%m%d&quot;)

# 혹시 까먹을 까봐 args 실행코드만 출력하면 관련 args에 관한 정보를 출력
if len(sys.argv) &amp;lt;= 1:
    print(&quot;args:2 =&amp;gt; 유튜브 주소&quot;)
    print(&quot;args:3 =&amp;gt; 분당 장수 (최대 1800)&quot;)
    sys.exit(0)

# 두번째 유튭 주소 입력시
if len(sys.argv) &amp;gt;= 2:
    url = sys.argv[1]

# 분당 몇장 출력 할것인지 계산 처리 1입력시 1초 한장
if len(sys.argv) &amp;gt;= 3:
    duration = int(sys.argv[2])
    duration = 1800 if duration &amp;gt; 1800 else duration
    duration =  round( (duration / 60),2)

# ffmpeg 실행 코드
ffm = &#39;ffmpeg -ss 00:00:0 -i &#39;+DOWNLOAD_FOLDER+&#39;/Video/TEST.mp4 -r &#39;+str(duration)+&#39; -qscale:v 2 -f image2 &#39;+DOWNLOAD_FOLDER+&#39;/Images/&#39;+distdate+&#39;-%d.jpg&#39;

print(ffm)

yt = YouTube(url)
print(&quot;제목 : &quot;, yt.title)
print(&quot;길이 : &quot;, yt.length)
print(&quot;게시자 : &quot;, yt.author)
print(&quot;게시날짜 : &quot;, yt.publish_date)
# print(&quot;조회수 : &quot;, yt.views)
print(&quot;키워드 : &quot;, yt.keywords)
# print(&quot;설명 : &quot;, yt.description)
print(&quot;썸네일 : &quot;, yt.thumbnail_url)

print(yt.streams.filter(progressive=True))

chk = False

for e in yt.streams.all():
    if int(e.itag) == 137:
        chk = True

if chk == False:
    sys.exit(0)


if chk == True:
    stream2 = yt.streams.get_by_itag(137)
    stream2.download(DOWNLOAD_FOLDER+&#39;/Video&#39;, &#39;TEST.mp4&#39;)
    os.system( ffm )
&lt;/code&gt;&lt;/pre&gt;


&lt;h2 &gt;실행&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;# python app.py #유튭주소 #분당_이미지_장수
$ python app.py https://www.youtube.com/watch?v=JNfuIFMBRZ4 6
&lt;/code&gt;&lt;/pre&gt;


&lt;h2 &gt;마무리&lt;/h2&gt;

&lt;p&gt;별거 없지만 쉽게 사용할 수 있도록 구성 해봤다.&lt;br/&gt;
리눅스 위주로 작성되어져 있지만 잘 정리하면 윈도우에서도 바로 쓸 수 있을정도로 간단하다 윈도우에서 ffmpeg 설치하는건 찾아보면 많이 나온다.&lt;br/&gt;
개인적으로는 여기에 SSH를 통해서 작업용 컴터로 이미지를 바로 전달 해주는 코드 까지 있으면 어떨 까 해서 그부분도 개인적으로는 구현 해서 사용중이다.
&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/4486387009698193790/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/01/blog-post.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4486387009698193790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4486387009698193790'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/01/blog-post.html' title='#파이썬 #유튜브 영상 이미지 추출'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkdl_s2w3pFMkV329pVjtZeSVlG0cbs3IEx-lJcGY6GIGIWMg-2zoAxp2VPsC-IaH47k90dnQCUoQO3wquorvvwenQmwypp9hXppPEFGnTSBBJK_O3TgszjNO9_aiw4hl22jfbvVlNgw76T6Jy4RHZmkccsT7GbITC52UkEs-h2yf-fbBInyCG2pP-_g/s72-c/%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-8230397328960462085</id><published>2023-01-29T20:41:00.003-08:00</published><updated>2023-01-29T20:46:53.071-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="arch"/><category scheme="http://www.blogger.com/atom/ns#" term="ffmpeg"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Arch Linux에 FFmpeg를 설치하는 방법</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY143Z-P4OQCWZJNvfF7DMUuCjh9c7mxVVBEw0KQ96UzCFRcbIil0ZG24JBuOymybYEXufQc94AguB6sk2RBC7ooYBBEk-70K44RmrvmELuzlNYwsfPrEVarnIfl_6nePIyHsyVydPxy9GfJJW7b3RbKiYlJEzbTS5yeQc3AdtLHa2gs0Y7Cb072lDGg/s400/ffmepg-logo.png&quot; style=&quot;display: block; padding: 1em 0; text-align: center; &quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; width=&quot;400&quot; data-original-height=&quot;400&quot; data-original-width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY143Z-P4OQCWZJNvfF7DMUuCjh9c7mxVVBEw0KQ96UzCFRcbIil0ZG24JBuOymybYEXufQc94AguB6sk2RBC7ooYBBEk-70K44RmrvmELuzlNYwsfPrEVarnIfl_6nePIyHsyVydPxy9GfJJW7b3RbKiYlJEzbTS5yeQc3AdtLHa2gs0Y7Cb072lDGg/s400/ffmepg-logo.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;



&lt;h2 id=&quot;&quot;&gt;개요&lt;/h2&gt;
&lt;p&gt;FFmpeg는 멀티미디어 파일을 처리하는 오픈 소스 패키지다. 
워낙 멀티미디어 파일 관리에는 크기 조정, 인코딩/디코딩, 노이즈 제거, 압축, 썸네일 생성 등과 같은 다양한 일반 작업이 포함되어 있다보니 이러한 작업을 수행하기 위해 FFmpeg는 수십 개의 라이브러리와 함께 설치 된다.&lt;/p&gt;
&lt;p&gt;최근 들어서 인공지능, 머신러닝 분야에서도 사용되어지다 보니 FFmpeg의 중요성을 고려하여 Arch Linux에 FFmpeg를 설치하는 가능한 방법을 알아본다.&lt;/p&gt;
&lt;h2 id=&quot;pacman&quot;&gt;Pacman을 사용하여 설치하는 방법&lt;/h2&gt;
&lt;p&gt;Pacman은 Arch Linux의 공식 패키지 관리자이다. FFmpeg도 포함되어 있다. 패키지를 설치하기 전에 시스템 패키지를 업데이트하는 것이 좋다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ sudo pacman -Syu
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ sudo pacman -S ffmpeg

[sudo] USER 암호: 
경고: ffmpeg-2:5.1.2-1는 최신 버전입니다. -- 재설치
의존성 해결 중...
꾸러미 충돌을 찾는 중...

꾸러미 (1) ffmpeg-2:5.1.2-1

총 다운로드 크기:      11.19 MiB
총 설치 크기:          36.59 MiB
알짜 업그레이드 크기:   0.00 MiB

:: 설치를 진행하시겠습니까? [Y/n] y
:: 꾸러미 가져오는 중...

 ffmpeg-2:5.1.2-1-x86_64                        11.2 MiB  1447 KiB/s 00:08 [##########################################] 100%
(1/1) 키링의 키를 검사 중                                                  [##########################################] 100%
(1/1) 꾸러미 무결성 검사 중                                                [##########################################] 100%
(1/1) 꾸러미 파일 불러오는 중                                              [##########################################] 100%
(1/1) 파일 충돌 검사 중                                                    [##########################################] 100%
(1/1) 사용 가능한 디스크 공간 검사 중                                      [##########################################] 100%

:: 전처리 훅들을 실행 중...
(1/1) Creating Timeshift snapshot before upgrade...
==&amp;gt; skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: 꾸러미 변경사항을 처리 중...
(1/1) 재설치 중 ffmpeg                                                     [##########################################] 100%
:: 후처리 훅들을 실행 중...
(1/1) Arming ConditionNeedsUpdate...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;설치에 성공하면 다음과 같이 버전을 확인할 수 있다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ ffmpeg -version 
ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan

libavutil      57. 28.100 / 57. 28.100
libavcodec     59. 37.100 / 59. 37.100
libavformat    59. 27.100 / 59. 27.100
libavdevice    59.  7.100 / 59.  7.100
libavfilter     8. 44.100 /  8. 44.100
libswscale      6.  7.100 /  6.  7.100
libswresample   4.  7.100 /  4.  7.100
libpostproc    56.  6.100 / 56.  6.100
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;aur&quot;&gt;AUR 사용하여 설치하는 방법&lt;/h2&gt;
&lt;p&gt;AUR(Arch User Repository)에는 커뮤니티 기반의 다양한 패키지가 포함되어 있고 Arch Linux 사용자가 사용할 수 있다. AUR에서 패키지를 설치하려면 yay, paru, aura, pacaur 등과 같은 AUR 헬퍼가 필요하다.&lt;/p&gt;
&lt;p&gt;다음과 같은 방식으로 yay를 사용하여 FFmpeg를 설치해보자&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ sudo yay -S ffmpeg-git
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
  &lt;p&gt;AUR에는 일부 선택 옵션이 있는 FFmpeg도 포함되어 있습니다. 추가 옵션으로 FFmpeg를 설치하려면 다음 명령어를 사용할 수 있다.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ yay -S ffmpeg-full-git
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;archlinuxffmpeg&quot;&gt;Arch Linux에서 FFmpeg를 제거하는 방법&lt;/h2&gt;
&lt;p&gt;두 가지 방법으로 설치가 진행되었으므로 Pacman 또는 AUR 도우미를 사용하여 제거할 수도 있다.&lt;/p&gt;
&lt;h3 id=&quot;pacman-1&quot;&gt;Pacman을 사용하여 제거&lt;/h3&gt;
&lt;p&gt;아래에 작성된 명령은 Arch Linux에서 FFmpeg를 제거합니다. 팩맨 사용&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ sudo pacman -R ffmpeg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;종속성과 함께 ffmpeg를 제거하려면 다음 명령을 사용할 수 있습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ sudo pacman -Rsn ffmpeg
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;aur-1&quot;&gt;AUR 도우미를 사용하여  제거&lt;/h3&gt;
&lt;p&gt;yay는 다음과 같은 방식으로 FFmpeg를 제거한다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ yay -Rcn ffmpeg-git
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&quot; ffmpeg-full &quot;이 설치된 경우 제거할 이름을 지정해야 합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ yay -Rcn ffmpeg-full-git
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/8230397328960462085/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/01/arch-linux-ffmpeg.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/8230397328960462085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/8230397328960462085'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/01/arch-linux-ffmpeg.html' title='Arch Linux에 FFmpeg를 설치하는 방법'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY143Z-P4OQCWZJNvfF7DMUuCjh9c7mxVVBEw0KQ96UzCFRcbIil0ZG24JBuOymybYEXufQc94AguB6sk2RBC7ooYBBEk-70K44RmrvmELuzlNYwsfPrEVarnIfl_6nePIyHsyVydPxy9GfJJW7b3RbKiYlJEzbTS5yeQc3AdtLHa2gs0Y7Cb072lDGg/s72-c/ffmepg-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-5414748343295219494</id><published>2023-01-29T19:01:00.009-08:00</published><updated>2023-07-24T03:44:09.135-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="arch"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Arch Linux 시스템 업데이트</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcxomsOpg9sTfWHPx3ZoLhuPv82LdtcB1avMKKwOOCyomTg7HphAXxa-rGmTpPXeycCV2DBWkz1PY0-telgu1V0h8y7pQg8PAqPOrPoED5G1GUcWorjdBHjyErUpRktmD6YxrEN5oORXrsnghE1QPO97Xy-rq6Hocy9D549h7Ji-QmQHAAwQ3fHnW2bw/s383/arch.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;321&quot; data-original-width=&quot;383&quot; height=&quot;335&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcxomsOpg9sTfWHPx3ZoLhuPv82LdtcB1avMKKwOOCyomTg7HphAXxa-rGmTpPXeycCV2DBWkz1PY0-telgu1V0h8y7pQg8PAqPOrPoED5G1GUcWorjdBHjyErUpRktmD6YxrEN5oORXrsnghE1QPO97Xy-rq6Hocy9D549h7Ji-QmQHAAwQ3fHnW2bw/w400-h335/arch.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;h2 id=&quot;&quot;&gt;개요&lt;/h2&gt;
&lt;p&gt;머신러닝이나 딥러닝이 많이 보편화 되고 관공서에서도 관심을 갖으면서 우분투가 확실히 대세로 자리 잡음을 느낀다.&lt;br/&gt;
쥔장의 개인적인 성향이 많은 사람들이 관심 갖으면 다른 유니크한 것들을 찾기 시작 하는데 최근에 꽃힌 OS 가 Arch Linux (아치 리눅스)다. &lt;/p&gt;
&lt;p&gt;우분투를 기본적으로 사용 하다보면 설치하거나 업데이트를 할때에 습관적으로 &quot;sudo apt update &amp;amp;&amp;amp; sudo apt dist-upgrade&quot; 명령을 날리곤 한다. 그러다보니 문득 Arch Linux 는 습관이 들어 있지도 않고 하다보니 이번 기회에 정리를 해두려 한다.&lt;/p&gt;
&lt;p&gt;데비안 우분투와 마찬가지로 오리지널 Arch를 사용하든 Manjaro 및 Garuda Linux와 같은 Arch 기반 배포판을 사용하든 간단한 명령으로 시스템을 안전하게 업데이트하는 방법을 보여준다&lt;/p&gt;
&lt;p&gt;모든 Linux 배포판에서는 패키지를 최신 상태로 유지하는 것이 중요하다고 생각되어진다. 
Arch는 수시로 최신 업데이트를 제공하고 있고 시스템 손상 및 패키지 손상을 방지하려면 효과적인 백업과 함께 자주 업데이트해야 한다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 id=&quot;archlinux&quot;&gt;Arch Linux 시스템 업데이트&lt;/h2&gt;
&lt;p&gt;대부분의 아치 기반 배포판은 apt 대신에 pacman 이라는 패키지 관리자를 이용한다. &lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;사용자 계정에 sudo 액세스 권한이 필요하다&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ sudo pacman -Syu
[sudo] USER 암호: 

:: 꾸러미 데이터베이스 동기화 중...

 core                                          161.7 KiB   323 KiB/s 00:01 [##########################################] 100%

 extra                                        1857.5 KiB  1451 KiB/s 00:01 [##########################################] 100%

 community                                       7.5 MiB  1517 KiB/s 00:05 [##########################################] 100%

 multilib                                      169.6 KiB   645 KiB/s 00:00 [##########################################] 100%

:: Some packages should be upgraded first...

의존성 해결 중...

꾸러미 충돌을 찾는 중...

꾸러미 (1) manjaro-system-20221227-1

총 다운로드 크기:      0.02 MiB

총 설치 크기:          0.00 MiB

알짜 업그레이드 크기:  0.00 MiB


:: 설치를 진행하시겠습니까? [Y/n] Y
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;패키지가 손상되었다고 의심되는 경우 업데이트와 함께 데이터베이스를 강제로 다운로드하여 해결한다. 사용 가능한 업데이트가 없더라도 pacman은 현재 설치된 패키지의 무결성을 확인합니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ sudo pacman -Syyu
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 id=&quot;archlinux-1&quot;&gt;Arch Linux에서 특정 패키지 업데이트&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;sudo pacman -S package_name
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
  &lt;p&gt;특정 패키지를 업그레이드하는 것은 권장하지 않는다 (권고 사항)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;패키지 이름이 무엇인지 확실하지 않은 경우 다음을 사용하여 설치된 패키지를 검색할 수 있습니다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ sudo pacman -Qs string
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/5414748343295219494/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/01/arch-linux.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/5414748343295219494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/5414748343295219494'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/01/arch-linux.html' title='Arch Linux 시스템 업데이트'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcxomsOpg9sTfWHPx3ZoLhuPv82LdtcB1avMKKwOOCyomTg7HphAXxa-rGmTpPXeycCV2DBWkz1PY0-telgu1V0h8y7pQg8PAqPOrPoED5G1GUcWorjdBHjyErUpRktmD6YxrEN5oORXrsnghE1QPO97Xy-rq6Hocy9D549h7Ji-QmQHAAwQ3fHnW2bw/s72-w400-h335-c/arch.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-5500210302487088802</id><published>2023-01-27T09:17:00.002-08:00</published><updated>2023-03-13T22:42:55.835-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GraphQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Strawberry"/><title type='text'>1-2-1. Strawberry graphql 스키마 기초 개요 #Schema #basics</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpCm95rmHDtAgke6EjiZDWEdWL2xJxINMByH-hLWlMG7xS0D4YVyO4-gOFIDNdHYjfcGBtZ2FCCJjy1IKcTuTdMnjQogSBVsp7FPrgDDGi9mzcxD-wDP02Rm0ZshjBMNrJMSn5tRQeaddU2cEpWVi53-lsJz1nUpOmocMTT3GAqySKokT2WE2Vc8YM_g/s1600/62a86c6914a38cce0c371c0e.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;1426&quot; data-original-width=&quot;1298&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpCm95rmHDtAgke6EjiZDWEdWL2xJxINMByH-hLWlMG7xS0D4YVyO4-gOFIDNdHYjfcGBtZ2FCCJjy1IKcTuTdMnjQogSBVsp7FPrgDDGi9mzcxD-wDP02Rm0ZshjBMNrJMSn5tRQeaddU2cEpWVi53-lsJz1nUpOmocMTT3GAqySKokT2WE2Vc8YM_g/w291-h320/62a86c6914a38cce0c371c0e.png&quot; width=&quot;291&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;GraphQL&lt;/strong&gt; 서버는 스키마를 사용하여 데이터의 모델을 설명할 수 있다. 
데이터 테이블에 필드가 있는 유형 의 계층 구조를 정의한다. 
또한 클라이언트가 실행할 수 있는 query(읽기) 와 mutation(쓰기, 수정)을 제공한다.&lt;/p&gt;
&lt;p&gt;스키마의 기본과 Strawberry를 사용하여 빌드하는 방법에 대해 알아보자&lt;/p&gt;
&lt;h2 id=&quot;sdlschemadefinitionlanguage&quot;&gt;스키마 정의 언어(SDL : Schema definition language)&lt;/h2&gt;
&lt;p&gt;GraphQL 서버 스키마를 생성하는 방법에는 두 가지가 있다. 
하나는 &quot;스키마&quot; 우선 방식 그리고 또 다른 하나는 &quot;코드&quot; 우선 방식 이다. Strawberry 는 코드 우선 방식으로 정의한 스키마만 지원한다. 코드 우선 방식으로 들어가기 전에 스키마 정의가 무엇인지 알아보자.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;스키마(Schema)&lt;/strong&gt;는 GraphQL 사양에 포함된 GraphQL의 스키마 정의 언어를 사용함으로써 작동하는 것을 의미한다.&lt;/p&gt;
&lt;p&gt;SDL을 사용하여 정의한 스키마의 예시&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;graphql language-graphql&quot;&gt;type Book {
  title: String!
  author: Author!
}

type Author {
  name: String!
  books: [Book!]!
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;스키마는 이들 사이의 모든 유형과 관계를 정의한다. 
이를 통해 클라이언트 개발자는 사용 가능한 데이터를 확인하고 해당 데이터를 특정하여 하위 집합을 요청할 수 있다.&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;@ !(느낌표) 필드가 null을 허용하지 않음을 지정한다.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;스키마는 데이터를 가져오는 방법을 지정하지 않는다. 나중에 리졸버를 정의할 때 구현한다.&lt;/p&gt;
&lt;h2 id=&quot;&quot;&gt;코드 우선 접근 방식&lt;/h2&gt;
&lt;p&gt;위에 언급했듯이 Strawberry는 코드 우선 접근 방식을 사용한다. 아래 예시를 보면 쉽게 이해 할 수 있다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;import typing
import strawberry


@strawberry.type
class Book:
    title: str
    author: &quot;Author&quot;


@strawberry.type
class Author:
    name: str
    books: typing.List[&quot;Book&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;파이썬의 힌트 기능 덕분에 코드가 스키마와 거의 일대일로 매핑된다.&lt;/p&gt;
&lt;p&gt;데이터를 가져오는 방법도 지정하지 않는다는 점에 유의하자. 이에 대해서는 resolvers(리졸버) 에서 설명하기로 한다.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/5500210302487088802/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/01/1-2-1-schema-basics.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/5500210302487088802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/5500210302487088802'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/01/1-2-1-schema-basics.html' title='1-2-1. Strawberry graphql 스키마 기초 개요 #Schema #basics'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpCm95rmHDtAgke6EjiZDWEdWL2xJxINMByH-hLWlMG7xS0D4YVyO4-gOFIDNdHYjfcGBtZ2FCCJjy1IKcTuTdMnjQogSBVsp7FPrgDDGi9mzcxD-wDP02Rm0ZshjBMNrJMSn5tRQeaddU2cEpWVi53-lsJz1nUpOmocMTT3GAqySKokT2WE2Vc8YM_g/s72-w291-h320-c/62a86c6914a38cce0c371c0e.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-1226077389928798728</id><published>2023-01-27T08:27:00.003-08:00</published><updated>2023-01-27T19:38:41.744-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GraphQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Strawberry"/><title type='text'>1-1. Strawberry graphql 시작하기</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJLjaORUCLVFBxrLbR0qa0zTK4Ul3NcaARFqwBhXb-CO3nGfe83dd6GgrvMiBzoQKg9LEVdhehec1vYiI5JNnSZP5y5Zgm1wCx9fg-9s2qtsesr3kBTIRO33AXTZDAA9YVD4SgqVTeIJq_KOszi2L_psXeq5nuRhKuchDMNpC2_6Pcs9ajZYuF3hsISg/s1426/62a86c6914a38cce0c371c0e.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1426&quot; data-original-width=&quot;1298&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJLjaORUCLVFBxrLbR0qa0zTK4Ul3NcaARFqwBhXb-CO3nGfe83dd6GgrvMiBzoQKg9LEVdhehec1vYiI5JNnSZP5y5Zgm1wCx9fg-9s2qtsesr3kBTIRO33AXTZDAA9YVD4SgqVTeIJq_KOszi2L_psXeq5nuRhKuchDMNpC2_6Pcs9ajZYuF3hsISg/s320/62a86c6914a38cce0c371c0e.png&quot; width=&quot;291&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이 튜토리얼(https://strawberry.rocks/docs)은 다음과 같이 활용이 될 수 있다&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GraphQL 원리에 대한 기본적인 이해를 돕는다&lt;/li&gt;
&lt;li&gt;Strawberry를 사용하여 GraphQL 스키마 정의 할 수 있다.&lt;/li&gt;
&lt;li&gt;스키마에 대해 쿼리를 실행할 수 있는 Strawberry 서버 를 구축 할 수 있다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;사용자가 명령줄과 Python에 익숙하고 최신 버전의 Python(3.7+)이 설치되어 있다고 가정한다.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Strawberry는 Python의 데이터 클래스 및 유형 힌트 기능 위에 구축됩니다.&lt;/p&gt;
&lt;h2 id=&quot;1strawberry&quot;&gt;1단계: 새 프로젝트 생성 및 Strawberry 설치&lt;/h2&gt;
&lt;p&gt;virtualenv 를 통해서 &quot;strawberry debug&quot; 서버를 설치설치 한다&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ mkdir strawberry-demo
$ cd strawberry-demo
$ python -m venv virtualenv
$ source virtualenv/bin/activate
$ pip install &#39;strawberry-graphql[debug-server]&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;2&quot;&gt;2단계: 스키마 정의&lt;/h2&gt;
&lt;p&gt;모든 GraphQL 서버는 스키마를 사용하여 클라이언트가 쿼리할 수 있는 데이터 구조를 정의한다. 하기 예제에서 타이틀과 예약자를 이용하는 예약(부킹) 쿼리하는 서비스를 구성한다.&lt;/p&gt;
&lt;p&gt;에디터에서 schema.py 파일을 생성하고  다음 내용이 포함될 수 있도록 한다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;# schema.py
import typing
import strawberry


@strawberry.type
class Book:
    title: str # 예약 타이틀
    author: str # 예약자 


@strawberry.type
class Query:
    books: typing.List[Book]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;클라이언트가 0개 이상의 부킹 목록을 반환하는 쿼리를 실행할 수 있는 GraphQL 스키마가 생성되었다.&lt;/p&gt;
&lt;h2 id=&quot;3&quot;&gt;3단계: 데이터 세트 정의&lt;/h2&gt;
&lt;p&gt;이제 스키마 구조가 있으므로 데이터 자체를 정의할 수 있다. Strawberry는 모든 데이터 소스(예: 데이터베이스, REST API, 파일 등)와 함께 작동할 수 있다. &lt;/p&gt;
&lt;p&gt;아래 예제는 일부 예약을 반환하는 함수를 구 현한것이다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;def get_books():
    return [
        Book(
            title=&quot;The Great Gatsby&quot;,
            author=&quot;F. Scott Fitzgerald&quot;,
        ),
    ]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Strawberry는 스키마를 생성하기 위해 Python 클래스를 사용하므로 데이터 개체를 생성하는 데 재사용할 수도 있습니다.&lt;/p&gt;
&lt;h2 id=&quot;4&quot;&gt;4단계: 리졸버 정의&lt;/h2&gt;
&lt;p&gt;이제 예약(부킹내역)을 반환하는 함수가 있지만 &lt;strong&gt;Strawberry&lt;/strong&gt;는 쿼리를 실행할 때 위에 작성한  함수를 사용해야 하는지 알 수가 없다 이때에 쿼리를 업데이트하여 예약내역(부킹내역)에 대한 리졸버 를 지정해야 한다. 
리졸버는 &lt;strong&gt;Strawberry&lt;/strong&gt;에게 특정 필드와 관련된 데이터를 가져올 수 있도록 한다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;@strawberry.type
class Query:
    books: typing.List[Book] = strawberry.field(resolver=get_books)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&quot;strawberry.field&quot; 틍해 특정 필드에 대한 리졸버를 지정할 수 있다.&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;예약 필드에 대한 리졸버를 지정할 필요가 없다. Strawberry가 각 필드에 대한 기본값을 추가하여 해당 필드의 값을 반환하기 때문이다.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;5&quot;&gt;5단계: 스키마 생성 및 실행&lt;/h2&gt;
&lt;p&gt;데이터와 쿼리를 정의했으므로 이제 GraphQL 스키마를 생성하고 서버를 시작한다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;python language-python&quot;&gt;schema = strawberry.Schema(query=Query)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;작성을 마쳤으면 터미널(커맨드라인)에서 서버를 실행 해본다.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;bash language-bash&quot;&gt;$ strawberry server schema
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;디버그 서버가 시작되고 다음 출력이 표시된다.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Running strawberry on http://0.0.0.0:8000/graphql 
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;6&quot;&gt;6단계: 첫 번째 쿼리 실행&lt;/h2&gt;
&lt;p&gt;이제 &lt;strong&gt;GraphQL&lt;/strong&gt; 쿼리를 실행할 수 있다. 
Strawberry는 GraphiQL UI 라는 웹에서 실행 가능하 툴을 함께 제공한다 . 
브라우져에서 http://0.0.0.0:8000/graphql &lt;/p&gt;
&lt;p&gt;다음과 같은 내용이 표시된다.&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_cJmNsZRKQKWUYtw9qVcfqLhbLnj-zTpq2HcflUr6jUphdpyENp81PLWxdg31CovAPmONddZ04tPx44Jugs1edVXELFKNp3riv16Sipo6ibFRgU9QdmZW1JCOH_OnlC-tcWk5EfcfemnQVU3XMM_uYSY0lmbjPSmg4P2G40SKD0NX5FQ9eUGKZpzbgw/s2048/index-server.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1536&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_cJmNsZRKQKWUYtw9qVcfqLhbLnj-zTpq2HcflUr6jUphdpyENp81PLWxdg31CovAPmONddZ04tPx44Jugs1edVXELFKNp3riv16Sipo6ibFRgU9QdmZW1JCOH_OnlC-tcWk5EfcfemnQVU3XMM_uYSY0lmbjPSmg4P2G40SKD0NX5FQ9eUGKZpzbgw/s16000/index-server.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&quot;GraphiQL UI&quot;&lt;/strong&gt;에는 다음이 포함됩니다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;쿼리 작성을 위한 텍스트 영역(왼쪽)&lt;/li&gt;
&lt;li&gt;쿼리 실행을 위한 재생 버튼(가운데에 있는 삼각형 버튼)&lt;/li&gt;
&lt;li&gt;쿼리 결과를 보기 위한 텍스트 영역(오른쪽) 스키마 검사 및 생성된 문서를 위한 보기(오른쪽의 탭을 통해)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;예시로 books(예약)라는테이블을 작성 하고 단일 쿼리를 만들어보자. &lt;/p&gt;
&lt;p&gt;다음 문자열을 왼쪽 영역에 붙여넣은 다음 재생 버튼을 클릭&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;graphql language-graphql&quot;&gt;{
  books {
    title
    author
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;하드 코딩된 데이터가 오른쪽에 표시된다.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbxkVfRvJtPTQTJM-Khwj-EqI2JzxIy5KCSGLkt8pD--Qt6WPQb92wy8gx7og73kAiKDZMbpa4jiILJf9hbm_wRd3YmFLTVFBpOrVR6Kv5gyFMxAMSDxJq63X3VUhnrS966awf0tmvQEaMBYPP-kRIbRvEZGNrWJRE2rx0hXgiUSePNR9cSHv-iEeUaw/s2048/index-query-example.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1536&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbxkVfRvJtPTQTJM-Khwj-EqI2JzxIy5KCSGLkt8pD--Qt6WPQb92wy8gx7og73kAiKDZMbpa4jiILJf9hbm_wRd3YmFLTVFBpOrVR6Kv5gyFMxAMSDxJq63X3VUhnrS966awf0tmvQEaMBYPP-kRIbRvEZGNrWJRE2rx0hXgiUSePNR9cSHv-iEeUaw/s16000/index-query-example.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;GraphQL을 통해 클라이언트는 필요한 필드만 쿼리가 가능하다 &quot;author&quot; 필드를 쿼리에서 제거한 다음 다시 실행하면 응답에는  &quot;예약 타이틀&quot;(title) 만 표시된다.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/1226077389928798728/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2023/01/1-1-strawberry-graphql.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/1226077389928798728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/1226077389928798728'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2023/01/1-1-strawberry-graphql.html' title='1-1. Strawberry graphql 시작하기'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJLjaORUCLVFBxrLbR0qa0zTK4Ul3NcaARFqwBhXb-CO3nGfe83dd6GgrvMiBzoQKg9LEVdhehec1vYiI5JNnSZP5y5Zgm1wCx9fg-9s2qtsesr3kBTIRO33AXTZDAA9YVD4SgqVTeIJq_KOszi2L_psXeq5nuRhKuchDMNpC2_6Pcs9ajZYuF3hsISg/s72-c/62a86c6914a38cce0c371c0e.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-6988573586010490856</id><published>2009-08-10T05:04:00.000-07:00</published><updated>2009-08-10T05:12:03.269-07:00</updated><title type='text'>흥인지문</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCj8J14DIfXh8CCuns2IqFaJEbPhXk_fsGl4AwEmejDR8uw2aD8N2Hxf3pXUN6-klhXjmY1jUy04gyxr-avis2JUbYsgAxICZvE6WHYG56MS3imzfbr7hKHGBWOQcrC-s6up-YKq5Qblr5/s1600-h/IMG+141.jpg&quot;&gt;&lt;img style=&quot;TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5368306044406497058&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCj8J14DIfXh8CCuns2IqFaJEbPhXk_fsGl4AwEmejDR8uw2aD8N2Hxf3pXUN6-klhXjmY1jUy04gyxr-avis2JUbYsgAxICZvE6WHYG56MS3imzfbr7hKHGBWOQcrC-s6up-YKq5Qblr5/s400/IMG+141.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;FONT-FAMILY: dotum; FONT-SIZE: 9pt&quot;&gt;흥인 지문의 저녘이다.. 상당히 어두운 분위기로 연출 해보고기 위해서 해가 더 내려가기 전에 뛰어 갔다 ㅎㅎ&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/6988573586010490856/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2009/08/blog-post.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/6988573586010490856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/6988573586010490856'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2009/08/blog-post.html' title='흥인지문'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCj8J14DIfXh8CCuns2IqFaJEbPhXk_fsGl4AwEmejDR8uw2aD8N2Hxf3pXUN6-klhXjmY1jUy04gyxr-avis2JUbYsgAxICZvE6WHYG56MS3imzfbr7hKHGBWOQcrC-s6up-YKq5Qblr5/s72-c/IMG+141.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-4186863160373341</id><published>2009-06-11T07:57:00.000-07:00</published><updated>2009-06-11T08:09:13.977-07:00</updated><title type='text'>북궐도 2.0</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTbAKPi8qM-kcU6wlDLpzLRHVd2jXgYV7jDzD3-2reWbYx72UQqQR6nSOqIsIosSEoBw9F9ekJWBt-9kqSjm-p3Z7gXuN1DF0G7-xQSRB8kMHLqderrgTOyX8C_JhIRtNsMkZ7m2nj5tT2/s1600-h/palace_kbk.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 250px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5346085027328858002&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTbAKPi8qM-kcU6wlDLpzLRHVd2jXgYV7jDzD3-2reWbYx72UQqQR6nSOqIsIosSEoBw9F9ekJWBt-9kqSjm-p3Z7gXuN1DF0G7-xQSRB8kMHLqderrgTOyX8C_JhIRtNsMkZ7m2nj5tT2/s400/palace_kbk.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;FONT-FAMILY: Dotum; FONT-SIZE: 9pt&quot;&gt;지금 현재 작업 중인 경복궁 안내맵 북궐도 2.0 이다.&lt;br /&gt;&lt;br /&gt;다들 많이 어이 없어 하던 바로 그물건인데 조만간에 완성이 되면 에디터스 블로그와 에디터스에 뿌릴 예정이다.&lt;br /&gt;&lt;br /&gt;자세한 기능은 반년이나 되야 할듯 싶다 아직도 기획에서 많이 미비함을 느끼고 있으며 추가 사항도 요구 사항도 점점 늘고 있다.&lt;br /&gt;&lt;br /&gt;많은 사람들의 관심(?)을 받았었는데 사실 대학2학년때에 과 후배들과 함께 했다가 여럿 울렸다..&lt;br /&gt;&lt;br /&gt;그때에는 부속들을 가지고 일러스트로 하나하나 블록처럼해서 만들어 올렸는데.. 어느새 패스가 8만개가 넘어가면서 사양이 적은 컴터에서는 열리디도 않는 신기를 발휘하는 물건이 되었다&lt;br /&gt;&lt;br /&gt;완성은 했지만 방향을 잃어 버리고 기간이 많이 지나 팀 전체의 점수가 많이 깍아 먹었던 아픔이 있다.&lt;br /&gt;&lt;br /&gt;현재 많은 문헌들을 참고로 해서 동궐도와 함께 많은 자료를 체계적으로 정리하면 서비스로 오픈 하고 싶은 작은 소망을 가지고 있다.&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/4186863160373341/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2009/06/20.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4186863160373341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/4186863160373341'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2009/06/20.html' title='북궐도 2.0'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTbAKPi8qM-kcU6wlDLpzLRHVd2jXgYV7jDzD3-2reWbYx72UQqQR6nSOqIsIosSEoBw9F9ekJWBt-9kqSjm-p3Z7gXuN1DF0G7-xQSRB8kMHLqderrgTOyX8C_JhIRtNsMkZ7m2nj5tT2/s72-c/palace_kbk.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-1438329106435551584</id><published>2009-06-11T00:22:00.000-07:00</published><updated>2009-06-11T06:32:29.084-07:00</updated><title type='text'>[광화문] 2009년 광화문 복원 공사 조감도</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvu025GQitLSmhzTk_Bc39w9d1ktlWGvsnYTTP3ff9AiRXe8DE2XH9w519iqhao63vP_QOMSFc5BAgg-CNRRx7vvWcfqwuzLKFMn6vB5EnWsWMlKYSbMCZ6D_GN7MaGON3SBq0Hrs817Kn/s1600-h/20061204141310.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;MARGIN: 0px 10px 10px 0px; WIDTH: 400px; FLOAT: left; HEIGHT: 243px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5345967259952390290&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvu025GQitLSmhzTk_Bc39w9d1ktlWGvsnYTTP3ff9AiRXe8DE2XH9w519iqhao63vP_QOMSFc5BAgg-CNRRx7vvWcfqwuzLKFMn6vB5EnWsWMlKYSbMCZ6D_GN7MaGON3SBq0Hrs817Kn/s400/20061204141310.jpg&quot; /&gt;&lt;/a&gt; 2009년 완공 예정인 광화문의 복원 완공 조감도이다. 답도가 예전처럼 길고 웅장 했으면 하는 아쉼이 많이 남는다.&lt;br /&gt;정면 궁성도 어느정도 복원을 들어가고 부속 건물들도 함께 복원을 할예정하지만 또 아쉬움이 남는건 동십자각과 궁성 연결은 힘들듯 싶다치욕의 시간을 함께 했던 광화문의 진정한 원래 모습을 찾기를 기원한다. 광화문의 옛모습&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo-4NI68kYDZMwiDjrwLNNDvsgjSQDlqmg6-9-TFv9MenEUrYvrVYBdYvgL6s59L-a5cLM6O5ilQpZY3fdzLWgjH8g3RjUFNUmI5Y7qc0xZ4x5r5FHrZ_gEut9ug6hWYq3lSmDBIYurc0h/s1600-h/20061204141310%5B1%5D.jpg&quot;&gt;&lt;img style=&quot;MARGIN: 0px 0px 10px; WIDTH: 400px; FLOAT: left; HEIGHT: 271px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5345969503801505762&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo-4NI68kYDZMwiDjrwLNNDvsgjSQDlqmg6-9-TFv9MenEUrYvrVYBdYvgL6s59L-a5cLM6O5ilQpZY3fdzLWgjH8g3RjUFNUmI5Y7qc0xZ4x5r5FHrZ_gEut9ug6hWYq3lSmDBIYurc0h/s400/20061204141310%5B1%5D.jpg&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/1438329106435551584/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2009/06/2009.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/1438329106435551584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/1438329106435551584'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2009/06/2009.html' title='[광화문] 2009년 광화문 복원 공사 조감도'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvu025GQitLSmhzTk_Bc39w9d1ktlWGvsnYTTP3ff9AiRXe8DE2XH9w519iqhao63vP_QOMSFc5BAgg-CNRRx7vvWcfqwuzLKFMn6vB5EnWsWMlKYSbMCZ6D_GN7MaGON3SBq0Hrs817Kn/s72-c/20061204141310.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4234107158556246636.post-458459518806757642</id><published>2009-06-10T19:05:00.000-07:00</published><updated>2009-06-11T07:43:46.721-07:00</updated><title type='text'>경복궁에 오신것을 환영합니다.</title><content type='html'>&lt;div style=&quot;FONT-FAMILY: Dotum; FONT-SIZE: 9pt&quot;&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_yTjSgRrqV-ny7co0fW-0DBAuXnn6LTIpO91LZU8d09FJ-htdu09oj2rFr-VnJfWyF790wO7DRyX-VOFtx_sJDC76pJDaRrrgxeSOSH8TXjRoSfXc8N7n4_gRN8FMhYdi7AtTt1Pm62bi/s1600-h/IMG_096.jpg&quot;&gt;&lt;img style=&quot;MARGIN: 0px 10px 10px 0px; WIDTH: 320px; FLOAT: left; HEIGHT: 213px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5345885460369014962&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_yTjSgRrqV-ny7co0fW-0DBAuXnn6LTIpO91LZU8d09FJ-htdu09oj2rFr-VnJfWyF790wO7DRyX-VOFtx_sJDC76pJDaRrrgxeSOSH8TXjRoSfXc8N7n4_gRN8FMhYdi7AtTt1Pm62bi/s320/IMG_096.jpg&quot; /&gt;&lt;/a&gt;1989년 당시 이곳에 왔을때엔 국립 중앙 박물관(옛 총독부 건물)이 있었다.&lt;br /&gt;내가 다시 경복궁의 존재를 알게 된건 2001년 10년이나 훌쩍 지나서 성인이 되었을때다&lt;br /&gt;여인천하를 시작으로 인연을 맺게 된 5대 고궁의 이야길 전하고 싶다.&lt;br /&gt;&lt;br /&gt;원래는 광화문에서 멋있게 찍고 싶었는데 광화문은 현재 보수 공사중 그래서 흥례문 앞에 섰다.&lt;br /&gt;이곳에 오신 여러분들을 환영 합니다.&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;RSS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://editors2.blogspot.com/feeds/458459518806757642/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://editors2.blogspot.com/2009/06/blog-post.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/458459518806757642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4234107158556246636/posts/default/458459518806757642'/><link rel='alternate' type='text/html' href='http://editors2.blogspot.com/2009/06/blog-post.html' title='경복궁에 오신것을 환영합니다.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_yTjSgRrqV-ny7co0fW-0DBAuXnn6LTIpO91LZU8d09FJ-htdu09oj2rFr-VnJfWyF790wO7DRyX-VOFtx_sJDC76pJDaRrrgxeSOSH8TXjRoSfXc8N7n4_gRN8FMhYdi7AtTt1Pm62bi/s72-c/IMG_096.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>