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

Related tags

Miscellaneousdemapi
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
Feature engineering library that helps you keep track of feature dependencies, documentation and schema

Feature engineering library that helps you keep track of feature dependencies, documentation and schema

28 May 31, 2022
eyes is a Public Opinion Mining System focusing on taiwanese forums such as PTT, Dcard.

eyes is a Public Opinion Mining System focusing on taiwanese forums such as PTT, Dcard. Features 🔥 Article monitor: helps you capture the trend at a

Sean 116 Dec 29, 2022
Files for QMC Workshop 2021

QMC Workshop 2021 This repository contains the presented slides and example files for the Quantum Monte Carlo (QMC) Workshop 5 October - 23 November,

QMCPACK 39 Nov 04, 2022
Official repository for the BPF Performance Tools book

BPF Performance Tools This is the official repository of BPF (eBPF) tools from the book BPF Performance Tools: Linux and Application Observability. Th

Brendan Gregg 1.2k Dec 28, 2022
In this project , I play with the YouTube data API and extract trending videos in Nigeria on a particular day

YouTubeTrendingVideosAnalysis In this project , I played with the YouTube data API and extracted trending videos in Nigeria on a particular day. This

1 Jan 11, 2022
Never get kicked for inactivity ever again!

FFXIV AFK Bot Tired of getting kicked from games due to inactivity? This Bot will make random movements in random intervals to prevent you from gettin

5 Jan 12, 2022
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Mahmoud Hashemi 6k Jan 06, 2023
Configure request params such as text, color, size etc. And then download the image

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

6 Aug 18, 2022
Python Freecell Solver

freecell Python Freecell Solver Very early version right now. You can pick a board by changing the file path in freecell.py If you want to play a game

Ben Kaufman 1 Nov 26, 2021
A wide AOI generator tool.

Dark Generator A wide AOI generator tool. Information Installation To Install you have to have python 3.x and pip installed on your system. If you hav

Darkest Surface 12 Dec 26, 2022
Plock : A stack based programming language

Plock : A stack based programming language

1 Oct 25, 2021
Compile Binary Ninja's HLIL IR to LLVM, for purposes of compiling it back to a binary again.

Compiles BinaryNinja's HLIL to LLVM Approach Sweep binary for global variables, create them Sweep binary for (used?) external functions, declare those

Kyle Martin 31 Nov 10, 2022
creates a batch file that uses adb to auto-install apks into the Windows Subsystem for Android and registers it as the default application to open apks.

wsa-apktool creates a batch file that uses adb to auto-install apks into the Windows Subsystem for Android and registers it as the default application

Aditya Vikram 3 Apr 05, 2022
Arabic to Roman Converter in Python

Arabic-to-Roman-Converter Made together with https://github.com/goltaraya . Arabic to Roman Converter in Python. -Instructions: 1 - Make sure you have

Pedro Lucas Tomazeti Fernandes 6 Oct 28, 2021
ChainJacking is a tool to find which of your Go lang direct GitHub dependencies is susceptible to ChainJacking attack.

ChainJacking is a tool to find which of your Go lang direct GitHub dependencies is susceptible to ChainJacking attack.

Checkmarx 36 Nov 02, 2022
PatZilla is a modular patent information research platform and data integration toolkit with a modern user interface and access to multiple data sources.

PatZilla is a modular patent information research platform and data integration toolkit with a modern user interface and access to multiple data sources.

IP Tools 68 Dec 14, 2022
Task dispatcher for Postgres

Features a task being ran as an OS process supports task queue with priority and process limit per node fully database driven (a worker and task can b

2 Dec 06, 2021
Personal Finance Forecaster - An AI tool for forecasting personal expenses

Personal Finance Forecaster - An AI tool for forecasting personal expenses

2 Mar 09, 2022
A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

MindSphere 3 Jun 03, 2022
Basic cryptography done in Python for study purposes

criptografia Criptografia básica feita em Python para fins de estudo Converte letras em numeros partindo do indice 0 e vice-versa A criptografia é fei

Carlos Eduardo 2 Dec 05, 2021