title: How to retrieve all attributes of an anytree Node?
body: <p>For an <a href="https://anytree.readthedocs.io/en/latest/index.html" rel="nofollow noreferrer"><code>anytree</code></a> <code>Node</code>, how can I get all the attributes and their values?</p>
  <p>For example, if I do:</p>
  <pre><code>&gt;&gt;&gt; from anytree import Node
  &gt;&gt;&gt; root = Node(&quot;root&quot;)
  &gt;&gt;&gt; s0 = Node(&quot;sub0&quot;, parent=root, foo=&quot;10&quot;, bar=&quot;ggg&quot;)
  </code></pre>
  <p>how can I get something like <code>[(&quot;foo&quot;, &quot;10&quot;), (&quot;bar&quot;, &quot;ggg&quot;)]</code>?</p>
  <p>I can think of a route via the following:</p>
  <pre><code>&gt;&gt;&gt; s1=Node(&quot;dummy&quot;, parent=root)
  &gt;&gt;&gt; set(dir(s0))-set(dir(s1))
  {'foo', 'bar'}
  </code></pre>
  <p>but I hope there is a more concise way.</p>