a Python library for interacting with Pixabay api
Project description
Pixabay_Python
This is a Python library for interacting with Pixabay api.
Requirements
Requirements can be installed by this line:
$ python -m pip install pixabay_python
Usage
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
example 1
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")
example 2
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")
License
Pixabay_Python is licensed under Apache 2.0 License.
Credits
- Developed by Farzad Shayanfar
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pixabay_python-1.1.0.tar.gz
(16.2 kB
view hashes)
Built Distribution
Close
Hashes for pixabay_python-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9a74f0ff427410fc1cea258210f2243d801ca76ee3fad1f772cb74a7b67be4a |
|
MD5 | b437a7c7a9946a97a2fef987e93b35b4 |
|
BLAKE2b-256 | 0f254a051b5111dcfcf09b145d0cce6471d218693302d1c35d4dfc6616241d03 |