Skip to main content

Star text patterncraft: triangle, square, rectangle, hollow square, and more.

Project description

patterncraft

Text patterncraft (triangle, square, rectangle, hollow square, and more). Use letters, digits, or any string as a repeating fill instead of only *.

Install

After this package is on PyPI:

pip install patterncraft

Until you publish it, install from a clone of this repo:

cd path/to/open-contributions
pip install .

Use

from patterncraft import *

print(star(6))
print(star(6, fill="abcd"))
print(star(6, fill="123"))
print(triangle(4))
print(right_triangle(4))
print(inverted_triangle(4))
print(odd_numbers(4))
print(even_numbers(4))
print(square(3))
print(rectangle(6, 2))
print(hollow_square(5))
print(diamond(4))
print(rhombus(4))
print(pascal(6))

Shorter names: inv_tri (same as inverted_triangle), pascal (same as pascal_triangle). Optional: print(star(6, fill="ab")).

Optional keyword fill on character shapes (default "*"), e.g. print(star(6, fill="ab")). Numeric patterncraft (odd_numbers, even_numbers, pascal / pascal_triangle) ignore fill.

You can also use patterncraft("diamond", 4) if you prefer a string name; direct functions are shorter for one-line print calls.

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

patterncraft-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

patterncraft-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file patterncraft-0.1.0.tar.gz.

File metadata

  • Download URL: patterncraft-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for patterncraft-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6994ec68fcf038eb9fa73022cdf2c193423287a0296722cb40d3932efe98eadd
MD5 608931f2138f706f1b7bcf428bd07cbd
BLAKE2b-256 e3f4581cdd25d04fb0e650dcfca10477ff4b8143ec2d811d9bf535731c4a84c8

See more details on using hashes here.

File details

Details for the file patterncraft-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: patterncraft-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for patterncraft-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6b37f2b105737c599821f72b55f43fa3ef059ff21051d5a6fe2a0d92d03d0ac
MD5 3ba2d28a7264cd475f86d66dde043f28
BLAKE2b-256 3f9a4552e258f2a7eba974b44055a447ae7b5087fa096d5ac1ad6d8a3934fc03

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