user86327: experimenting with JSON RPC API using bitcoinrpc.authproxy for python.
so far it works in all instances accept when i try to create a raw transaction.
somewhere along the way im passing parameters in wrong format. 
i created helper methods to create my inputs/outputs like this: 
def getTransactionJsonInput(self, sourcetransaction) -> str: 
    return {"txid": sourcetransaction['txid'] ,"vout":sourcetransaction['vout']}

def getTransactionJsonOutput(self, new_address, amount, returnaddress, returnamount) -> str: 
    return {
        new_address: amount,
        returnaddress: returnamount
    }

and when i print my call to createrawtransaction it appears to be correct 
    print('TRANSACTION inputs', [input], type([input]))
    print('TRANSACTION outputs', output, type(output))
    return svc.createrawtransaction(input, output)


TRANSACTION inputs [{'txid': 'sourcetransactionid', 'vout': 1}] <class 'list'>
TRANSACTION outputs {'destinationaddress': 0.012, 'changeaddress': 2.56559703} <class 'dict'>

error: 

bitcoinrpc.authproxy.JSONRPCException: -3: Expected type array, got object

solution
thanks to @m1xolyd1an i was steered in the right direction. All that was missing in my implementation was adding [] around inputs. i added them in print statement but not in the actual call! 
before
return svc.createrawtransaction(input, output)

after
return svc.createrawtransaction([input], output)

new result: 

new transaction:  0200000001005134d493cb536a5000b491b0b6dbca6c5187eec67ffb8769fdedac9ec25db40100000000ffffffff02804f12000000000017a914190150e1a961a2509b1d48c4d6cf6b644454cd968757ca4a0f0000000017a91496711dceda7240a6c492b2fabc5d44ab5d4bd19e8700000000


user26873: You are providing it an Object in JSON, not an array just as the error states. 
 return {"txid": sourcetransaction['txid'] ,"vout":sourcetransaction['vout']}

I would try creating it from a dictionary and then adding it to a list instead of building it from a string, something like: 
>>> inputs = {}   #create the dictionary
>>> inputs["txid"]=sourcetransaction['txid']  #add the value to the dictionary key 'txid'
>>> inputs["vout"]=sourcetransaction['vout']  #add nout value to key 'vout'  

>>> inputs
{'txid': 'a9d4599e15b53f3eb531608ddb31f48c695c3d0b3538a6bda871e8b34f2f430c', 'vout': 0}

>>> inputsList=[inputs] #add dictionary input to list 
>>> inputsList
[{'txid': 'a9d4599e15b53f3eb531608ddb31f48c695c3d0b3538a6bda871e8b34f2f430c', 'vout': 0}]

Also noted in the example from the source:     
def createrawtransaction(self, inputs, outputs):
    """
    Creates a raw transaction spending given inputs
    (a list of dictionaries, each containing a transaction id and an output number),
    sending to given address(es).
    Returns hex-encoded raw transaction.
    Example usage:
    >>> conn.createrawtransaction(
            [{"txid": "a9d4599e15b53f3eb531608ddb31f48c695c3d0b3538a6bda871e8b34f2f430c",
              "vout": 0}],
            {"mkZBYBiq6DNoQEKakpMJegyDbw2YiNQnHT":50})
    Arguments:
    - *inputs* -- A list of {"txid": txid, "vout": n} dictionaries.
    - *outputs* -- A dictionary mapping (public) addresses to the amount
                   they are to be paid.
    """
    return self.proxy.createrawtransaction(inputs, outputs)


86327: <p>experimenting with JSON RPC API using bitcoinrpc.authproxy for python.</p>

<p>so far it works in all instances accept when i try to create a raw transaction.
somewhere along the way im passing parameters in wrong format. </p>

<p>i created helper methods to create my inputs/outputs like this: </p>

<pre><code>def getTransactionJsonInput(self, sourcetransaction) -&gt; str: 
    return {"txid": sourcetransaction['txid'] ,"vout":sourcetransaction['vout']}

