Skip to main content

This Python package provides functionality to generate jigsaw puzzle cut templates and digital puzzle sets. It includes functions for creating jigsaw templates, applying cuts, and generating SVG representations.

Pre-requisites

  • Python >= 3.8

Installation

You can install the package using pip:

pip install pyjigsaw

Usage

from pyjigsaw import jigsawfactory

# Create a jigsaw cut template
mycut = jigsawfactory.Cut(5, 4, image="./Zugpsitze_mountain.jpg", use_image=True)

# Generate a jigsaw set from the cut template
myjig = jigsawfactory.Jigsaw(mycut, "Zugpsitze_mountain.jpg")
myjig.generate_svg_jigsaw("./Pieces")

Features

Cut Class

The Cut class is responsible for creating jigsaw cut templates. It takes parameters such as the number of pieces in height and width, absolute height and width, an optional image for deriving dimensions, and stroke/fill color specifications.

from pyjigsaw import jigsawfactory


# Create a jigsaw cut template
mycut = jigsawfactory.Cut(5, 4, image="./Zugpsitze_mountain.jpg", use_image=True)

Jigsaw Class

The Jigsaw class uses a Cut template to generate a set of jigsaw pieces in SVG format. It takes a Cut object and an image file path. The generated SVG files are saved in the specified output directory.

from pyjigsaw import jigsawfactory

# Create a jigsaw set from the cut template
myjig = jigsawfactory.Jigsaw(mycut, "Zugpsitze_mountain.jpg")
myjig.generate_svg_jigsaw("./Pieces")

Contributing

Feel free to contribute to the project by opening issues or submitting pull requests on GitHub. License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for pyjigsaw 0.1.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 pyjigsaw 0.1.1
File Size Uploaded
pyjigsaw-0.1.1.tar.gz 6.3 kB Details

Built distribution (wheel)

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

Total release size: 12.7 kB

Release files / pyjigsaw-0.1.1.tar.gz

Download URL pyjigsaw-0.1.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
20a97847a9986f7681f145a5de018b50a28f935f485fbe0e06156dd140ad6e41
BLAKE2b-256 checksum
How to use checksums
3686c5ce4ca74afaa4a3c2b45d10e133df60a6177037bc55e0837441c5c9244e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / pyjigsaw-0.1.1-py3-none-any.whl

Download URL pyjigsaw-0.1.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d25b080eca8039820b91112b9df810064cb5322117c7432abb59e091352fe0d5
BLAKE2b-256 checksum
How to use checksums
55af0075d059a9d379ea368ab0a2f0c62420bcd6be839d9a7d0ad68ce523e602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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