Skip to content

Releases: aschleg/petpy

petpy 2.3.1 Release

16 Jul 22:53
Compare
Choose a tag to compare

Removed rate check limits that were causing errors with trying to call more than one page for several endpoint functions.

petpy 2.3.0 Release

14 Feb 15:12
Compare
Choose a tag to compare
  • Added several additional search filters to the animals() function.
    • declawed: Filters results by animals that are marked as declawed.
    • house_trained: Filters results by animals that are house trained.
    • special_needs: Filters results by animals that have special needs
  • Search filters that can take multiple values in the animals() function, including age, gender, status, animal_type, size, and coat, should now correctly accept both comma-delimited strings, such as age='baby,'young' and lists or tuples.
  • The required version for pandas has been updated to at least version 1.0.0.

petpy 2.2.0 release

30 Jun 19:00
Compare
Choose a tag to compare
  • Support for Python 3.5 has been discontinued.
  • The animals() method has been updated to include new parameters provided by Petfinder's animal
    endpoint. This parameters include:
    • good_with_cats: Boolean for filtering animals that are designated as good with cats.
    • good_with_children: Boolean for filtering animals that are designated as good with children.
    • good_with_dogs: Boolean for filtering animals that are designated as good with dogs.
    • before_date: Returns results published before the specified time.
    • after_date: Returns results published after the specified time.

petpy 2.1.3 release

29 Jun 16:22
Compare
Choose a tag to compare
  • organization_id parameter in the animals method should now only return animals from specified organization IDs.

petpy 2.1.2 Release

26 Nov 13:53
Compare
Choose a tag to compare

New release includes a bug fix and some additional changes for checking total usage against the Petfinder API.

  • animal_type parameter used in the animals() endpoint has been corrected and should be working properly.
  • New methods for checking the usage of the supplied API key against the limits defined by the Petfinder API have been implemented to better help warn users when they are approaching their API request limit.
    • If the max_pages parameter exceeds 10,000, a warning will be issued to give the user the opportunity to continue or limit their results to 10,000 pages.
    • When the API limits are exceeded, a RuntimeError will be issued.

Thank you to contributor ma755 for submitting the pull request.

petpy 2.1.1 Release

11 Nov 13:27
Compare
Choose a tag to compare

Small update release to fix the distance parameter logic when searching for pets using the animals() or
organizations() methods. Thank you to contributor ljlevins for submitting the pull request.

petpy 2.1.0 Release

16 Aug 13:02
Compare
Choose a tag to compare

The 2.1.0 release of petpy implements several user-defined exceptions to help users debug any
errors that may occur. Although the petpy library attempts to find any invalid passed parameter values and raise the appropriate error before the call to the Petfinder API is made to reduce the number of calls made to the API; however, some errors cannot be caught until after the API call is made. This update introduces these custom, user-defined exceptions for debugging error responses from the Petfinder API. For more information on the Petfinder API error definitions, please see the [Petfinder API documentation (https://www.petfinder.com/developers/v2/docs/#errors).

The following is a list of the new user-defined exceptions.

  • PetfinderInvalidCredentials
    • Raised when a user enters invalid API key and secret key credentials.
  • PetfinderInsufficientAccess
    • Raised when a status code 403 occurs. This error would typically be
      raised when the current authentication token to the Petfinder API has expired and requires the connnection to be re-authenticated.
  • PetfinderResourceNotFound
  • PetfinderUnexpectedError
  • PetfinderInvalidParameters
    • Raised when a 400 status code occurs. The exception will include the invalid parameters detected by the Petfinder API and include those parameters as part of the error output as a JSON object. For more information on this error, please see the Petfinder API documentation.
      • Please note the petpy library will attempt to catch any invalid parameters before the API call is made to avoid extraneous issuage of the API, but if an invalid parameter does get through then this error should help provide the necessary information for users to debug any errors related to their chosen parameters.

The following other changes have been made in the 2.1.0 release.

  • The host and auth attributes of the Petfinder class are now private (to the extent that Python allows private attributes, denoted with an underscore in front of the attribute).

2.0.2 Relase

08 Aug 19:17
Compare
Choose a tag to compare

Minor bug fix release with following:

  • breeds() method now correctly returns data when a single animal type is supplied.
  • animals() method now properly displays the correct error message when the distance parameter is
    0 <= distance <= 500.

petpy 2.0.1 released

27 Jul 17:36
Compare
Choose a tag to compare

The 2.0.1 release of petpy introduces some small bug fixes and a few other minor changes to shore up changes made for the 2.0.0 release.

Full Changelog, which can also be found in the repository's root directory.

  • Fixes the animals() and organizations() method to return all matching search results when the pages parameter
    is set to None.
  • The resulting JSON (dictionary) from the breeds() method when the parameter return_df=False will now consistently
    have types as the key. Prior to this change, if the breeds() method was called with a single animal type, the
    resulting key name in the returned object would be named type, whereas if more than one animal type is specified
    the key name would be types.
  • The distance parameter for the animals() and organizations() parameters will now raise a ValueError if it is
    less than 0.

petpy 2.0.0 Released!

20 Jul 14:44
Compare
Choose a tag to compare

New major release coinciding with the release of v2.0 of the Petfinder API!
The legacy version of the Petfinder API, v1.0, will be retired in January 2020, therefore, the petpy library has
been updated almost from the ground up to be compatible as possible with the new version of the Petfinder API! The
new version of the Petfinder API is a huge improvement over the legacy version, with many changes and additions to
the design of the API itself.

Below is a summary of all the changes made in the release of petpy 2.0.

  • petpy now supports the latest release of Python 3.7
  • Support for Python 2.7 is discontinued as Python 2.7 will be officially discontinued in January 2020.
  • The following methods have been added to petpy to make it compatible with v2.0 of the Petfinder API.
    • animal_types() is used to getting animal types (or type) available from the Petfinder API. The release
      of v2.0 of the Petfinder API added several endpoints for accessing animal types in the Petfinder database.
      This method wraps both Petfinder API endpoints for getting animal types. More information on the animal type
      endpoints in the Petfinder API can be found in its documentation:
    • breeds() is the new method for getting available animal breeds from the Petfinder database. The API
      endpoint documentation is available on the Petfinder API documentation page.
    • animals() is the method for extracting animal data available on the Petfinder API and deprecates the
      pets() related methods. The method wraps both the animals and animal/{id} endpoints of the Petfinder API. The documentation for these endpoints can be
      found in the Petfinder API documentation:
    • organizations() is now the method for extracting animal welfare organization data available on Petfinder
      and deprecates previous shelter() related methods and endpoints. The organizations() method wraps both
      the Petfinder API organizations and organizations/{id} endpoints. The Petfinder API documentation for
      these two endpoints can be found below:
  • The following methods have been removed as they are no longer valid endpoints with the release of v2.0 of the
    PetFinder API.
    • pet_get_random()
    • shelter_list_by_breed()
    • shelter_get_pets()
  • General refactoring and code clean-up.