Skip to main content

Canva-like library for terminal

Project description

Canvalib

by danb1551

Canvalib is library for window with diferent text and backround color in your terminal.

show video

Installation

pip install canvalib

Usage

Import library

from canvalib import Canvas

Create object:

c = Canvas(width, height, background, color)

All parameters is optional. If you are strugelling why WIDTH and HEIGHT are in default without maked with - 1 then it's because if not, it will do something strange even I don't know why.

WIDTH: default to terminal width - 1. If you add more than default (it depend on your terminal size) it will not work properly.

HEIGHT: default to terminal height - 1. If you add more than default (it depend on your terminal size) it will not work properly.

BACKGROUND: default to Back.BLACK. If you want to change it import Back from colorama and give Back.color to your char or string.

COLOR: default to Fore.GREEN. If you want to change it import Fore from colorama and give Fore.color to your char or string.

Add text to your canvas:

c.add_text(x, y, text)

X: row of the canvas where your text will be. Notice that it's starting from 0 index.

Y: column of the canvas where your text will be. Notice that it's starting from 0 index.

Render it:

c.render()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

canvalib-0.0.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canvalib-0.0.5-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file canvalib-0.0.5.tar.gz.

File metadata

  • Download URL: canvalib-0.0.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for canvalib-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e06f5109a48b8719db26e395b0760c0ffd01d0e0e6d6b63a98a31cf1eb84e35a
MD5 778297f8f3af22c2c80a59166e8f1f04
BLAKE2b-256 cc492ed29323a3916f2d8a644eb3c511f93169d7e8ddcc2de69c4c5b72d19ffc

See more details on using hashes here.

File details

Details for the file canvalib-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: canvalib-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for canvalib-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 306f7eb5361c18a595d188b93c7508be19ae71b7de0ee4da240a8a4c6e1873a5
MD5 09d64585c52d628b0146017526b93d0f
BLAKE2b-256 75ca5ec8225fef56483658959f258e660321e3a01c56afd6d2d0e16397ffade2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page