Python API Wrapper for https://pfp.lgbt/
Project description
pfp_lgbt.py
Asynchronous Python API Wrapper for https://pfp.lgbt/ Respects rate limits.
Installing
To install the library you can run the following command
pip3 install pfp_lgbt
Documentation
You can find the documentation on this repo's wiki.
Examples
List the names of all available flags.
import pfp_lgbt
async def example():
client = pfp_lgbt.Client()
flags = await client.flags()
for flag in flags:
print(flag.name)
await client.close()
Create a static image from URL, and manually save the bytes as file
import pfp_lgbt
async def example():
client = pfp_lgbt.Client()
flag = pfp_lgbt.Flag(name='nb') # Non-binary flag
# `Result` becomes bytes of result image
result = await client.imageStatic('https://i.imgur.com/Ypw5pca.png', 'square', 'solid', flag)
with open('result.png', 'wb') as resfile:
resfile.write(result)
await client.close()
Create animated image from URL, and save it to output file
import pfp_lgbt
async def example():
client = pfp_lgbt.Client()
flag = pfp_lgbt.Flag(name='nb') # Non-binary flag
_ = await client.imageAnimated('https://i.imgur.com/Ypw5pca.png', 'square', flag, output_file='output.gif')
client = await client.close()
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.2.tar.gz
(8.8 kB
view details)
Built Distribution
File details
Details for the file pfp_lgbt-1.0.2.tar.gz
.
File metadata
- Download URL: pfp_lgbt-1.0.2.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e68407626081fdb8ecf3f11ccafe960320c33c27de9dc5d3b33b477eb218c46 |
|
MD5 | 2bfe3f93327eacfc6d50d29ca3e398cf |
|
BLAKE2b-256 | 25ec5649fd00755bd2a737771efe6e1fc11738079283a1c5e5f0df154a1ecfe9 |
File details
Details for the file pfp_lgbt-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: pfp_lgbt-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99cdd28156cfcdeff75ec1c127465c19eebeb29ba411b214cf40bc2720eb1914 |
|
MD5 | c0dfa20bb186a2e5a42d1f0c52249e04 |
|
BLAKE2b-256 | eebf4273d4db799f80e8ba9323990a7a65b1630f32ffe5de04ac7d2d073ed7e3 |