Skip to main content

Python API Wrapper for https://pfp.lgbt/

Project description

pfp_lgbt.py

Master Codacy Badge

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 details)

Uploaded Source

Built Distribution

pfp_lgbt-1.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file pfp_lgbt-1.0.1.tar.gz.

File metadata

  • Download URL: pfp_lgbt-1.0.1.tar.gz
  • Upload date:
  • Size: 8.7 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

Hashes for pfp_lgbt-1.0.1.tar.gz
Algorithm Hash digest
SHA256 de276c6c262a937f72632e10fe1e5c51fc9f11358733fb378fc127815c345740
MD5 ddfa77c24df4e1f45341c967f7739071
BLAKE2b-256 a40ab15ab4ee809945d11cff67b4f988d7a62e5646ed628b376c47ddb14b2bc2

See more details on using hashes here.

File details

Details for the file pfp_lgbt-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pfp_lgbt-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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

Hashes for pfp_lgbt-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8ed9be5c2f25610eefc7f97b58b12025f98eb2a3860fb3ad89ff5a99cb86693
MD5 cfa8c9e743c69d102588bff361eecfc2
BLAKE2b-256 7ce03f6199d853858cd2771078fa8e07b2dedb53e5dd6affc00f072088ca69c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page