epitech_console

last update : PACKAGE = 2026-01-05 17:48 UTC+1(Paris) ; README = 2026-01-05 17:48 UTC+1(Paris)

Epite6ch logo Epitech Console logo

epitech_console v0.1.8.3

Latest development version 🟠 UNDER DEVELOPMENT 🟠 v0.1.9 🟠
Latest release 🟒 RELEASED 🟒 v0.1.8.3 🟒

Python package License: GPL v3 Stars

Description

epitech_console is a Python library designed to help you create enhanced terminal interfaces. It’s improving the appearance and readability of your command-line interface with lightweight animations, colorful text, and neat formatting. If you want to make your terminal programs more readable and visually structured, this library is for you!

Table of Contents

  1. Description
  2. Features
  3. Tech Stack
  4. Installation
  5. Usage
  6. Project Structure
  7. API Reference
  8. Release Notes
  9. License
  10. Important Links
  11. Footer

Features

Tech-Stack

Installation

To begin , install epitech_console:

Prerequisites:

Make sure you have Python 3.11 or newer installed on your computer. You can check your Python version by opening a terminal and typing python --version.

Open your terminal and run this command:

pip install epitech_console

This will automatically download and install the library from PyPI.

Install from GitHub:

If you want the latest version directly from the source, you can install it using git:

git clone -b latest https://github.com/Jarjarbin06/epitech_console.git
make -C epitech_console install

This downloads the code, then the install script handles the installation. These commands install the epitech_console package and its dependencies (datetime).

Usage

Here are some examples demonstrating how to use epitech_console:

Basic Text Formatting

from epitech_console.Text import Text
from epitech_console.ANSI import Color
from epitech_console import init, quit

init()

epitech_color = Color.epitech_fg() + Color.rgb_bg(0, 0 ,0)
reset = Color.color(Color.C_RESET)
my_text = epitech_color + Text("hi").bold() + reset

print(my_text)

quit(delete_log=True)

Creating an Animation

from epitech_console.Animation import Animation, BasePack
from epitech_console.System import Console
from epitech_console import init, quit

init()

my_animation = Animation(BasePack.P_FILL_R)
for i in range(5):
    Console.print(my_animation.render(delete=True), sleep=0.5)
    my_animation.update()

quit(delete_log=True)

Creating a custom Animation

from epitech_console.Animation import Animation
from epitech_console.System import Console
from epitech_console import init, quit

init()

my_animation = Animation(['Frame 1', 'Frame 2', 'Frame 3'])
for i in range(5):
    Console.print(my_animation.render(delete=True), sleep=0.5)
    my_animation.update()

quit(delete_log=True)

Using simple Progress Bar

from epitech_console.Animation import ProgressBar, Spinner
from epitech_console.System import Console
from epitech_console import init, quit

init()

my_spinner = Spinner.stick()
my_progress_bar = ProgressBar(length=20, percent_style="mix", spinner=my_spinner)
for i in range(101):
    my_progress_bar.update(percent=i, update_spinner=(i % 5 == 0))
    Console.print(my_progress_bar.render(delete=True), sleep=0.05)

quit(delete_log=True)

Using advanced Progress Bar with variable size

from epitech_console.Animation import ProgressBar, Style
from epitech_console.ANSI import Line
from epitech_console.System import Console
from epitech_console import init, quit

init()

style : Style = Style(on="=", off=" ", border_left="[", border_right="]")
bar : ProgressBar

for i in range(1001):
	bar = ProgressBar(len(Console) - 15, percent_style="mix", style=style)
	bar.update(i/10)
	Console.print(bar.render(delete=True), sleep=0.01, cut=True)

quit(delete_log=True)

Utilizing the Stopwatch

from time import sleep
from epitech_console.System import StopWatch
from epitech_console import init, quit

init()

my_stopwatch = StopWatch(start=True)
sleep(2)
my_stopwatch.stop()
print(f"Elapsed time: {my_stopwatch.elapsed()}")

quit(delete_log=True)

Create a config.ini file

from epitech_console.System import Config
from epitech_console import init, quit

init()

