Skip to main content

Stylo

Project MIT License Gitter
Docs Documentation Status
Code Travis Coveralls Black
PyPi PyPi Version PyPi Supported Versions

Stylo is in early development, while it is useable we cannot make any stability guarantees.

Stylo is a Python library that allows you to create images and animations powered by your imagination and a little mathematics. While mathematics is very much at the core you do not have to be a mathematician to use it!

For example here is a simple image of a boat that can be made with just a few lines of Python

A Boat

import stylo as st

# Let's define the shapes we want to draw
sun = st.Circle(-7, 3.4, 1.5, fill=True)
sea = st.Circle(0, -55, 55, fill=True)
sails = st.Triangle((0.1, 0.6), (2.5, 0.6), (0.1, 3.5)) | st.Triangle((-0.1, 0.6), (-1.5, 0.6), (-0.1, 3.5))
boat = st.Rectangle(0, 0, 3.5, 1) | st.Triangle((1.75, -0.5), (1.75, 0.5), (2.25, 0.5))
mast = st.Rectangle(0, 2, 0.125, 3)

# Move some into position
boat = boat >> st.translate(0, -2)
sails = sails >> st.translate(0, -2)
mast = mast >> st.translate(0, -2)

# Finally let's bring it all together
image = st.LayeredImage(background="99ddee", scale=8)

image.add_layer(sun, "ffff00")
image.add_layer(sea, "0000ff")
image.add_layer(boat, "dd2300")
image.add_layer(mast, "000000")
image.add_layer(sails, "ffffff")

image(1920, 1080, filename="a-boat.png")

Installation

Stylo is available for Python 3.5+ and can be installed using Pip:

$ pip install stylo

Be sure to check out the documentation (under construction) for details on how to get started with stylo.

Contributing

Contributions are welcome! Be sure to checkout the Contributing section of the documentation to get started.

Note: While stylo itself supports Python 3.5+, due to some of the development tools we use you need to have Python 3.6+ in order to contribute code to the library. Other versions of Python work just as well if you are looking to contribute documentation.

Release files for stylo 0.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stylo 0.9.3
File Size Uploaded
stylo-0.9.3.tar.gz 34.0 kB Details

Built distribution (wheel)

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

Total release size:150.9 kB

Release files / stylo-0.9.3.tar.gz

Download URL stylo-0.9.3.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
189017d6712f64b112525898050b9657c3b8f8697a5f29c9b9ebce1ef1a72775
BLAKE2b-256 checksum
How to use checksums
e70c285f0139a9c2d17c2a21b98a9f7ce97bfa41381a9d884e3bd6d890b5612c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.10 CPython/3.6.3 Linux/4.4.0-101-generic

Release files / stylo-0.9.3-py3-none-any.whl

Download URL stylo-0.9.3-py3-none-any.whl
Size 116.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33a8f7ad3d57954261915802e1d3d14394d2b92fffb99bffd2ec7a25782648b0
BLAKE2b-256 checksum
How to use checksums
45e908036dee6831a6b38adc1bfc88e17d2aad0151e8392137df15b8ff48a4b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.10 CPython/3.6.3 Linux/4.4.0-101-generic

Release history Release notifications | RSS feed

This release

0.9.3 This release

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

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