Skip to content

Releases: aschleg/petpy

petpy 1.8.2 release

19 Sep 13:14
Compare
Choose a tag to compare

This release fixes some import issues with pandas (issue #8) as well as implementing some additional checks around parameter inputs. The latter was officially released in version 1.8.1.

Version 1.8.2

  • Add pandas back as an installation requirement as it is included in top-level imports. pandas is
    still not necessary to use the primary functionality of petpy.

Version 1.8.1

  • Implement check to make sure count parameter is not larger than 1,000 records (per the Petfinder API
    limits). If count exceeds 1,000 a ValueError is raised.
  • Add check for ensuring the number of total records to return does not exceed 2,000 when paging results with
    the pages and count parameters. If the desired amount of records is higher than 2,000, a
    ValueError is raised.
  • Remove Python 3.3 support. Although petpy should work fine for those still using Python 3.3, testing for 3.3
    has been discontinued.

petpy 1.8.0 Release

16 May 02:45
Compare
Choose a tag to compare

General refactoring of the petpy library to remove unneeded methods from being exposed when importing the library. The best way to import and begin using petpy is from petpy import Petfinder or, less optimally, import petpy, then calling the Petfinder class by petpy.Petfinder.

petpy 1.7.2 Release

20 Apr 02:01
Compare
Choose a tag to compare

The 1.7.2 release of petpy fixes a variety of bugs and changes to requirements. The specific changes notes are:

  • There is now a proper message when the daily API call limit is exceeded. Prior to the change, methods would
    return a JSONDecodeError.
  • The Python 2 to 3 compatibility package six, has been added as a requirement for package installation.
    The six library is lightweight and ensures the petpy package works properly for Python 2 and 3.
  • Numpy is no longer required for installing the package. Numpy's nan was originally used to denoted shelters
    animals that were not found in the Petfinder database. The value returned when a shelter or animal is not found
    is now 'na'.

The full change history can be found in the documentation.

petpy 1.7.1 Release

04 Apr 13:08
Compare
Choose a tag to compare

The 1.7.1 release of petpy is intended to fix a couple of bugs when using the shelter methods and transforming the results into pandas DataFrames. This version and other version changes can also be found in the complete petpy documentation.

Release Notes

  • Fix to the shelter_get() method for handling empty responses when no shelters returned for when
    the parameter return_df = True.
  • Fix to getting pets available at a shelter with shelter_get_pets() when the parameter
    return_df = True when the given shelter does not return any available animals.

petpy 1.7.0 Release

15 Mar 23:19
Compare
Choose a tag to compare

The 1.7.0 release introduces a variety of fixes and changes to the package. The full release notes can be found below, as well as in the petpy version documentation.

Release Notes

  • Refactoring of library to clean up code files.
  • Fixed a bug with the shelter_get_pets() method that caused an error to be thrown when there is only
    one pet record and the parameter return_df = True.
  • Many changes to simplify expressions and internal code within methods.
  • The Petfinder class method names and parameters have been renamed to be PEP8 compatible. I apologize as this
    will cause backward compatibility issues upon updating for anyone using previous versions. The original
    intention of the naming was to reflect the Petfinder API's method names as closely as possible, but after
    further consideration and given the relative short life of the library, I think the change is necessary for the
    future growth and maturity of the package.
    • How the methods interact with the Petfinder API is unchanged, thus there is no immediate need to update your
      version of petpy if it will break any current code.
  • The Github repo README has been updated with the new API methods.
  • Below is a table detailing the changed method names:
Previous Method Name New Method Name
pet_getRandom() pet_get_random()
shelter_getPets() shelter_get_pets()
shelter_listByBreed() shelter_list_by_breed()
  • The following lists the method parameter names that have changed with the release:
Previous Parameter Name New Parameter Name
petId pet_id
shelterId shelter_id

petpy 1.6 released

18 Feb 23:26
Compare
Choose a tag to compare

This release removes pandas as an installation requirement for the package. Although pandas is required to convert the API results into a DataFrame, this is optional and not necessary to the building or use of the package itself.

petpy v1.5.9 Release

14 Dec 00:27
Compare
Choose a tag to compare

Small bug fix release intended to resolve issues with paging results and returning a pandas DataFrame with return_df = True when the search records exceeded Petfinder's 2,000 records per search limit.

petpy v1.5.7 Release

10 Dec 18:54
Compare
Choose a tag to compare

The v1.5.7 release of petpy is intended to fix a few bugs related to returning a DataFrame when paging results and returning the correct number of pages. The full release notes of this release and previous releases can be found on petpy's version history documentation page. The release notes are also copied here:

  • Paging results now returns the stated number of pages in the pages parameter. Before, pages + 1 results were returned.
  • Returning pandas DataFrames with methods pet_find() and shelter_find() should no longer throw ValueError (duplicate column name was causing error in concatenating list of results into a DataFrame).
  • The contact information returned with a DataFrame when return_df = True now has the prefix 'contact.'
    removed to make the results cleaner.

Petpy v1.5.4 Release

21 Nov 18:12
Compare
Choose a tag to compare

The release of petpy v1.5.4 fixes the issues (hopefully all) that were sometimes occurring when the return_df parameter was set to True with multiple returns. The release also adds some convenience methods for returning multiple pet or shelter records with pets_get() and shelters_get(). Specific version notes, also available in petpy's version history documentation is listed below:

  • Slight fix to pet_getRandom() method. Before, if the method parameter return_df = True, but
    the parameter output was not one of 'basic' or 'full', the return_df parameter was overridden
    and set as False. Now, if return_df = True and output = None, then
    output is set to 'full' to return the most complete DataFrame.
  • Added records parameter to pet_getRandom() to allow multiple random results to be returned in the
    same method call. Please note each record returned counts as one call made to the Petfinder API.
  • Added API convenience methods pets_get() and shelters_get() for pulling multiple results given a
    list or tuple of IDs. These methods are essentially wrappers of the API methods pet_get() and shelter_get(). Completes enhancement #2.
  • More code cleanup, formatting and simplification.

Petpy v1.5.0 Release

18 Nov 15:16
Compare
Choose a tag to compare

The release of petpy v1.5.0 marks the addition of functionality to coerce the results returned from the Petfinder API into a pandas DataFrame automatically in order to facilitate quicker analysis and the exporting of data in tabular formats. To do this, simply set the return_df parameter of the method you are calling to True (parameter is False by default). For example, we can return the list of breeds of cats available in the Petfinder database as a pandas DataFrame by:

import petpy

pf = petpy.Petfinder(key) # Initialize the Petfinder class with your API key
pf.breeds_list('cat', return_df=True)

This release resolves the enhancement issue #1.

To install petpy or update from previous releases, it is recommended to use pip:

pip install petpy --upgrade

This release also features some code formatting and cleanup changes, as well as updated documentation and docstrings for each method.