from emotionweb import Surprise
The Surprise class is the public entry
point used to create an EmotionWeb experience.
EmotionWeb takes a simple Python API call, prepares your personalized content, and uses its Django-powered web engine to generate the final web experience.
generate()?
You import Surprise and provide
the occasion type, name, message, images and
captions.
The values supplied to the API become the content that will be used by the generated experience.
The selected type identifies the occasion experience that should be generated.
Messages, names, captions and supplied images are prepared for use by the generated website.
EmotionWeb uses Django as the web engine behind the generated experience and its templates.
Django templates can consume the supplied values and produce the corresponding web content.
The generated website is composed from the template and its web assets.
The generated web experience can then be opened and viewed in the browser.
from emotionweb import Surprise
s = Surprise(
type="birthday",
name="Aniket Vishwakarma",
message="chal aaja ghumne chalte h",
images=[
r"C:\path\to\img1.jpeg",
r"C:\path\to\img2.jpeg",
r"C:\path\to\img3.jpeg",
],
caption=[
"The solo travel that teaches me everything ❤️",
"This travel shows a different path ❤️",
"Very best view ❤️",
]
)
s.generate()
from emotionweb import Surprise
The Surprise class is the public entry
point used to create an EmotionWeb experience.
The type value determines which
occasion/template experience is requested.
name and message provide
the main personalized text for the generated
experience.
Image paths can be supplied through the
images parameter for the generated
experience.
The caption values provide text that
can accompany the supplied images.
s.generate()
Calling generate() starts the generation
process for the personalized web experience.
EmotionWeb is not only producing text or a static page. Its generated experience uses a Django-powered web engine to work with templates and dynamic content.