文書の表示以前のリビジョンバックリンク文書の先頭へ この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。 ====== AttrDict - 属性スタイルでアクセスできる辞書 ====== 本家/ソースコード: [[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:42by ともやん