The Python Wrapper

This has nothing to do with a snake in a hoodie laying down rhythmic rhymes, that would be Python The Rapper :-) The same people who wrote the patentsview api also wrote a python wrapper that produces a csv file. All you need to do is download the code and dependencies (instructions provided in the link) and write a configuration file for your query or queries (more than one query can be specified in a configuration file).

Say you wanted to know what patents are assigned to companies in China. This configuration file would generate a csv file for you.
[China_Query]
entity = "patents"
input_file = "countries.txt"
directory = "/Users/Russ/mygit/PatentsView-APIWrapper" 
input_type = "assignee_country"
fields = ["patent_number", "assignee_organization", "assignee_city", "assignee_country"]
criteria = {"_not":{"assignee_organization":""}}

where countries.txt contains:
CN