This is a Python library for interacting with Pixabay api.
Requirements can be installed by this line:
$ python -m pip install pixabay_python
You need to first sign up to Pixabay and get an api key from here. Then you can use your api key to access Pixabay like the following examples
import pixabay_python as pxb
client = pxb.PixabayClient(apiKey="your_api_key")
searchResult = client.searchImage(q="tree")
hitsList = list(searchResult.hits)
pxb.download(url=hitsList[0].largeImageURL, outputDir="./anOutDir")
import pixabay_python as pxb
client = pxb.PixabayClient(apiKey="your_api_key")
searchResult = client.searchImage(q="tree")
hitsList = list(searchResult.hits)
someSelectedURLs = [hit.largeImageURL for hit in hitsList[:5]]
pxb.downloadList(urlList=someSelectedURLs, outputDir="./anOutDir")
Pixabay_Python is licensed under Apache 2.0 License.
- Developed by Farzad Shayanfar