DEV Community

Cover image for pymetry library
Jahongir Sobirov
Jahongir Sobirov

Posted on

3 3

pymetry library

Pymetry

Pymetry easy library into use in Python

How to use in Pymetry

With this python library, you can draw shapes in just one line of code from the turtle module.

Draw square in Pymetry

import pymetry
pym = pymetry
pym.square(100, "orange", 5)
#100 => distance
#"orange" => color line
#5 => line size
Enter fullscreen mode Exit fullscreen mode

Draw triangle in Pymetry

import pymetry
pymetry.triangle(90, 135, 100, "orange", 0)
#90 => corner
#135 => corner
Enter fullscreen mode Exit fullscreen mode

Draw corner in Pymetry

import pymetry
pym = pymetry
pym.corner(20, 100, "black", 2)
#20 => corner
Enter fullscreen mode Exit fullscreen mode

Draw rectangle in Pymetry

import pymetry
pym = pymetry
pym.rect(100, "gray", 7)
Enter fullscreen mode Exit fullscreen mode

Draw circle in Pymetry

import pymetry
pymetry.circle(60, "brown", 4)
Enter fullscreen mode Exit fullscreen mode

Draw pentagon in Pymetry

import pymetry
pym = pymetry
pym.pentagon(150, "yellow", 8)
Enter fullscreen mode Exit fullscreen mode

Draw hexagon in Pymetry

import pymetry
pym = pymetry
pym.hexagon(200, "yellow", 8)
Enter fullscreen mode Exit fullscreen mode

Draw heptagon in Pymetry

import pymetry
pym = pymetry
pym.heptagon(100, "yellow", 8)
Enter fullscreen mode Exit fullscreen mode

Draw octagon in Pymetry

import pymetry
pym = pymetry
pym.octagon(150, "yellow", 8)
Enter fullscreen mode Exit fullscreen mode

Draw polygon in Pymetry

import pymetry
pym = pymetry
pym.polygon("blue", 3)
Enter fullscreen mode Exit fullscreen mode

Turtle shape in Pymetry

import pymetry
pym = pymetry
pym.trsize("1, 20, 15)
Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay