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.6.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.6-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: canvalib-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 ccb55de98c45e8c78b5ff95068834dcf0f0654cdcfb564851e2bf0c92c33c786
MD5 a48c9d1900f3e5ec4ed6cf7ae9dba85c
BLAKE2b-256 8dc78a3a54da363f069d51dbd69375ef0423d15abb701aa49611e0bd518635fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: canvalib-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 83843d7fde7dad3a9879f4980833295a8b36b0f52d9bfb10cba3d26ca624a8a9
MD5 d40699fc6f2671da63d6297c2ea9455f
BLAKE2b-256 0f70c894a7136fa135bcbbec1abe9a9324132b5e60ba354204b5cfec996e97e3

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