All Projects → Ovyerus → deeppyer

Ovyerus / deeppyer

Licence: MIT License
Image deepfryer written in Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to deeppyer

mqttools
MQTT version 5.0 client and broker using asyncio
Stars: ✭ 44 (+22.22%)
Mutual labels:  asyncio
trualias
Mentally computable verification codes for email aliases implemented as a postfix tcp table or milter; uses asyncio.
Stars: ✭ 33 (-8.33%)
Mutual labels:  asyncio
aiounittest
Test python asyncio-based code with ease.
Stars: ✭ 53 (+47.22%)
Mutual labels:  asyncio
memoize
Caching library for asynchronous Python applications.
Stars: ✭ 53 (+47.22%)
Mutual labels:  asyncio
website
PySlackers website for invites and learning resources
Stars: ✭ 61 (+69.44%)
Mutual labels:  asyncio
aiorwlock
Read/Write Lock - synchronization primitive for asyncio
Stars: ✭ 90 (+150%)
Mutual labels:  asyncio
snekcord
A work-in-progress Discord API wrapper written in Python.
Stars: ✭ 15 (-58.33%)
Mutual labels:  asyncio
dvhb-hybrid
A package to mix django and asyncio in one application
Stars: ✭ 45 (+25%)
Mutual labels:  asyncio
aioaria2
An async/await wrapper around aria2-json-rpc with websocket support
Stars: ✭ 20 (-44.44%)
Mutual labels:  asyncio
aioprometheus
A Prometheus Python client library for asyncio-based applications
Stars: ✭ 114 (+216.67%)
Mutual labels:  asyncio
fastapi-users
Ready-to-use and customizable users management for FastAPI
Stars: ✭ 1,920 (+5233.33%)
Mutual labels:  asyncio
distex
Distributed process pool for Python
Stars: ✭ 101 (+180.56%)
Mutual labels:  asyncio
nardis
A small web framework based on ASGI
Stars: ✭ 14 (-61.11%)
Mutual labels:  asyncio
telecharm-userbot
A powerful, cool and well-made userbot for your Telegram profile, with promising extension capabilities.
Stars: ✭ 17 (-52.78%)
Mutual labels:  asyncio
python-insteonplm
Python 3 asyncio module for interfacing with Insteon Powerline modems
Stars: ✭ 34 (-5.56%)
Mutual labels:  asyncio
asynchronous
A D port of Python's asyncio library
Stars: ✭ 35 (-2.78%)
Mutual labels:  asyncio
asyncqlio
A fully async ORM for Python 3.5+
Stars: ✭ 25 (-30.56%)
Mutual labels:  asyncio
pomp
Screen scraping and web crawling framework
Stars: ✭ 61 (+69.44%)
Mutual labels:  asyncio
i2plib
🐍 i2plib: A modern asynchronous library for building I2P applications
Stars: ✭ 23 (-36.11%)
Mutual labels:  asyncio
py17track
📦 A simple API to track package info from 17track.com
Stars: ✭ 20 (-44.44%)
Mutual labels:  asyncio

deeppyer

PyPI
banner image

deeppyer is an image deepfryer written in Python using Pillow and OpenCV.

NOTE: This requires at least Python v3.6 in order to run.

How to use

You can either use deeppyer as a module, or straight from the command line.

Command line usage

$ python deeppyer.py -h

usage: deeppyer.py [-h] [-v] [-o OUTPUT] [-f] FILE

Deepfry an image.

positional arguments:
  FILE                  File to deepfry.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         Display program version.
  -o OUTPUT, --output OUTPUT
                        Filename to output to.
  -f, --flares          Try and detected faces for adding lens flares.

By default, flares will try to be added to the image, unless you're using the CLI script, in which case it is off by default.

Program usage

from PIL import Image
import deeppyer, asyncio

async def main():
    img = Image.open('./foo.jpg')
    img = await deeppyer.deepfry(img)
    img.save('./bar.jpg')

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

API Documentation

async deepfry(img: Image, type=DeepfryTypes.RED, *, flares: bool = True)

Deepfry a given image.

Arguments

  • img (PIL.Image) - Image to apply the deepfry effect on.
  • [type] (DeepfryTypes) - Colours to apply on the image.
  • *[flares] (bool) - Whether or not to try and detect faces for applying lens flares.

Returns: PIL.Image - Deepfried image.

Why?

¯\_(ツ)_/¯ Why not

Contributing

If you wish to contribute something to this, go ahead! Just please make sure to format it with flake8 + isort, and that the test(s) pass fine.

Testing

Simply run tests/test.py and make sure that all the images output properly.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].