summaryrefslogtreecommitdiff
path: root/python-petpy.spec
blob: c992530c967b05088eb7cf9c2c4f38479e571bfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
%global _empty_manifest_terminate_build 0
Name:		python-petpy
Version:	2.3.1
Release:	1
Summary:	Wrapper for the Petfinder API
License:	MIT
URL:		https://github.com/aschleg/petpy
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/9e/59/ff8bafbeecdc2bb40e5a668e45584553fd723814a6168095e80e64d2284c/petpy-2.3.1.tar.gz
BuildArch:	noarch

Requires:	python3-pandas
Requires:	python3-requests

%description
# Petpy - Python Wrapper for the Petfinder API

[![Documentation Status](https://readthedocs.org/projects/petpy/badge/?version=latest)](http://petpy.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://travis-ci.org/aschleg/petpy.svg?branch=master)](https://travis-ci.org/aschleg/petpy)
[![Coverage Status](https://coveralls.io/repos/github/aschleg/petpy/badge.svg?branch=master)](https://coveralls.io/github/aschleg/petpy?branch=master)
[![codecov](https://codecov.io/gh/aschleg/petpy/branch/master/graph/badge.svg)](https://codecov.io/gh/aschleg/petpy)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ac2a4c228a9e425ba11af69f7a5c9e51)](https://www.codacy.com/app/aschleg/petpy?utm_source=github.com&utm_medium=referral&utm_content=aschleg/petpy&utm_campaign=Badge_Grade)
[![Dependencies](https://img.shields.io/librariesio/github/aschleg/petpy.svg?label=dependencies)](https://libraries.io/github/aschleg/petpy)
[![https://pypi.org/project/petpy/](https://img.shields.io/badge/pypi%20version-2.2.0-blue.svg)](https://pypi.org/project/petpy/)
[![https://pypi.org/project/petpy/](https://img.shields.io/badge/python-3.6%2C%203.7-blue.svg)](https://pypi.org/project/petpy/)

:cat2: :dog2: :rooster: :rabbit2: :racehorse:

## Installation

`petpy` is easily installed through `pip`.

~~~ python
pip install petpy
~~~

The library can also be cloned or downloaded into a location of your choosing and then installed using the `setup.py` 
file per the following:

~~~ python
git clone git@github.com:aschleg/petpy.git
cd petpy
python setup.py install
~~~

## Examples and usage

An account must first be created with [Petfinder](https://www.petfinder.com/developers/) to receive an API and secret 
key. The API and secret key will be used to grant access to the Petfinder API, which lasts for 3600 seconds, or one 
hour. After the authentication period ends, you must re-authenticate with the Petfinder API. The following are some 
quick examples for using `petpy` to get started. More in-depth tutorials for `petpy` and some examples of what 
can be done with the library, please see the More Examples and Tutorials section below.

### Authenticating with the Petfinder API

Authenticating the connection with the Petfinder API is done at the same time the `Petfinder` class is initialized.

~~~ python
pf = Petfinder(key=key, secret=secret)
~~~

The following are some quick examples for getting started with `petpy` and the Petfinder API.
### Finding animal types

~~~ python
# All animal types and their relevant data.
all_types = pf.animal_types()

# Returning data for a single animal type
dogs = pf.animal_types('dog')

# Getting multiple animal types at once
cat_dog_rabbit_types = pf.animal_types(['cat', 'dog', 'rabbit'])
~~~

### Getting animal breeds for available animal types

~~~ python
cat_breeds = pf.breeds('cat')
dog_breeds = pf.breeds('dog')

# All available breeds or multiple breeds can also be returned.

all_breeds = pf.breeds()
cat_dog_rabbit = pf.breeds(types=['cat', 'dog', 'rabbit'])
~~~ 

The `breeds` method can also be set to coerce the returned JSON results into a pandas DataFrame by setting 
the parameter `return_df = True`.

~~~ python
cat_breeds_df = pf.breeds('cat', return_df = True)
all_breeds_df = pf.breeds(return_df = True)
~~~

### Finding available animals on Petfinder

The `animals()` method returns animals based on specified criteria that are listed in the Petfinder database. Specific 
animals can be searched using the `animal_id` parameter, or a search of the database can be performed by entering 
the desired search criteria.

~~~ python
# Getting first 20 results without any search criteria
animals = pf.animals()

# Extracting data on specific animals with animal_ids

animal_ids = []
for i in animals['animals'][0:3]:
    animal_ids.append(i['id'])

animal_data = pf.animals(animal_id=animal_ids)

# Returning a pandas DataFrame of the first 150 animal results
animals = pf.animals(results_per_page=50, pages=3, return_df=True)
~~~

### Getting animal welfare organizations in the Petfinder database 

Similar to the `animals()` method described above, the `organizations()` method returns data on animal welfare 
organizations listed in the Petfinder database based on specific criteria, if any. In addition to a general search 
of animal welfare organizations, specific organizational data can be extracted by supplying the `organizations()` 
method with organization IDs.

~~~ python
# Return the first 1,000 animal welfare organizations as a pandas DataFrame

organizations = pf.organizations(results_per_page=100, pages=10, return_df=True)

# Get organizations in the state of Washington

wa_organizations = pf.organizations(state='WA')
~~~

## More Examples and Tutorials

[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/aschleg/petpy/master?filepath=notebooks)

A series of IPython notebooks that introduce and explore some of the functionality and possible uses of the 
`petpy` library. The notebooks can also be launched interactively with [binder](https://mybinder.org/) by clicking the 
"launch binder" badge.

* [01 -Introduction to petpy](https://github.com/aschleg/petpy/blob/master/notebooks/01-Introduction%20to%20petpy.ipynb)
* [02 - Download 45,000 Adoptable Cat Images using petpy and multiprocessing](https://github.com/aschleg/petpy/blob/master/notebooks/02-Download%2045%2C000%20Adoptable%20Cat%20Images%20with%20petpy%20and%20multiprocessing.ipynb)
  - Please note the following notebook is still based on the legacy version of Petfinder and thus are not fully 
    representative of the functionality and methods of the most recent version of `petpy` and the Petfinder API. These 
    are currently being updated to reflect the new version of `petpy`.
* [03 - Download Pure Breeds Cat Images with petpy for Deep Neural Network training](https://github.com/aschleg/petpy/blob/master/notebooks/03-Download%20Pure%20Breeds%20Cat%20Images%20with%20petpy%20for%20Deep%20Neural%20Network%20training%20-%20multiprocessing.ipynb)
  - Provided by contributor [ma755](https://github.com/ma7555)

### Other

The following are longer usage examples and tutorials that have been posted to external media websites such as 
[Medium.com](medium.com):

* [Analyze Petfinder Adoptable Pet Descriptions with the IBM Watson Tone Analyzer — Part One](https://medium.com/@AaronSchlegel/analyze-petfinder-adoptable-pet-descriptions-with-the-ibm-watson-tone-analyzer-part-one-4efabaa1164b)

## Documentation

* [Petpy documentation](http://petpy.readthedocs.io/en/latest/)
* [Petpy changelog](https://github.com/aschleg/petpy/blob/master/CHANGELOG.md)
* [Petfinder API v2.0 documentation](https://www.petfinder.com/developers/v2/docs/)

## Requirements

* Python >= 3.6
* [requests](http://docs.python-requests.org/en/master/) >= 2.18.4
* Although not strictly required to use `petpy`, the [pandas](https://pandas.pydata.org/) library is needed 
  for returning the results as a DataFrame.

## About [Petfinder.com](https://www.petfinder.com)

Petfinder.com is one of the largest online, searchable databases for finding a new pet online. The database contains 
information on over 14,000 animal shelters and adoption organizations across North America with nearly 300,000 animals 
available for adoption. Not only does this make it a great resource for those looking to adopt their new best friend, 
but the data and information provided in Petfinder's database makes it ideal for analysis. 

## Contributors

* [ma755](https://github.com/ma7555) - Fixed several functions that use an `animal` parameter and 
  implementing checks for exceeding the Petfinder API limit.
* [ljlevins](https://github.com/ljlevins) - Found and fixed an error with the `distance` parameter used in the 
  `organizations` API endpoint.  

## License

MIT



%package -n python3-petpy
Summary:	Wrapper for the Petfinder API
Provides:	python-petpy
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-petpy
# Petpy - Python Wrapper for the Petfinder API

[![Documentation Status](https://readthedocs.org/projects/petpy/badge/?version=latest)](http://petpy.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://travis-ci.org/aschleg/petpy.svg?branch=master)](https://travis-ci.org/aschleg/petpy)
[![Coverage Status](https://coveralls.io/repos/github/aschleg/petpy/badge.svg?branch=master)](https://coveralls.io/github/aschleg/petpy?branch=master)
[![codecov](https://codecov.io/gh/aschleg/petpy/branch/master/graph/badge.svg)](https://codecov.io/gh/aschleg/petpy)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ac2a4c228a9e425ba11af69f7a5c9e51)](https://www.codacy.com/app/aschleg/petpy?utm_source=github.com&utm_medium=referral&utm_content=aschleg/petpy&utm_campaign=Badge_Grade)
[![Dependencies](https://img.shields.io/librariesio/github/aschleg/petpy.svg?label=dependencies)](https://libraries.io/github/aschleg/petpy)
[![https://pypi.org/project/petpy/](https://img.shields.io/badge/pypi%20version-2.2.0-blue.svg)](https://pypi.org/project/petpy/)
[![https://pypi.org/project/petpy/](https://img.shields.io/badge/python-3.6%2C%203.7-blue.svg)](https://pypi.org/project/petpy/)

:cat2: :dog2: :rooster: :rabbit2: :racehorse:

## Installation

`petpy` is easily installed through `pip`.

~~~ python
pip install petpy
~~~

The library can also be cloned or downloaded into a location of your choosing and then installed using the `setup.py` 
file per the following:

~~~ python
git clone git@github.com:aschleg/petpy.git
cd petpy
python setup.py install
~~~

## Examples and usage

An account must first be created with [Petfinder](https://www.petfinder.com/developers/) to receive an API and secret 
key. The API and secret key will be used to grant access to the Petfinder API, which lasts for 3600 seconds, or one 
hour. After the authentication period ends, you must re-authenticate with the Petfinder API. The following are some 
quick examples for using `petpy` to get started. More in-depth tutorials for `petpy` and some examples of what 
can be done with the library, please see the More Examples and Tutorials section below.

### Authenticating with the Petfinder API

Authenticating the connection with the Petfinder API is done at the same time the `Petfinder` class is initialized.

~~~ python
pf = Petfinder(key=key, secret=secret)
~~~

The following are some quick examples for getting started with `petpy` and the Petfinder API.
### Finding animal types

~~~ python
# All animal types and their relevant data.
all_types = pf.animal_types()

# Returning data for a single animal type
dogs = pf.animal_types('dog')

# Getting multiple animal types at once
cat_dog_rabbit_types = pf.animal_types(['cat', 'dog', 'rabbit'])
~~~

### Getting animal breeds for available animal types

~~~ python
cat_breeds = pf.breeds('cat')
dog_breeds = pf.breeds('dog')

# All available breeds or multiple breeds can also be returned.

all_breeds = pf.breeds()
cat_dog_rabbit = pf.breeds(types=['cat', 'dog', 'rabbit'])
~~~ 

The `breeds` method can also be set to coerce the returned JSON results into a pandas DataFrame by setting 
the parameter `return_df = True`.

~~~ python
cat_breeds_df = pf.breeds('cat', return_df = True)
all_breeds_df = pf.breeds(return_df = True)
~~~

### Finding available animals on Petfinder

The `animals()` method returns animals based on specified criteria that are listed in the Petfinder database. Specific 
animals can be searched using the `animal_id` parameter, or a search of the database can be performed by entering 
the desired search criteria.

~~~ python
# Getting first 20 results without any search criteria
animals = pf.animals()

# Extracting data on specific animals with animal_ids

animal_ids = []
for i in animals['animals'][0:3]:
    animal_ids.append(i['id'])

animal_data = pf.animals(animal_id=animal_ids)

# Returning a pandas DataFrame of the first 150 animal results
animals = pf.animals(results_per_page=50, pages=3, return_df=True)
~~~

### Getting animal welfare organizations in the Petfinder database 

Similar to the `animals()` method described above, the `organizations()` method returns data on animal welfare 
organizations listed in the Petfinder database based on specific criteria, if any. In addition to a general search 
of animal welfare organizations, specific organizational data can be extracted by supplying the `organizations()` 
method with organization IDs.

~~~ python
# Return the first 1,000 animal welfare organizations as a pandas DataFrame

organizations = pf.organizations(results_per_page=100, pages=10, return_df=True)

# Get organizations in the state of Washington

wa_organizations = pf.organizations(state='WA')
~~~

## More Examples and Tutorials

[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/aschleg/petpy/master?filepath=notebooks)

A series of IPython notebooks that introduce and explore some of the functionality and possible uses of the 
`petpy` library. The notebooks can also be launched interactively with [binder](https://mybinder.org/) by clicking the 
"launch binder" badge.

* [01 -Introduction to petpy](https://github.com/aschleg/petpy/blob/master/notebooks/01-Introduction%20to%20petpy.ipynb)
* [02 - Download 45,000 Adoptable Cat Images using petpy and multiprocessing](https://github.com/aschleg/petpy/blob/master/notebooks/02-Download%2045%2C000%20Adoptable%20Cat%20Images%20with%20petpy%20and%20multiprocessing.ipynb)
  - Please note the following notebook is still based on the legacy version of Petfinder and thus are not fully 
    representative of the functionality and methods of the most recent version of `petpy` and the Petfinder API. These 
    are currently being updated to reflect the new version of `petpy`.
* [03 - Download Pure Breeds Cat Images with petpy for Deep Neural Network training](https://github.com/aschleg/petpy/blob/master/notebooks/03-Download%20Pure%20Breeds%20Cat%20Images%20with%20petpy%20for%20Deep%20Neural%20Network%20training%20-%20multiprocessing.ipynb)
  - Provided by contributor [ma755](https://github.com/ma7555)

### Other

The following are longer usage examples and tutorials that have been posted to external media websites such as 
[Medium.com](medium.com):

* [Analyze Petfinder Adoptable Pet Descriptions with the IBM Watson Tone Analyzer — Part One](https://medium.com/@AaronSchlegel/analyze-petfinder-adoptable-pet-descriptions-with-the-ibm-watson-tone-analyzer-part-one-4efabaa1164b)

## Documentation

* [Petpy documentation](http://petpy.readthedocs.io/en/latest/)
* [Petpy changelog](https://github.com/aschleg/petpy/blob/master/CHANGELOG.md)
* [Petfinder API v2.0 documentation](https://www.petfinder.com/developers/v2/docs/)

## Requirements

* Python >= 3.6
* [requests](http://docs.python-requests.org/en/master/) >= 2.18.4
* Although not strictly required to use `petpy`, the [pandas](https://pandas.pydata.org/) library is needed 
  for returning the results as a DataFrame.

## About [Petfinder.com](https://www.petfinder.com)

Petfinder.com is one of the largest online, searchable databases for finding a new pet online. The database contains 
information on over 14,000 animal shelters and adoption organizations across North America with nearly 300,000 animals 
available for adoption. Not only does this make it a great resource for those looking to adopt their new best friend, 
but the data and information provided in Petfinder's database makes it ideal for analysis. 

## Contributors

* [ma755](https://github.com/ma7555) - Fixed several functions that use an `animal` parameter and 
  implementing checks for exceeding the Petfinder API limit.
* [ljlevins](https://github.com/ljlevins) - Found and fixed an error with the `distance` parameter used in the 
  `organizations` API endpoint.  

## License

MIT



%package help
Summary:	Development documents and examples for petpy
Provides:	python3-petpy-doc
%description help
# Petpy - Python Wrapper for the Petfinder API

[![Documentation Status](https://readthedocs.org/projects/petpy/badge/?version=latest)](http://petpy.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://travis-ci.org/aschleg/petpy.svg?branch=master)](https://travis-ci.org/aschleg/petpy)
[![Coverage Status](https://coveralls.io/repos/github/aschleg/petpy/badge.svg?branch=master)](https://coveralls.io/github/aschleg/petpy?branch=master)
[![codecov](https://codecov.io/gh/aschleg/petpy/branch/master/graph/badge.svg)](https://codecov.io/gh/aschleg/petpy)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ac2a4c228a9e425ba11af69f7a5c9e51)](https://www.codacy.com/app/aschleg/petpy?utm_source=github.com&utm_medium=referral&utm_content=aschleg/petpy&utm_campaign=Badge_Grade)
[![Dependencies](https://img.shields.io/librariesio/github/aschleg/petpy.svg?label=dependencies)](https://libraries.io/github/aschleg/petpy)
[![https://pypi.org/project/petpy/](https://img.shields.io/badge/pypi%20version-2.2.0-blue.svg)](https://pypi.org/project/petpy/)
[![https://pypi.org/project/petpy/](https://img.shields.io/badge/python-3.6%2C%203.7-blue.svg)](https://pypi.org/project/petpy/)

:cat2: :dog2: :rooster: :rabbit2: :racehorse:

## Installation

`petpy` is easily installed through `pip`.

~~~ python
pip install petpy
~~~

The library can also be cloned or downloaded into a location of your choosing and then installed using the `setup.py` 
file per the following:

~~~ python
git clone git@github.com:aschleg/petpy.git
cd petpy
python setup.py install
~~~

## Examples and usage

An account must first be created with [Petfinder](https://www.petfinder.com/developers/) to receive an API and secret 
key. The API and secret key will be used to grant access to the Petfinder API, which lasts for 3600 seconds, or one 
hour. After the authentication period ends, you must re-authenticate with the Petfinder API. The following are some 
quick examples for using `petpy` to get started. More in-depth tutorials for `petpy` and some examples of what 
can be done with the library, please see the More Examples and Tutorials section below.

### Authenticating with the Petfinder API

Authenticating the connection with the Petfinder API is done at the same time the `Petfinder` class is initialized.

~~~ python
pf = Petfinder(key=key, secret=secret)
~~~

The following are some quick examples for getting started with `petpy` and the Petfinder API.
### Finding animal types

~~~ python
# All animal types and their relevant data.
all_types = pf.animal_types()

# Returning data for a single animal type
dogs = pf.animal_types('dog')

# Getting multiple animal types at once
cat_dog_rabbit_types = pf.animal_types(['cat', 'dog', 'rabbit'])
~~~

### Getting animal breeds for available animal types

~~~ python
cat_breeds = pf.breeds('cat')
dog_breeds = pf.breeds('dog')

# All available breeds or multiple breeds can also be returned.

all_breeds = pf.breeds()
cat_dog_rabbit = pf.breeds(types=['cat', 'dog', 'rabbit'])
~~~ 

The `breeds` method can also be set to coerce the returned JSON results into a pandas DataFrame by setting 
the parameter `return_df = True`.

~~~ python
cat_breeds_df = pf.breeds('cat', return_df = True)
all_breeds_df = pf.breeds(return_df = True)
~~~

### Finding available animals on Petfinder

The `animals()` method returns animals based on specified criteria that are listed in the Petfinder database. Specific 
animals can be searched using the `animal_id` parameter, or a search of the database can be performed by entering 
the desired search criteria.

~~~ python
# Getting first 20 results without any search criteria
animals = pf.animals()

# Extracting data on specific animals with animal_ids

animal_ids = []
for i in animals['animals'][0:3]:
    animal_ids.append(i['id'])

animal_data = pf.animals(animal_id=animal_ids)

# Returning a pandas DataFrame of the first 150 animal results
animals = pf.animals(results_per_page=50, pages=3, return_df=True)
~~~

### Getting animal welfare organizations in the Petfinder database 

Similar to the `animals()` method described above, the `organizations()` method returns data on animal welfare 
organizations listed in the Petfinder database based on specific criteria, if any. In addition to a general search 
of animal welfare organizations, specific organizational data can be extracted by supplying the `organizations()` 
method with organization IDs.

~~~ python
# Return the first 1,000 animal welfare organizations as a pandas DataFrame

organizations = pf.organizations(results_per_page=100, pages=10, return_df=True)

# Get organizations in the state of Washington

wa_organizations = pf.organizations(state='WA')
~~~

## More Examples and Tutorials

[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/aschleg/petpy/master?filepath=notebooks)

A series of IPython notebooks that introduce and explore some of the functionality and possible uses of the 
`petpy` library. The notebooks can also be launched interactively with [binder](https://mybinder.org/) by clicking the 
"launch binder" badge.

* [01 -Introduction to petpy](https://github.com/aschleg/petpy/blob/master/notebooks/01-Introduction%20to%20petpy.ipynb)
* [02 - Download 45,000 Adoptable Cat Images using petpy and multiprocessing](https://github.com/aschleg/petpy/blob/master/notebooks/02-Download%2045%2C000%20Adoptable%20Cat%20Images%20with%20petpy%20and%20multiprocessing.ipynb)
  - Please note the following notebook is still based on the legacy version of Petfinder and thus are not fully 
    representative of the functionality and methods of the most recent version of `petpy` and the Petfinder API. These 
    are currently being updated to reflect the new version of `petpy`.
* [03 - Download Pure Breeds Cat Images with petpy for Deep Neural Network training](https://github.com/aschleg/petpy/blob/master/notebooks/03-Download%20Pure%20Breeds%20Cat%20Images%20with%20petpy%20for%20Deep%20Neural%20Network%20training%20-%20multiprocessing.ipynb)
  - Provided by contributor [ma755](https://github.com/ma7555)

### Other

The following are longer usage examples and tutorials that have been posted to external media websites such as 
[Medium.com](medium.com):

* [Analyze Petfinder Adoptable Pet Descriptions with the IBM Watson Tone Analyzer — Part One](https://medium.com/@AaronSchlegel/analyze-petfinder-adoptable-pet-descriptions-with-the-ibm-watson-tone-analyzer-part-one-4efabaa1164b)

## Documentation

* [Petpy documentation](http://petpy.readthedocs.io/en/latest/)
* [Petpy changelog](https://github.com/aschleg/petpy/blob/master/CHANGELOG.md)
* [Petfinder API v2.0 documentation](https://www.petfinder.com/developers/v2/docs/)

## Requirements

* Python >= 3.6
* [requests](http://docs.python-requests.org/en/master/) >= 2.18.4
* Although not strictly required to use `petpy`, the [pandas](https://pandas.pydata.org/) library is needed 
  for returning the results as a DataFrame.

## About [Petfinder.com](https://www.petfinder.com)

Petfinder.com is one of the largest online, searchable databases for finding a new pet online. The database contains 
information on over 14,000 animal shelters and adoption organizations across North America with nearly 300,000 animals 
available for adoption. Not only does this make it a great resource for those looking to adopt their new best friend, 
but the data and information provided in Petfinder's database makes it ideal for analysis. 

## Contributors

* [ma755](https://github.com/ma7555) - Fixed several functions that use an `animal` parameter and 
  implementing checks for exceeding the Petfinder API limit.
* [ljlevins](https://github.com/ljlevins) - Found and fixed an error with the `distance` parameter used in the 
  `organizations` API endpoint.  

## License

MIT



%prep
%autosetup -n petpy-2.3.1

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-petpy -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 2.3.1-1
- Package Spec generated