A Python wrapper for the CoolText.com image generation API
Project description
pycooltext-api
A Python wrapper for the CoolText.com image generation API.
Build typed payloads, post to CoolText's /PostChange endpoint, and get back a
rendered image URL — all in a few lines of code.
Installation
pip install pycooltext-api
Quick Start
from cooltext import CoolText, PostChangeConfigOptions
config = PostChangeConfigOptions(LogoID="732440996", Text="Hello World")
result = CoolText(config).create()
print(result) # prints the image URL
result.download() # saves the image locally
Browse Available Logos
Visit https://thehritu.github.io/CoolText/ to browse all available logo styles and their IDs.
Configuration
PostChangeConfigOptions accepts these fields:
| Field | Type | Default | Description |
|---|---|---|---|
LogoID |
str |
required | ID of the CoolText logo style |
Text |
str |
"Cool Text" |
Text to render |
FontSize |
str |
"70" |
Font size |
FileFormat |
str |
"PNG" |
Output format |
BackgroundColor_color |
str |
"FFFFFF" |
Background colour (hex) |
Color1_color |
str |
None |
Primary text colour |
Color2_color |
str |
None |
Secondary colour |
Boolean1–Boolean3 |
str |
None |
Logo-specific toggles |
Integer1–Integer14_color |
str |
None |
Logo-specific numeric options |
CoolTextResult
CoolText.create() returns a CoolTextResult object:
result = CoolText(config).create()
str(result) # the image URL as a string
bool(result) # False if the request failed
result.download() # save to current directory
result.download("out.png") # save to a specific path
result.download("out.png", stream=False) # disable streaming
Finding a Logo ID
Go to https://thehritu.github.io/CoolText/ — every logo is listed with its ID and default configuration values.
Links
- GitHub: https://github.com/TheHritu/CoolText
- Logo ID List: https://thehritu.github.io/CoolText/
- PyPI: https://pypi.org/project/pycooltext-api/
License
MIT © TheHritu
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycooltext_api-0.1.2.tar.gz.
File metadata
- Download URL: pycooltext_api-0.1.2.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f888e46e83af46b32082e532cec9feccbf2f774f510872334a0155f7894eb5d6
|
|
| MD5 |
10105bbfddabbe8f6f2765b14fceeacb
|
|
| BLAKE2b-256 |
3b2080deb781dba26bfb63db1404c7cf760cae0167c66e949463b2d1fb618167
|
File details
Details for the file pycooltext_api-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pycooltext_api-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a4ace51d50c3663067a2edde53d58477677ceb56ac9cf570a9b20e3eb1da9db
|
|
| MD5 |
3d0c00c4998779326610ed920dda85b6
|
|
| BLAKE2b-256 |
7eb9ce0b35dbe75a09955fd4f97d897739a3c1ae032c351634728e463e94360a
|