Skip to main content

Python client for Ephoto360.com image generation effects.

Project description

Ephoto360

Python client for Ephoto360.com — scrapes and generates text/logo effect images. No API key needed.


I hope a STAR ⭐ from you 😊.

Installation

pip install requests beautifulsoup4 fake-useragent

Setup

Simple setup:

from Ephoto360 import Ephoto360

client = Ephoto360()

Use it as a context manager if you want the session cleaned up automatically:

with Ephoto360() as client:
    ...

Generating an image

result = client.create(
    slug="/create-a-blackpink-style-logo-with-members-signatures-810.html",
    texts=["My Band"],
)

if result.ok:
    print(result.url)          # image URL
    result.save("output.jpg")  # download
else:
    print(result.error)

Picking a style

Every effect has a radio0[radio] group (and sometimes radio1[radio] too and one has radio2[radio] too.). Pass a styles dict to pin specific ones:

result = client.create(
    slug="/create-a-blackpink-style-logo-with-members-signatures-810.html",
    texts=["My Band"],
    styles={"radio0[radio]": "Jennie"},
)

For effects with two radio groups & When an effect requires 3 texts ( as ["a", "b", "c"] ) but only one is given, so two other "?" will be appended to the texts list:

result = client.create(
    slug="/free-retro-neon-text-effect-online-538.html",
    texts=["RETRO"],
    styles={
        "radio0[radio]": "Bg 3",
        "radio1[radio]": "Style 2",
    },
)

Leave styles out and the first available option is used. Pass random_style=True if you want a random pick instead:

result = client.create(slug, ["Hello"], random_style=True)

Browsing the catalogue

# all effects, alphabetically
for effect in client.list_effects():
    print(effect.slug)
    print(effect.name)
    print(effect.text_count, "text field(s)")
    print(effect.radio_keys)   # e.g. ['radio0[radio]', 'radio1[radio]']

# search by name or slug
results = client.search("neon")
results = client.search("blackpink")

# grab one directly — full slug or just the numeric tail works
info = client.get_effect("/create-a-blackpink-style-logo-with-members-signatures-810.html")
info = client.get_effect("810")   # same thing

# random effect
effect = client.random_effect(require_radio=True)

Inspecting an effect

info = client.get_effect("810")

print(info.name)           # "Create A Blackpink Style Logo With Members Signatures"
print(info.text_labels)    # ['Your text*']
print(info.style_labels)   # ['Jennie', 'Jisoo', 'Lisa', 'Rose']

# all options for a specific radio group
for style in info.options_for("radio0[radio]"):
    print(style.label, style.thumb)

# lookup by label (case-insensitive)
style = info.option_by_label("radio0[radio]", "lisa")

# lookup by position
style = info.option_by_index("radio0[radio]", 2)   # third option

Generating all styles

Iterates every radio0 option and returns one result per style. Good for previewing what an effect looks like across all variants.

results = client.create_all_styles(
    slug="/create-a-blackpink-style-logo-with-members-signatures-810.html",
    texts=["My Band"],
)

for r in results:
    if r.ok:
        r.save(f"{r.style}.jpg")

Some effects have a lot of options (the LoL one has 322) LOL. Use limit to avoid firing hundreds of requests:

results = client.create_all_styles(slug, ["My Band"], limit=10)

If the effect also has radio1, pin it while iterating radio0:

results = client.create_all_styles(
    slug="/free-retro-neon-text-effect-online-538.html",
    texts=["RETRO"],
    radio1_label="Style 2",
    limit=6,
)

Batch

results = client.batch_create([
    {
        "slug": "/create-a-blackpink-style-logo-with-members-signatures-810.html",
        "texts": ["Alice"],
        "styles": {"radio0[radio]": "Jennie"},
    },
    {
        "slug": "/free-retro-neon-text-effect-online-538.html",
        "texts": ["RETRO"],
        "random_style": True,
    },
])

Runs sequentially. No concurrency — the site rate-limits aggressively enough that threading causes more problems than it solves.


CreationResult fields

Field Type Notes
ok bool False means something went wrong
url str Remote image URL (only when ok is True)
styles dict[str,str] Maps radio key → label that was applied
style str Shorthand for styles["radio0[radio]"]
slug str Effect slug used
error str Populated only when ok is False

Retry and timeout settings

client = Ephoto360(
    retry_count=5,    # attempts before giving up (default 3)
    retry_delay=2.0,  # seconds between retries (default 1.5)
    timeout=60.0,     # per-request timeout in seconds (default 30)
)

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

ephoto360-0.1.0.tar.gz (288.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ephoto360-0.1.0-py3-none-any.whl (305.7 kB view details)

Uploaded Python 3

File details

Details for the file ephoto360-0.1.0.tar.gz.

File metadata

  • Download URL: ephoto360-0.1.0.tar.gz
  • Upload date:
  • Size: 288.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for ephoto360-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e97e6a862be7cc416d966b70aa741c516f8443f33e23db9d504473f9de9b47c
MD5 77204b87ae9d21e3d6819b61f53ec592
BLAKE2b-256 7077ec56be9447422d85a291c48c48e53c82489002440193ffb171236c6de903

See more details on using hashes here.

File details

Details for the file ephoto360-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ephoto360-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 305.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for ephoto360-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cb62845ad9940b2cc93c3011fd828ba7e8b59853d1212b8a7983711d3336157
MD5 2b221bd0b8744be3469c15b5abff4b9a
BLAKE2b-256 fb6a2500ea612157c9f2dc48c1f0b9d1909c7a2d14e17a8870c4c79d7ecbcae1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page