user27141: I'm currently doing RPC calls to bitcoin-cli within python to get raw block data:
bitcoin-cli getblock BLOCKHASH False

I've already written a function that cuts off the block header and splits the transaction block into individual transactions, resulting in the same result as: 
bitcoin-cli getrawblock TXID

I'm now trying to convert this data into the same result as
bitcoin-cli getrawblock TXID 1

without doing another RPC call to bitcoind. Would prefer to use pre-existing modules if possible.
Python packages would be appreciated.

user9382: Yes, Pybitcointools (or this fork which has BIP39, file embedding and mk_opreturn) can do this.
Install either version of pybitcointools using setup.py install, as usual.
Then, with a raw hex transaction, rawtx, simply use txo = deserialize(rawtx). rawtx can be either a signed or unsigned hex transaction. The returned txo is deserialized as a dict object. Use serialize(txo) to get back to rawtx.
You can fetch TxIDs using fetchtx(hex_txid, source="blockr") and send signed Txs with pushtx(signed_hex_tx, source="bci").

27141: <p>I'm currently doing RPC calls to bitcoin-cli within python to get raw block data:</p>

<pre><code>bitcoin-cli getblock BLOCKHASH False
</code></pre>

<p>I've already written a function that cuts off the block header and splits the transaction block into individual transactions, resulting in the same result as: </p>

<pre><code>bitcoin-cli getrawblock TXID
</code></pre>

<p>I'm now trying to convert this data into the same result as</p>

<pre><code>bitcoin-cli getrawblock TXID 1
</code></pre>

<p>without doing another RPC call to bitcoind. Would prefer to use pre-existing modules if possible.</p>

<p>Python packages would be appreciated.</p>
 9382: <p>Yes, <a href="https://github.com/vbuterin/pybitcointools" rel="nofollow">Pybitcointools</a> (or <a href="https://github.com/simcity4242/pybitcointools" rel="nofollow">this fork</a> which has BIP39, file embedding and <code>mk_opreturn</code>) can do this.</p>

<p>Install either version of pybitcointools using <code>setup.py install</code>, as usual.</p>

<p>Then, with a raw hex transaction, <code>rawtx</code>, simply use <code>txo = deserialize(rawtx)</code>. <code>rawtx</code> can be either a signed or unsigned hex transaction. The returned <code>txo</code> is deserialized as a <code>dict</code> object. Use <code>serialize(txo)</code> to get back to <code>rawtx</code>.</p>

<p>You can fetch TxIDs using <code>fetchtx(hex_txid, source="blockr")</code> and send signed Txs with <code>pushtx(signed_hex_tx, source="bci")</code>.</p>