my_path = "."
if not Config.exist(my_path):
    my_config = Config(my_path, {
      "GENERALE" : {"theme": "dark", "language": "en"},
      "USER" : {"username": "guest", "email": "my_email@email.com"}
    }, file_name="my_config.ini")

quit(delete_log=True)

This will check and create a config.ini file if it doesn’t exist.

Project-Structure

REPO/
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ workflows/
β”‚   β”‚   β”œβ”€β”€ codeql.yml
β”‚   β”‚   └── test-package.yml
β”œβ”€β”€ epitech_console/
β”‚   β”œβ”€β”€ Animation/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ animation.py
β”‚   β”‚   β”œβ”€β”€ basepack.py
β”‚   β”‚   β”œβ”€β”€ progressbar.py
β”‚   β”‚   β”œβ”€β”€ spinner.py
β”‚   β”‚   └── style.py
β”‚   β”œβ”€β”€ ANSI/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ ansi.py
β”‚   β”‚   β”œβ”€β”€ basepack.py
β”‚   β”‚   β”œβ”€β”€ color.py
β”‚   β”‚   β”œβ”€β”€ cursor.py
β”‚   β”‚   └── line.py
β”‚   β”œβ”€β”€ Error/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   └── error.py
β”‚   β”œβ”€β”€ log/
β”‚   β”œβ”€β”€ System/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ action.py
β”‚   β”‚   β”œβ”€β”€ config.py
β”‚   β”‚   β”œβ”€β”€ console.py
β”‚   β”‚   β”œβ”€β”€ log.py
β”‚   β”‚   β”œβ”€β”€ setting.py
β”‚   β”‚   β”œβ”€β”€ stopwatch.py
β”‚   β”‚   └── time.py
β”‚   β”œβ”€β”€ Text/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ format.py
β”‚   β”‚   └── text.py
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── config.ini
β”œβ”€β”€ script/
β”‚   β”œβ”€β”€ auto-reload-package
β”‚   β”œβ”€β”€ check-package
β”‚   β”œβ”€β”€ install-package
β”‚   β”œβ”€β”€ test-package
β”‚   └── uninstall-package
β”œβ”€β”€ source/
β”‚   β”œβ”€β”€ epitech_console_logo.png
β”‚   └── epitech_logo.png
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ tests Animation/
β”‚   β”‚   β”œβ”€β”€ test_animation_animation.py
β”‚   β”‚   β”œβ”€β”€ test_animation_basepack.py
β”‚   β”‚   β”œβ”€β”€ test_animation_progressbar.py
β”‚   β”‚   β”œβ”€β”€ test_animation_spinner.py
β”‚   β”‚   └── test_animation_style.py
β”‚   β”œβ”€β”€ tests ANSI/
β”‚   β”‚   β”œβ”€β”€ test_ansi_ansi.py
β”‚   β”‚   β”œβ”€β”€ test_ansi_basepack.py
β”‚   β”‚   β”œβ”€β”€ test_ansi_color.py
β”‚   β”‚   β”œβ”€β”€ test_ansi_cursor.py
β”‚   β”‚   └── test_ansi_line.py
β”‚   β”œβ”€β”€ tests Error/
β”‚   β”‚   └── test_error_error.py
β”‚   β”œβ”€β”€ tests System/
β”‚   β”‚   β”œβ”€β”€ test_system_action.py
β”‚   β”‚   β”œβ”€β”€ test_system_config.py
β”‚   β”‚   β”œβ”€β”€ test_system_console.py
β”‚   β”‚   β”œβ”€β”€ test_system_stopwatch.py
β”‚   β”‚   └── test_system_time.py
β”‚   └── tests Text/
β”‚   β”‚   β”œβ”€β”€ test_text_format.py
β”‚   β”‚   └── test_text_text.py
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ Makefile
β”œβ”€β”€ MANIFEST.in
β”œβ”€β”€ pyproject.toml
└── README.md

API-Reference

. = function ; + = class constructor ; _ = class method ; @ = static method ; # = class variable

Animation Module

ANSI Module

Error Module

System Module

Text Module

Release-Notes

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Files

Wiki

⭐️ Like the project? Give it a star! πŸ› Found a bug? Report it in the issues!