Skip to main content

squiral - square spiral

Project description

squiral

made-with-python Downloads
pre-commit.ci status Python lint&test Publish Python Package
Sourcegraph codecov

square spiral

Welcome to Squiral!
Here is an example:
21 22 23 24 25
20  7  8  9 10
19  6  1  2 11
18  5  4  3 12
17 16 15 14 13

squiral is a simple and lightweight Python library for generating square spiral patterns.
With squiral, you can easily create a wide range of square spiral designs, from simple to complex.

squiral is easy to use and integrate into existing projects,
making it a great tool for data visualization, computer graphics, and other applications.
With squiral, you can quickly and easily generate square spiral patterns
that are both beautiful and functional.
Whether you're working on a personal project or a professional one,
squiral's square spiral generator is the perfect tool
for adding unique and visually striking designs to your work.

The basic idea behind printing this matrix is
to start from the middle of the matrix and then moving:
right >> down >> left >> up
and not returning to the same row again.

Install

PyPI

pip install squiral

GitHub

pip install git+https://github.com/sadikkuzu/squiral.git

Usage

In console:

buddha@dharma:~$ squiral 7
43 44 45 46 47 48 49
42 21 22 23 24 25 26
41 20  7  8  9 10 27
40 19  6  1  2 11 28
39 18  5  4  3 12 29
38 17 16 15 14 13 30
37 36 35 34 33 32 31
buddha@dharma:~$ squiral --help
usage: squiral [-h] size

positional arguments:
  size        squiral size

optional arguments:
  -h, --help  show this help message and exit

In python:

>>> import squiral as sq
>>> sq.printout(sq.produce(5))
21 22 23 24 25
20  7  8  9 10
19  6  1  2 11
18  5  4  3 12
17 16 15 14 13
>>>

Contributing

To learn more about making a contribution to squiral, please see our Contributing guide

Many Thanks To Our Contributors

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

squiral-0.6.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

squiral-0.6.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file squiral-0.6.0.tar.gz.

File metadata

  • Download URL: squiral-0.6.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for squiral-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e13fe546dbadd8ee8140f25e7679b2f13c7c089cccfbc821db5f2eedd09ad799
MD5 ec529ade2e09b580b72ae737d8ba1a9d
BLAKE2b-256 9b7ce7b813807ab2bc35357e73f659d226de6d06929e642bed2ca274bc37e9d2

See more details on using hashes here.

File details

Details for the file squiral-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: squiral-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for squiral-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e917cac32966f1aca316bda323785ffa490d01c12e37e02f890eb52b0c5224e1
MD5 2bc7c0b71b2a23d6ccdf18e0ae59331c
BLAKE2b-256 9453b92a7681745ee671ec6cc41e2f3043b4ec92c0d6b71080976616e9c99da8

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