Petpy

Latest version: v2.2.1

Safety actively analyzes 627119 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

2.0.2

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.

2.0.1

- 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.

2.0.0

New major release coinciding with the release of [v2.0 of the Petfinder API](https://www.petfinder.com/developers/)!
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:
- [Get Animal Types](https://www.petfinder.com/developers/v2/docs/get-animal-types)
- [Get Single Animal Type](https://www.petfinder.com/developers/v2/docs/get-a-single-animal-type)
- `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.
- [Get Animal Breeds](https://www.petfinder.com/developers/v2/docs/get-animal-breeds)
- `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:
- [Get Animal](https://www.petfinder.com/developers/v2/docs/get-animal)
- [Get Animals](https://www.petfinder.com/developers/v2/docs/get-animals)
- `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:
- [Get Organizations](https://www.petfinder.com/developers/v2/docs/get-organizations)
- [Get Organization](https://www.petfinder.com/developers/v2/docs/get-organization)
- 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.

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`.

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.

1.8.0

- 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`.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.