Skip to main content

SmartAITool

A smart AI tool package for Python that provides useful utilities for terminal output formatting, data processing, and video manipulation.

Installation

pip install SmartAITool

You can download the package by running the above command.

Usage

Colored Terminal Output

from SmartAITool.core import cprint, bprint

# Print with colored output
cprint("Success message", "green")  # displayed in green
cprint("Error message", "red")      # displayed in red
cprint("Warning message", "yellow") # displayed in yellow
cprint("Information message", "blue") # displayed in blue
cprint("Default color message")     # displayed in red (default color)

# Print bordered text in cyan
# Print bordered text in cyan
bprint("Section Header")  # Prints: ----------------------Section Header----------------------
bprint(length=50)        # Prints: --------------------------------------------------
bprint()                 # Prints: -------------------------------------------------------------------------------

This addition shows users exactly what to expect when they use the functions in their terminal, helping them understand the visual effect without needing to run the code first.

This clarifies the default behavior of both functions so users understand what to expect when using them without specifying all parameters.

Video Processing

from SmartAITool import video

# Get video information
video_info = video.get_video_info("input_video.mp4")
print(f"FPS: {video_info['fps']}, Resolution: {video_info['width']}x{video_info['height']}")

# Extract frames from a video
video.extract_frames("input_video.mp4", "output_frames_dir", start_frame=0, end_frame=100)

# Create a video from frames
video.create_video("frames_directory", "output_video.mp4", fps=30)

Features

  • Colored Terminal Output: Easy-to-use colored text printing in terminal
  • Support for 8 Colors: black, red, green, yellow, blue, magenta, cyan, white
  • Formatted Borders: Create eye-catching bordered text for log sections
  • Simple API: Intuitive and straightforward functions
  • Video Processing: Tools for extracting frames and creating videos

Development

Setting up development environment

# Clone the repository
git clone https://github.com/m15kh/SmartAITool.git
cd SmartAITool

# Install development dependencies
pip install -r requirements-dev.txt

# WARNING: Error during upload
# Retry with the --verbose option for more details.

# Install the package in development mode
pip install -e .

Thanks to

Borhan for the video processing code.

License

MIT

Release files for SmartAITool 0.4.1

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

Source distribution (sdist)

Source distribution for SmartAITool 0.4.1
File Size Uploaded
smartaitool-0.4.1.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SmartAITool 0.4.1
File Interpreter ABI Platform
smartaitool-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / smartaitool-0.4.1.tar.gz

Download URL smartaitool-0.4.1.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
17513f89ed54518198f0111b0aa9f48cc2d7e1eb20f420b56d93410c023072b7
BLAKE2b-256 checksum
How to use checksums
058adf0835f1841ccab8275b2b11f4bb39a3f206dc4861d245356c6e3992a0d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / smartaitool-0.4.1-py3-none-any.whl

Download URL smartaitool-0.4.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
467c6bd72d50089c0a2642599cd592e8c4a8672c7cfa2f40ea0d01f5bcf6d066
BLAKE2b-256 checksum
How to use checksums
36239914f612d660bffc4693ceda73b597053e45fb92be148b9a3ef5d2f168ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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