Shopify + Python library: how to create new shipping address
<p>I'm having troubles adding a new shipping address by using the Python API.</p>

<p>Let's put aside the auth part and assume I have the customer_id.</p>

<p>I couldn't find how to put the correct lines of code to achieve this goal.
I've searched the shopify tests folder but couldn't find such example there.</p>

<p>Can someone point me to the right direction?</p>

<p>While there is currently no <code>CustomerAddress</code> resource implemented into the official python Shopify API client, you can append the address information directly onto the <code>addresses</code> attribute of the <code>Customer</code> resource as a work-around:</p>

<pre><code>customer_id = 1234567890

new_address = {
    "address1": "123 Main Street",
    "address2": "#5",
    "city": "New York",
    "company": "",
    "country": "United States",
    "name": "John Smith",
    "phone": "",
    "province": "New York",
    "zip": "10001"
 }

customer = shopify.Customer.find(customer_id)
customer.addresses.append(new_address)
customer.save()
</code></pre>

python shopify