Petpy v1.0 Released!
This article is originally published at http://www.aaronschlegel.com
I am very excited to announce the release of Petpy v1.0! Petpy is a simple to use wrapper for the Petfinder API written in Python. The Petfinder API enables users to extract data from the Petfinder database which contains extensive information on over 300,000 adoptable pets and 11,000 animal welfare organizations (according to their website).
Getting Started with Petpy and the Petfinder API
Petpy is most easily installed with pip
.
pip install petpy
The Petfinder API requires an API key in order to authenticate user requests. A developer API key can be obtained by creating an account on Petfinder’s developer page. After installing petpy and obtaining an API key, you are good to start extracting data!
import petpy pf = petpy.Petfinder(API_KEY) # Initialize the API connection with your given key. cats = pf.breed_list('cat') # Pull all the cat breeds listed in the Petfinder database. pf.pet_getRandom(output='basic') # Output a randomly returned pet record from the Petfinder API.
Documentation
The post Petpy v1.0 Released! appeared first on Aaron Schlegel.
Thanks for visiting r-craft.org
This article is originally published at http://www.aaronschlegel.com
Please visit source website for post related comments.