PYPI PACKAGE DATA
Version 0.2.3
Author Aniket Vishwakarma
Owner TEAM EW-R&D
Python >=3.10
180-Day Downloads 594
EmotionWeb / Documentation
Developer Documentation

Build personal websites with Python.

EmotionWeb is a Python package for generating personalized surprise websites from reusable templates. Provide the occasion, recipient, message, images and captions — then let the generator create the website.

01 / INTRODUCTION

Welcome to EmotionWeb.

EmotionWeb brings together software development and personalized digital experiences.

Instead of manually rebuilding a similar website every time you want to create a personalized experience, you can provide the required information to EmotionWeb and generate a website from a reusable template.

Philosophy

Engineering on the surface. Emotion at the core.

This documentation explains the package from installation and first use to the public API, template system and internal generation flow.

02 / CONCEPT

What is EmotionWeb?

EmotionWeb is an open-source Python library designed to automate the generation of personalized event and surprise websites.

The developer supplies information such as a recipient name, message, occasion type, images and captions. EmotionWeb processes that data through its website-generation system and applies the selected template.

Why does it exist?

Personalized websites often contain the same basic development work repeatedly:

  • HTML structure
  • CSS styling
  • JavaScript behaviour
  • image and static-resource handling
  • personalized content placement

EmotionWeb attempts to make this repetitive process reusable through templates and programmatic generation.

03 / FEATURES

What EmotionWeb provides.

01

Template-based generation

Generate different personalized experiences using reusable website templates.

02

Dynamic content

Personal information such as names and messages can be supplied through the Python API.

03

Image support

Multiple image paths can be supplied to a generated website.

04

Captions

Captions can accompany the supplied image collection.

05

Python integration

The package can be used directly from a Python program through the Surprise API.

06

Django-powered generation

The website generation engine uses Django's template system as part of the generated web application.

04 / INSTALLATION

Installation.

EmotionWeb is distributed as a Python package. Install it using pip.

Terminal
pip install emotionweb

Verify the installation

After installation, Python can import the package and expose the Surprise class.

Python
from emotionweb import Surprise
Environment

The package currently requires Python 3.10 or newer.

05 / QUICK START

Your first EmotionWeb website.

The basic workflow is simple: import Surprise, provide the required information, then call generate().

Python
from emotionweb import Surprise

s = Surprise(
    type="birthday",
    name="Aniket Vishwakarma",
    message="chal aaja ghumne chalte h",
    images=[
        r"C:\Users\DELL\Desktop\EmotionWeb\webengine\static\uploads\img7.jpeg",
        r"C:\Users\DELL\Desktop\EmotionWeb\webengine\static\uploads\img8.jpeg",
        r"C:\Users\DELL\Desktop\EmotionWeb\webengine\static\uploads\img6.jpeg",
        r"C:\Users\DELL\Desktop\EmotionWeb\webengine\static\u uploads\img5.jpeg",
    ],
    caption=[
        "The solo travel that teaches me everything ❤️",
        "This travel shows a different path of Bihar ❤️",
        "And this one is closest to heart because its my Varanasi yaar ❤️",
        "Very best view ❤️",
    ]
)

s.generate()

What happened here?

  1. Python imports Surprise from EmotionWeb.
  2. A Surprise object is created with the personalized data.
  3. The selected type determines the occasion/template path used by the package.
  4. Images and captions are supplied as collections.
  5. generate() starts the website generation process.
06 / API

Surprise API.

The primary public interface is the Surprise class.

Surprise(type, name, message, images, caption)
Parameter Expected value Purpose
type string Selects the occasion/template type.
name string Name or recipient information used by the generated website.
message string Personalized message supplied to the selected template.
images list Image paths supplied to the generator.
caption list Captions supplied alongside the image collection.

type

The type value selects the occasion/template used for generation.

Python
type="birthday"

name

The name parameter contains the recipient or primary personalized name.

Python
name="Aniket Vishwakarma"

message

The message contains the personalized text that is passed to the selected template.

images

Images are provided as a Python list containing file paths.

caption

Captions are also supplied as a list. The selected template can use these values while rendering the generated website.

Important

Keep image and caption collections logically aligned when a template expects one caption for each image.

07 / OCCASIONS

Supported occasions.

EmotionWeb is built around reusable occasion templates. The currently documented occasion types are:

birthday

Birthday

A personalized birthday experience driven by the supplied recipient data, message, images and captions.

love

Love

A romantic personalized experience using the same generation interface.

loveletter

Love Letter

A letter-oriented personalized experience.

anniversary

Anniversary

