python:attrdict

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
python:attrdict [2021/05/28 05:56] – 作成 ともやんpython:attrdict [2021/05/28 06:40] ともやん
行 2: 行 2:
  
 ソースコード: [[git>bcj/AttrDict|GitHub - bcj/AttrDict: A dictionary that allows attribute-style access.]]\\ ソースコード: [[git>bcj/AttrDict|GitHub - bcj/AttrDict: A dictionary that allows attribute-style access.]]\\
 +
 +===== インストール =====
 +<WRAP prewrap 100%>
 +<code>
 +$ pip install attrdict
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result>
 +<code>
 +Collecting attrdict
 +  Downloading attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB)
 +Collecting six
 +  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
 +Installing collected packages: six, attrdict
 +Successfully installed attrdict-2.0.1 six-1.16.0
 +</code>
 +</WRAP>
 +
 +===== 使い方 =====
 +<WRAP prewrap 100% #mincode>
 +<code python>
 +>>> from attrdict import AttrDict
 +>>> ad = AttrDict({'foo': 'bar'})
 +>>> ad.foo
 +'bar'
 +>>> ad['foo']
 +'bar'
 +</code>
 +</WRAP>
  
  • python/attrdict.txt
  • 最終更新: 2021/05/28 06:42
  • by ともやん