Skip to main content

Python 3 Pixabay's API wrapper

Project description

build CI Downloads Downloads PyPI version PyPI - Python Version

python-pixabay

Python 3 Pixabay's API wrapper.

Install from PyPi

pip install python-pixabay

Synopsis

from pixabay import Image, Video

API_KEY = 'my_pixabay_api_key'

# image operations
image = Image(API_KEY)

# default image search
image.search()

# custom image search
ims = image.search(q='cats dogs',
             lang='es',
             image_type='photo',
             orientation='horizontal',
             category='animals',
             safesearch='true',
             order='latest',
             page=2,
             per_page=3)

print(ims)

# video operations
video = Video(API_KEY)

# default video search
video.search()

# custom video search
vis = video.search(q='cats', lang='fr',
                       video_type='animation',
                       category='animals',
                       page=1,
                       per_page=4)

print(vis)

Usage

I wrote a few how to articles in the project wiki. Feel free to add more examples or scenarios to the wiki.

Running the tests

  • Make sure you've assigned the PIXABAY_API_KEY environment variable with your registered Pixabay's api key.

  • Run the following command pytest in the project directory.

Maintainer and Contributors

  • This software is authored and maintained by Momozor.

  • For contributors that contributed to this development of this module, see the CONTRIBUTORS file.

See Also

License

This module is licensed under the MIT license. See LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-pixabay, version 4.2
Filename, size File type Python version Upload date Hashes
Filename, size python_pixabay-4.2-py3-none-any.whl (5.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size python-pixabay-4.2.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page