Configure request params such as text, color, size etc. And then download the image

Related tags

Miscellaneous demapi
Overview

DemAPI

Make customizable demotivators and motivators through imgonline.com.ua API. Supports async-await style

Example


Documentation: Later


Coverage Status

Overview

Configure request params such as text, color, size etc. And then download the image. Optionally save to dick otherwise use image.content for raw bytes object

import demapi


conf = demapi.Configure(
    base_photo=base_path / "example_source.png",
    title="Demotivator title",
    explanation="Demotivator explanation (the second line)"
)
image = conf.download()
image.save(base_path / "example.png")

Installation

Install the latest version through github:

python -m pip install https://github.com/deknowny/demapi/archive/main.zip

Contributing

Check out CONTRIBUTING.md

You might also like...
to learn how to do pull request and do contribution to other's repo
to learn how to do pull request and do contribution to other's repo

Hacktoberfest-2021 - open-source-contribution An Open Source repository to Teach people How to contribute to open sources. 💥 🔥 JOIN PVX PROGRAMMING

A Python package to request and process seismic waveform data from Hi-net.

HinetPy is a Python package to simplify tedious data request, download and format conversion tasks related to NIED Hi-net. NIED Hi-net | Source Code |

Creates a release pull request updating changelog and tags with standard-version

standard version release branch Github action to open releases following convent

Analyzes crypto candles over a set time period and then trades based on winning patterns found

patternstrade Analyzes crypto candles over a set time period and then trades based on winning patterns found. Heavily customizable. Warning: This was

This Python3 script will monitor Upwork RSS feed and then email you the results.
This Python3 script will monitor Upwork RSS feed and then email you the results.

Upwork RSS Parser This Python3 script will monitor Upwork RSS feed and then email you the results. Table of Contents General Info Technologies Used Fe

The learning agent learns firstly approaching to the football and then kicking the football to the target position

Football Court This project utilized Pytorch and Tensorflow so that the learning agent learns firstly approaching to the football and then kicking the

Request ID propagation for ASGI apps

ASGI Correlation ID middleware Middleware for loading and receiving correlation IDs from request HTTP headers, and making them available in applicatio

Block when attacker want to bypass the limit of request

Block when attacker want to bypass the limit of request

Scientific color maps and standardization tools
Scientific color maps and standardization tools

Scicomap is a package that provides scientific color maps and tools to standardize your favourite color maps if you don't like the built-in ones. Scicomap currently provides sequential, bi-sequential, diverging, circular, qualitative and miscellaneous color maps. You can easily draw examples, compare the rendering, see how colorblind people will perceive the color maps. I will illustrate the scicomap capabilities below.

Comments
  • Bug in coroutine_download.

    Bug in coroutine_download.

    Hello! I found a strange bug in async download function: when you pass only title and use coroutine_download, the library adds "None" as explanation.

    Environment:

    • Python 3.9.7.
    • demapi==0.1.5

    How to reproduce: Just run the code below (https://pastebin.com/6C0vvHMP) and check output files (out.jpg and out_sync.jpg).

    import demapi, requests, asyncio
    
    async def main():
    	image = requests.get("https://sun9-63.userapi.com/impg/pK7j2uRLivAOd1KhavTnxnRL8e7uvRWjeQ0myw/ayRQEL7vFRc.jpg?size=1620x2160&quality=96&sign=6fc8ff6f55ebcbd8d3a23868dbac208a&c_uniq_tag=-ZDQbSYkKmBg6pag12EGaQqqkCufwmST3NfkyBahtt0&type=album").content
    
    	title_size = demapi.Size.BIG
    	title_color = demapi.Color.YELLOW
    	picture_type = demapi.PictureType.DEMOTIVATOR
    	title = "Python Hacker"
    
    	r = demapi.Configure(base_photo=image, title_color=title_color, title_size=title_size, picture_type=picture_type, title=title, jpeg_quality=100)
    
    	res = await r.coroutine_download()
    	res.save("out.jpg")
    	
    	res2 = r.download()
    	res2.save("out_sync.jpg")
    
    asyncio.run(main())
    

    How can I solve it?

    opened by GreatAndreyKa 2
Releases(v0.1.6)
Owner
Create bots and web servers on Python
null
TB Set color display - Add-on for Blender to set multiple objects and material Display Color at once.

TB_Set_color_display Add-on for Blender with operations to transfer name between object, data, materials and action names Set groups of object's or ma

null 1 Jun 1, 2022
Donatus Prince 6 Feb 25, 2022
Print 'text color' and 'text format' on Term with Python

term-printer Print 'text color' and 'text format' on Term with Python ※ It may not work depending on the OS and shell used. PIP $ pip install term-pri

ななといつ 10 Nov 12, 2022
Provides guideline on how to configure pre-commit hooks in your own python project

Pre-commit Configuration Guide The main aim of this repository is to act as a guide on how to configure the pre-commit hooks in your existing python p

Faraz Ahmed Khan 2 Mar 31, 2022
Convert text with ANSI color codes to HTML or to LaTeX.

Convert text with ANSI color codes to HTML or to LaTeX.

PyContribs 326 Dec 28, 2022
An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies.

miniFASTA An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies. Installation Using pip /

Jules Kreuer 3 Jun 30, 2022
Estimate the Market Size for Electic and Plug-In Hybrid Vehicles In Africa

Estimate the Market Size for Electic and Plug-In Hybrid Vehicles In Africa The goal of this repository is to use open data repositories to answer the

Leonce Nshuti 0 Feb 21, 2022
Simple logger for Urbit pier size, with systemd timer template

urbit-piermon Simple logger for Urbit pier size, with systemd timer template. Syntax piermon.py -i [PATH TO PIER] -o [PATH TO OUTPUT CSV] systemd serv

null 1 Nov 7, 2021
GitHub Actions Version Updater Updates All GitHub Action Versions in a Repository and Creates a Pull Request with the Changes.

GitHub Actions Version Updater GitHub Actions Version Updater is GitHub Action that is used to update other GitHub Actions in a Repository and create

Maksudul Haque 42 Dec 22, 2022
Utility to play with ADCS, allows to request tickets and collect information about related objects

certi Utility to play with ADCS, allows to request tickets and collect information about related objects. Basically, it's the impacket copy of Certify

Eloy 185 Dec 29, 2022