Skip to content

petenilson/pexelpie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pexelpie

python client for Pexel images

usage

>>> from pexelpie import PexelClient

>>> client = PexelClient(api_key='your_api_key_here')

>>> results = client.search(['apple', 'technology'], search_type='photo')

get all the urls from our search results

>>> urls = [photo.url for photo in results]

get the high res original from a single result

>>> single_image = results[0]

>>> original = single_image.best_quality

or get a low res preview

>>> preview = single_image.preview

alternatively get a list of all the image sources

>>> sources = single_image.sources

if your search type was for videos then you get back a PexelVideo object

>>> results = client.search(['apple', 'technology'], search_type='video')

>>> single_video = results[0]

>>> hd_video = single_video.best_quality

or get a list of still to use as a video preview

>>> preview_images = single_video.preview_images

About

python client for Pexel images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages