Python API Wrapper for https://pfp.lgbt/
Project description
pfp_lgbt.py
Python API Wrapper for https://pfp.lgbt/
Respects rate limits.
Installing
To install the library you can run te following command
python3 -m pip install pfp_lgbt.py
Documentation
You can find the documentation on this repo's wiki.
Examples
List the names of all available flags.
import pfp_lgbt
client = pfp_lgbt.Client()
flags = client.flags()
for flag in flags:
print(flag.name)
Create a static image from URL, and manually save the bytes as file
import pfp_lgbt
client = pfp_lgbt.Client()
flag = pfp_lgbt.Flag(name='nb') # Non-binary flag
# `Result` becomes bytes of result image
result = client.imageStatic('https://i.imgur.com/Ypw5pca.png', 'square', 'solid', flag)
with open('result.png', 'wb') as resfile:
resfile.write(result)
Create animated image from URL, and save it to output file
import pfp_lgbt
client = pfp_lgbt.Client()
flag = pfp_lgbt.Flag(name='nb') # Non-binary flag
_ = client.imageAnimated('https://i.imgur.com/Ypw5pca.png', 'square', flag, output_file='output.gif')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pfp_lgbt-1.0.1.tar.gz
(8.7 kB
view hashes)