Skip to main content

PyPI version Python License

splashscreen-engine

A module for making Splash Screens with videos, images, loading bars, text rendering, and threaded rendering support for your Applications.

Sample Preview

You can find these template codes here: Templates

Template 1

Template 3

Template 2

Template 4

Features

  • Optional Title Bar
  • Dynamic Window Resizing
  • Fullscreen Support
  • Background videos
  • Background images
  • Video-powered loading bars
  • Text rendering
  • Transparency support
  • Threaded rendering
  • Video looping
  • Simple API

Installation

pip install splashscreen-engine

Quick Start

import splashscreen_engine as splash

screen = splash.Screen()

screen.start()

video = splash.BackgroundVideo(
    screen,
    "video.mp4"
)

video.play()

screen.wait(5)

screen.stop()

Requirements

These Modules are automatically installed with : pip install splashscreen-engine

  • pygame
  • opencv-python
  • numpy

Functions

Basic Window

import splashscreen_engine as splash

screen = splash.Screen()

screen.size(750, 500)

screen.start()

Stop and Delete Screen

screen.stop()

# Use:
screen.stop(quit_pygame=False)

# if you are using pygame in your own application.

Set Size for your window

screen.size(750,500)

# Arguments:
# width, height, fullscreen

# OR

screen.size(fullscreen=True)

Set title for your window

screen.title("Your Title")

Set Background color

screen.set_bg_color((255,0,0)) # Red

Get Window Size

width,height = screen.get_size()

Window with Title bar (optional)

A title bar is the top bar of a window. It usually contains:

  • window title
  • close button
  • minimize button
  • maximize button
  • Note : Clicking on Maximize / Minimize button automatically resizes the screen

Preview

To create a Title Bar

screen = splash.Screen(title_bar=True)

Functions for Title Bar

Adding an Icon
screen.set_icon("YourIcon.png")
To Check if the user clicked on X button
screen.is_quit()
To check if the user pressed Esc Key during fullscreen
screen.is_escaped()
Note : These functions are only applicable when title_bar = True else it will raise an error.

Wait Function

Instead of using time.sleep(), you can use this function because it prevents the window not responding issue.

screen.wait(0.5) # Seconds

Background Video

You can add a video as the background of your splash screen using this function.

video = splash.BackgroundVideo(
    screen,
    "exampleVid.mp4",
    fps=30,
    loop=True
)

# loop = True / False
# default(False)

# fps = int
# default(30)

Play video

video.play()

Pause video

video.pause()

Resume video

video.resume()

Delete video

video.delete()

Transparency

Make your video transparent.

Transparency Level: 0 to 255

Default: 120

video.transparency(150)

Stop Transparency

video.stop_transparency()

Stopping / Resuming Video Loops

# Loop Video
video.loop = True

# Stop the Loop
video.stop_loop()

# OR
video.loop = False

To check whether the video is playing or stopped

# Returns True if playing else False
video.playing()

Background Image

You can add an image as the background of your splash screen using this function.

bg_img = splash.BackgroundImage(
    screen,
    "YourImage.png"
)

bg_img.set()

Progress Bar

This function adds a progress bar.

bar = splash.LoadingBar(
    screen,
    position="down",
    add_xy=(0,-50)
)

# Arguments:
# parent, width, height,
# position, add_xy

bar.place()

# Arguments:
# colour, loading_colour

Video Loading Bar

You can use videos inside the loading area of the progress bar.

video_bar = splash.LoadingBar(screen,width=500,height=25)
video_bar.set_video("Examplevideos/BarVid.mp4")

video_bar.place()

The video automatically fills according to:

video_bar.set_progress(value)

This creates animated loading effects inside the progress bar.

Available Positions

"center"
"right"
"left"
"up"
"down"

Hiding the Progress Bar

bar.hide()

Setting Progress

bar.set_progress(50)

Text

Adds text on the screen.

text = splash.Text(
    screen,
    "Loading...",
    "impact",
    20,
    position="center",
    add_xy=(0,0)
)

# Arguments:
# parent, text, font,
# size, position,
# add_xy, colour

text.show()

Available Positions

"center"
"right"
"left"
"up"
"down"

Show and Hide text

# Show text
text.show()

# Hide text
text.hide()

Edit The Text | Supports Dynamic Editing

This allows you to edit the text dynamically.

Example: Changing: f"Loading {i}%" inside loops.

text.edit(
    text = "New Loading Text Added",
    font = "IMPACT",
    new_size = 20,
    position = "center",
    add_xy = (0,0),
    colour = (0,255,0)
)

add_xy Argument

add_xy allows you to move objects relative to their selected position.

Structure:

add_xy = (x,y)
Value Meaning
Positive x Move Right
Negative x Move Left
Positive y Move Down
Negative y Move Up

Example:

text = splash.Text(
    screen,
    "Loading...",
    position="center",
    add_xy=(0,-100)
)

This places the text:

  • Horizontally centered
  • 100 pixels above the center

Getting Documentation

documentation = splash.Documentation()

Opening Documentation

This opens README.md file on Github

documentation.open()

Contact Details

This prints all the contact details

documentation.contact()

Contributing & Feedback

Discuss approaches, suggest new features, report bugs, or share improvements through GitHub issues and discussions.

Mail:

chhabranaman21@gmail.com

PyPI:

https://pypi.org/project/splashscreen-engine


Keywords

pygame, splash screen, loading screen, opencv, video rendering, python GUI, pygame framework, splashscreen, animated loader, desktop application, threaded rendering


Metadata

Release files for splashscreen-engine 2.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splashscreen-engine 2.0.8
File Size Uploaded Provenance Actions
splashscreen_engine-2.0.8.tar.gz 12.3 kB Without provenance Details for splashscreen_engine-2.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for splashscreen-engine 2.0.8
File Interpreter ABI Platform Actions
splashscreen_engine-2.0.8-py3-none-any.whl Python 3 none any Details for splashscreen_engine-2.0.8-py3-none-any.whl

Total release size: 24.1 kB

Release files / splashscreen_engine-2.0.8.tar.gz

Download URL splashscreen_engine-2.0.8.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d9cf6f4d8baed2cf91798bd433c6da5b49ace8738867eff34c0a76e4e5d9b218
BLAKE2b-256 checksum
How to use checksums
ea3c36b17bd99e6b2605d90df7645bd6d8f77a2cb407acd35131d0ec5e45a5ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / splashscreen_engine-2.0.8-py3-none-any.whl

Download URL splashscreen_engine-2.0.8-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e011598a663e5d038a25a3f75e0495129f465e77bfa9946e47428b71d227ffa3
BLAKE2b-256 checksum
How to use checksums
2eefac911625e019057ddc7aa45a9da5f63dc4f063e61be5400c0a62bc385f84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for splashscreen-engine 2.0.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page