Python 3: return single Bits from a memoryview
<p>Working with python 3.5, I recieve a single byte from a PostgreSQL as memoryview.</p>

<pre><code>&gt;&gt;&gt; mybyte
&lt;memory at 0x7fd07b12a888&gt;
&gt;&gt;&gt; bytes(mybyte)
b'\x04' 
</code></pre>

<p>How can I read the single Bits of this Byte? Is there a way to get a bitwise representation of this single byte? 
I thought something like </p>

<pre><code>&gt;&gt;&gt; bin(ord(mybyte))
</code></pre>

<p>should do the trick, but it won't work on a memoryview. Also something like </p>

<pre><code>&gt;&gt;&gt; print(mybyte &gt;&gt; 3) 
</code></pre>

<p>is clearly not working...
Thanks for any hints and support. </p>