Find Customer from shopify with the particular range of date using shopify python api
Question: How to import the customers from shopify with the particular range of date i.e
importing the customers with the date filter ?

Please refer the code below for importing customers without filter:

    
    
    shop_url = "https://%s:%s@%s.myshopify.com/admin/" % (self.api_key_shopify, 
                                                        self.password_shopify, self.name)
    
    shopify.ShopifyResource.set_site(shop_url)
    customer_list = shopify.Customer.find()
    


Answer: [As you can see from the
documentation](https://help.shopify.com/api/reference/customer#index), the
parameters you need to pass with the request in order to obtain customers
created within a specific range are `created_at_min` and `created_at_max`.
Unless you want to type the timestamps manually, we're going to need the
[`datetime`](https://docs.python.org/2/library/datetime.html#datetime.datetime)
object from the [`datetime`](https://docs.python.org/2/library/datetime.html)
module.

    
    
    from datetime import datetime
    time_format = "%Y-%m-%dT%H:%M:%S+00:00"
    min_date = datetime(year=2016, month=5, day=1).strftime(time_format)
    max_date = datetime(year=2016, month=6, day=1).strftime(time_format)
    

The formatting string we're using with the `strftime` method will give us our
time in the format required by the Shopify documentation, with UTC timezone
hard-coded in. If you want to use a different timezone, you can either hard-
code in a different time offset, or use the [pytz
module](https://docs.python.org/2/library/datetime.html#datetime.datetime).

Now, for actually calling the API. When using Shopify resources' `find`
methods, you pass property name/value pairs as keyword arguments, like so:

    
    
    customer_list = shopify.Customer.find(
        created_at_min = date1,
        created_at_max = date2
    )
    

And voila, this should return you a list of `Customer` resources, or an empty
list if there are no matches.

