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 -U
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 |
FileFormat options:
FileFormat accepts these values:
| Value | Format |
|---|---|
1 |
GIF with background color (if BackgroundColor_color is provided) |
2 |
GIF (Transparent) |
3 |
GIF (Transparent With No Dither) |
4 |
JPG with background color (if BackgroundColor_color is provided) |
5 |
PNG with background color (if BackgroundColor_color is provided) |
6 |
PNG (Transparent) |
Get default configuration values for a logo:
Returns a dictionary of all default values for the given logo id
from cooltext import CoolText, PostChangeConfigOptions
config = PostChangeConfigOptions(LogoID="2975689126")
defaults = CoolText(config).get_defaults()
print(defaults)
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.
Search for logos by keyword:
Search for logos on cooltext.com by keyword:
from cooltext import CoolTextSearch
results = CoolTextSearch().search("gold") # list of CoolTextSearchResult
for result in results:
print(result.title, " - ", result.link)
print(result.to_dict()) # get title and link as a dictionary
CoolTextSearchResult
CoolTextSearch.search() returns a list of CoolTextSearchResult objects.
CoolTextSearchResult has these attributes:
title: The logo's title (e.g. "Gold Text")link: The URL to the logo's page on CoolText.com
CoolTextSearchResult has these methods:
to_dict(): Returns a dictionary with the title and link
from cooltext.modules import CoolTextSearchResult
result = CoolTextSearchResult("Gold Text", "https://cooltext.com/Logo-ID/1234567890")
print(result.title) # "Gold Text"
print(result.link) # "https://cooltext.com/Logo-ID/1234567890"
print(result.to_dict()) # {"title": "Gold Text", "link": "https://cooltext.com/Logo-ID/1234567890"}
CLI
First, install the extra dependency:
pip install rich
Usage
No arguments — launches an interactive prompt:
cooltext
Quick create — just pass your text directly:
cooltext "Hello World"
Pick a specific logo:
cooltext "Hello World" --logo 732453157
Save the image to a file:
cooltext "Hello World" --save output.png
Plain output (just the URL, no colors — useful for scripting):
cooltext "Hello World" --as-text
Search
Find logo styles by keyword:
cooltext search fire
cooltext search "neon" --limit 1
Add
--as-textto get plain line-by-line output instead of a table.
On Some OS
On some operating systems, the CLI may not be available as cooltext immediately after installation. If you encounter a "command not found" error, try running it with Python:
python -m cooltext "Hello World"
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
Metadata
Release files for pycooltext-api 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycooltext_api-0.1.5.tar.gz | 18.5 kB | Without provenance | Details for pycooltext_api-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycooltext_api-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for pycooltext_api-0.1.5-py3-none-any.whl |
Total release size: 35.5 kB
Release files / pycooltext_api-0.1.5.tar.gz
| Download URL | pycooltext_api-0.1.5.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d63c51e653ffe41436ff544b2072716934d9641416e51fc91ce3030e17759cb3
|
|
BLAKE2b-256 checksum How to use checksums |
a66e1a7d723c153d2fd5f0c6df2ee067639013307f63064831b24e65c7b896b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / pycooltext_api-0.1.5-py3-none-any.whl
| Download URL | pycooltext_api-0.1.5-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ca7fa10b59d691806062644def8b038fbdb8b9d8d751a5af490c82120ebd8c4
|
|
BLAKE2b-256 checksum How to use checksums |
b70b9cb1ec33909e485a4a8e9f75e216a0dc9f999b7d2d25814be6e8c9a3b71e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for pycooltext-api 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.