An anniversary-focused personalized website generated from supplied data.

apology

Apology

A personalized apology-oriented experience.

farewell

Farewell

A farewell-focused personalized website.

teachers_day

Teacher's Day

A Teacher's Day experience using personalized content.

extensible

More themes

EmotionWeb is designed to accommodate additional themes and templates as the package evolves.

Documentation rule

This list represents the currently documented types. New EmotionWeb themes should be added here when they become part of the actual package.

08 / MEDIA

Images & captions.

EmotionWeb accepts image paths through the images parameter.

Python
images=[
    r"C:\path\to\photo1.jpeg",
    r"C:\path\to\photo2.jpeg",
    r"C:\path\to\photo3.jpeg",
]

Captions

Captions are provided through the caption list.

Python
caption=[
    "First memory ❤️",
    "One of my favourite moments ❤️",
    "A day I will always remember ❤️",
]

Windows paths

When using Windows paths in Python, raw strings such as r"C:\path\file.jpg" are useful because backslashes do not need to be escaped individually.

09 / INTERNAL FLOW

How EmotionWeb works.

At a high level, the package takes developer input, prepares the information required by the website, selects a template and generates the resulting web project.

Python code
EmotionWeb
Surprise
User data preparation
Template / web engine
HTML + CSS + JavaScript
Generated website
Browser

The role of the generator

The package's generator layer acts as the central processing point for the website generation workflow. It receives the supplied information and coordinates the generation process.

Django

Django is part of the web engine used by EmotionWeb. Its template system provides the mechanism for inserting dynamic values into HTML templates.

Template rendering

A template can contain dynamic Django expressions such as and can iterate over collections such as images or captions.

Django Template
10 / STRUCTURE

Project structure.

EmotionWeb uses a package and web-engine structure to keep Python generation logic separate from website resources.

Structure
emotionweb/
├── generator.py
├── webengine/
│   ├── ...
│   └── static/
│       └── uploads/
└── ...
Source of truth

The exact repository structure can evolve between package versions. The repository should therefore be treated as the final authority when documenting individual internal files.

11 / TEMPLATES

Template system.

Templates define the visual and structural experience produced for an occasion.

The important distinction is that the content is dynamic, while the template provides the website structure and presentation.

Dynamic name

Django

Dynamic message

Django

Image collection

Django

Caption collection

Django
12 / CUSTOMIZATION

Customization.

EmotionWeb separates personalized data from the website template so that the same generation interface can be used with different content.

Change the recipient

Python
name="Your Name"

Change the message

Python
message="Your personalized message"

Change the occasion

Python
type="birthday"

Images and captions can similarly be replaced with your own collections.

13 / ADVANCED

Advanced usage.

Advanced users can work with the package's template and web-engine architecture to understand or extend generated experiences.

Template-driven development

A developer who wants to introduce a new website experience needs to understand the relationship between the occasion type, generator logic and Django template.

Extending the template collection

A new template generally requires more than simply creating an HTML file. The generator needs a way to recognize the corresponding occasion type and route the data to the intended template.

Before extending

Inspect the current package source before modifying internal routing or template selection. Internal filenames and paths can change between releases.

14 / TROUBLESHOOTING

Troubleshooting.

ImportError

If Python cannot import EmotionWeb, verify that the package is installed in the Python environment being used to execute the program.

pip installation problems

Check the Python and pip installation being used by your terminal and ensure the package installation completes successfully.

Images are not appearing

Check that every supplied image path points to the intended file and that the file exists.

Captions are not displayed correctly

Verify that captions are supplied as a list and that the selected template actually uses the caption data.

Template selection

Check the exact value supplied to type. It must correspond to a supported template type in the installed EmotionWeb version.

Debugging principle

When troubleshooting, first verify the Python input, then the selected type, then the generated project and finally the browser output.

15 / FAQ

Frequently asked questions.

Do I need to know Django?

No for basic usage. The main public interface is the Python Surprise class. Django becomes more relevant when working with the underlying generated web engine or templates.

Can I provide multiple images?

Yes. The images parameter accepts a list of image paths.

Can I provide multiple captions?

Yes. Captions are supplied through the caption list.

Can I create another theme?

The architecture is intended to be extensible, and additional templates can be introduced as the project evolves.

Does EmotionWeb generate the website from Python?

Yes. The package is designed to receive information through Python and generate the corresponding personalized website.

What is the simplest possible example?

Python
from emotionweb import Surprise

s = Surprise(
    type="birthday",
    name="Aniket Vishwakarma",
    message="chal aaja ghumne chalte h",
    images=[],
    caption=[]
)

s.generate()