def getTransactionJsonOutput(self, new_address, amount, returnaddress, returnamount) -&gt; str: 
    return {
        new_address: amount,
        returnaddress: returnamount
    }
</code></pre>

<p>and when i print my call to createrawtransaction it appears to be correct </p>

<pre><code>    print('TRANSACTION inputs', [input], type([input]))
    print('TRANSACTION outputs', output, type(output))
    return svc.createrawtransaction(input, output)
</code></pre>

<blockquote>
  <p>TRANSACTION inputs [{'txid': 'sourcetransactionid', 'vout': 1}] &lt;class 'list'&gt;</p>
  
  <p>TRANSACTION outputs {'destinationaddress': 0.012, 'changeaddress': 2.56559703} &lt;class 'dict'&gt;</p>
</blockquote>

<p>error: </p>

<blockquote>
  <p>bitcoinrpc.authproxy.JSONRPCException: -3: Expected type array, got object</p>
</blockquote>

<p><strong>solution</strong></p>

<p>thanks to @m1xolyd1an i was steered in the right direction. All that was missing in my implementation was adding [] around inputs. i added them in print statement but not in the actual call! </p>

<p>before</p>

<pre><code>return svc.createrawtransaction(input, output)
</code></pre>

<p>after</p>

<pre><code>return svc.createrawtransaction([input], output)
</code></pre>

<p>new result: </p>

<blockquote>
  <p>new transaction:  0200000001005134d493cb536a5000b491b0b6dbca6c5187eec67ffb8769fdedac9ec25db40100000000ffffffff02804f12000000000017a914190150e1a961a2509b1d48c4d6cf6b644454cd968757ca4a0f0000000017a91496711dceda7240a6c492b2fabc5d44ab5d4bd19e8700000000</p>
</blockquote>
 26873: <p>You are providing it an Object in JSON, not an array just as the error states. </p>

<pre><code> return {"txid": sourcetransaction['txid'] ,"vout":sourcetransaction['vout']}
</code></pre>

<p>I would try creating it from a dictionary and then adding it to a list instead of building it from a string, something like: </p>

<pre><code>&gt;&gt;&gt; inputs = {}   #create the dictionary
&gt;&gt;&gt; inputs["txid"]=sourcetransaction['txid']  #add the value to the dictionary key 'txid'
&gt;&gt;&gt; inputs["vout"]=sourcetransaction['vout']  #add nout value to key 'vout'  

&gt;&gt;&gt; inputs
{'txid': 'a9d4599e15b53f3eb531608ddb31f48c695c3d0b3538a6bda871e8b34f2f430c', 'vout': 0}

&gt;&gt;&gt; inputsList=[inputs] #add dictionary input to list 
&gt;&gt;&gt; inputsList
[{'txid': 'a9d4599e15b53f3eb531608ddb31f48c695c3d0b3538a6bda871e8b34f2f430c', 'vout': 0}]
</code></pre>

<p>Also noted in the example <a href="https://github.com/laanwj/bitcoin-python/blob/master/src/bitcoinrpc/connection.py#L293" rel="nofollow noreferrer">from the source</a>:     </p>

<pre><code>def createrawtransaction(self, inputs, outputs):
    """
    Creates a raw transaction spending given inputs
    (a list of dictionaries, each containing a transaction id and an output number),
    sending to given address(es).
    Returns hex-encoded raw transaction.
    Example usage:
    &gt;&gt;&gt; conn.createrawtransaction(
            [{"txid": "a9d4599e15b53f3eb531608ddb31f48c695c3d0b3538a6bda871e8b34f2f430c",
              "vout": 0}],
            {"mkZBYBiq6DNoQEKakpMJegyDbw2YiNQnHT":50})
    Arguments:
    - *inputs* -- A list of {"txid": txid, "vout": n} dictionaries.
    - *outputs* -- A dictionary mapping (public) addresses to the amount
                   they are to be paid.
    """
    return self.proxy.createrawtransaction(inputs, outputs)
</code></pre>
