A truchet tiles generator
Creates a truchet pattern as a PNG bitmap.
Install
pip install truchet-tiling
Usage
import truchet_tiling.truchet_pattern as tp
from truchet_tiling.themes import RED_FLAMES
image = tp.generate(
width=700,
height=500,
colors = RED_FLAMES,
directions='mixed',
arcs_probability=1,
stroke_color=0xFFFFFF,
stroke_width=6
)
To try it in Jupyter Notebook:
import truchet_tiling.truchet_pattern as tp
# helper to display bitmap images
def display_image(image_bytes):
from IPython.display import display, Image as IPImage
display(IPImage(data=image_bytes.getvalue()))
image = tp.generate(width=800, height=600)
display_image(image)
Parameters:
width (int): Minimal width of the pattern.
height (int): Minimal height of the pattern.
cell_size (int): Size of the cell in the pattern.
arcs_probability (float): Probability of arcs in the pattern. Accepted float values in the range [0, 1].
directions (str): Direction of the pattern. Accepted values are ['mixed', 'horizontal', 'vertical'].
colors (List[int]): List of colors to use in the pattern. With Null a random color set will be used.
stroke_color (int): Color of the strokes.
stroke_width (int): Width of the strokes.
Metadata
Release files for truchet-tiling 0.0.32
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| truchet_tiling-0.0.32.tar.gz | 11.4 kB | Without provenance | Details for truchet_tiling-0.0.32.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| truchet_tiling-0.0.32-py3-none-any.whl | Python 3 | none | any | Details for truchet_tiling-0.0.32-py3-none-any.whl |
Total release size: 29.9 kB
Release files / truchet_tiling-0.0.32.tar.gz
| Download URL | truchet_tiling-0.0.32.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
629be0558d89c00449880c804491aac9b2fb0f5e776319dc9185cd699e9a5b41
|
|
BLAKE2b-256 checksum How to use checksums |
c1cd1f969176ec4356b62510c783f64c680245cc2603a1cd8bee288e306ec426
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Release files / truchet_tiling-0.0.32-py3-none-any.whl
| Download URL | truchet_tiling-0.0.32-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13aa17f8c1843c601b1d34a80016c5dbedb0172649ca3297fc7b0d4979746435
|
|
BLAKE2b-256 checksum How to use checksums |
8a01cc57d31732bb0fe69edcd0c33e5926f2bf350cb39f88483f3e6872b40bac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Security for truchet-tiling 0.0.32
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.