user18150: Lets say I have a bitcoin address that has 10 BTC sent to it. I also have the private key for this address
Using Python (2 or 3) is there a way to create a signed transaction (which I believe is a long string of hex digits) that can then be sent to an external service (bockchain.info or whatever) for network propogation.
It seems all the python libraries for making transactions require a connection to the bitcoind rpc interface. In my application, there will be no locally ran bitcoind.
I'm thinking the code I'm looking for is like this:
address = '1ALis8zeW1XduXf98ZjoL4EKLen5mVA1q4'
private = '5KiUZd5as1TKsiwnt1KiPgiECtXiuF9BS1MxrAgedNrXcScm4d5'

from some_btc_library import make_transaction

tx_hex = make_transaction(
    inputs=[[address, private]],
    to='123rn4tNGhf1ZehQHLohYn8WRQYhjeGSCw',
    amount=3,
    miner_fee=0.0001
)

send_to_exteral_service(tx_hex)
print "transaction complete"


user2306: I think that PyCoin would serve your needs.
This test case shows how to construct a transaction.
This test case shows how to use Wallet Import Format with PyCoin.
I'd also like to note that this is not a very good idea. Suppose that your input is actually 20 BTC instead of 10. What will happen is that Bitcoin will interpret the extra 10 BTC as a fee to be collected by the miner.

user13530: Vitalik Buterin has recently shared Pybitcointools, a nice and simple-to-use Python library for handcrafting Bitcoin transactions. The example shows the basic workflow, which is pretty much what you have described in your example (just broken down to few more steps).
If you need more help, this nice article explains bitcoin transactions technically and shows examples using the Pybitcointools library.

user4667: In case you have not seen it, there is a good (IMHO) article which describes how to generate a transaction "manually" using "raw" python (no bitcoin libs or RPC): 
"Bitcoins the hard way: Using the raw Bitcoin protocol"

18150: <p>Lets say I have a bitcoin address that has 10 BTC sent to it. I also have the private key for this address</p>

<p>Using Python (2 or 3) is there a way to create a signed transaction (which I believe is a long string of hex digits) that can then be sent to an external service (bockchain.info or whatever) for network propogation.</p>

<p>It seems all the python libraries for making transactions require a connection to the bitcoind rpc interface. In my application, there will be no locally ran bitcoind.</p>

<p>I'm thinking the code I'm looking for is like this:</p>

<pre><code>address = '1ALis8zeW1XduXf98ZjoL4EKLen5mVA1q4'
private = '5KiUZd5as1TKsiwnt1KiPgiECtXiuF9BS1MxrAgedNrXcScm4d5'

from some_btc_library import make_transaction

tx_hex = make_transaction(
    inputs=[[address, private]],
    to='123rn4tNGhf1ZehQHLohYn8WRQYhjeGSCw',
    amount=3,
    miner_fee=0.0001
)

send_to_exteral_service(tx_hex)
print "transaction complete"
</code></pre>
 2306: <p>I think that <a href="https://github.com/richardkiss/pycoin" rel="nofollow">PyCoin</a> would serve your needs.</p>

<p><a href="https://github.com/richardkiss/pycoin/blob/master/tests/tx_utils_test.py" rel="nofollow">This test case shows how to construct a transaction.</a></p>

<p><a href="https://github.com/richardkiss/pycoin/blob/master/tests/key_translation_test.py" rel="nofollow">This test case shows how to use Wallet Import Format with PyCoin.</a></p>

<p>I'd also like to note that this is not a very good idea. Suppose that your input is actually 20 BTC instead of 10. What will happen is that Bitcoin will interpret the extra 10 BTC as a fee to be collected by the miner.</p>
 13530: <p><a href="https://en.wikipedia.org/wiki/Vitalik_Buterin" rel="nofollow noreferrer">Vitalik Buterin</a> has recently shared <a href="https://github.com/vbuterin/pybitcointools" rel="nofollow noreferrer">Pybitcointools</a>, a nice and simple-to-use Python library for handcrafting Bitcoin transactions. <a href="https://github.com/vbuterin/pybitcointools#example-usage-best-way-to-learn--" rel="nofollow noreferrer">The example</a> shows the basic workflow, which is pretty much what you have described in your example (just broken down to few more steps).</p>

<p>If you need more help, <a href="http://whatdoesthequantsay.com/2014/05/04/bitcoin-transactions-technically-part-2" rel="nofollow noreferrer">this nice article</a> explains bitcoin transactions technically and shows examples using the <strong>Pybitcointools</strong> library.</p>
 4667: <p>In case you have not seen it, there is a good (IMHO) article which describes how to generate a transaction "manually" using "raw" python (no bitcoin libs or RPC): <a href="http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html">
"Bitcoins the hard way: Using the raw Bitcoin protocol"</a></p>
