skillfed

pytweening

A collection of tweening (aka easing) functions.

pytweening v1.2.0 3.0M downloads/30d#2,801 on PyPI128
Permissive license MIT DORMANT released

What it is and what it does

PyTweening is a pure-Python library of easing functions used in animation and motion graphics. It takes a normalized progress value between 0.0 and 1.0 and returns an eased output value, allowing smooth, non-linear motion curves (linear, quadratic, cubic, sine, elastic, bounce, and others). The library also includes utilities for line drawing via Bresenham's algorithm and point interpolation along lines, plus iterators to generate coordinate sequences between two points.

The package has no runtime dependencies and is designed for game development, animation frameworks, and any scenario where smooth motion curves are needed. It supports a wide range of Python versions from 2.7 through 3.12, though maintenance is dormant (last release 906 days ago). The code is marked Production/Stable and carries an MIT license.

Use it for:

  • Animate object position or property changes in games or graphics applications using easing curves.
  • Generate smooth camera pan or zoom transitions in interactive media.
  • Create timed UI animations (fade-ins, slide-outs, scale transitions) with non-linear motion.
  • Draw lines or trace paths on a 2D grid using the Bresenham line algorithm.
  • Interpolate coordinates along a line segment for sprite movement or particle effects.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyTweening provides a collection of easing (tweening) functions that map a normalized progress value (0.0 to 1.0) to an eased output, plus utilities for line interpolation and coordinate iteration.

Yes, with conditions. PyTweening is a stable, dependency-free library with a permissive license and broad Python support, making it suitable for animation and graphics work. However, high install friction (source-only distribution) and dormant maintenance (906 days since last release) are drawbacks. Install it if you need easing functions and can tolerate a build step; consider alternatives if you require active maintenance or pre-built wheels.

Install

pytweening on PyPI

pip

pip install pytweening

uv

uv add pytweening

poetry

poetry add pytweening

Installing pytweening

Before you install

High install friction: the package is distributed as a source tarball with no pre-built wheels, requiring compilation or setup on each installation. Maintenance is dormant—last release was 906 days ago, though the repository remains active and the code is marked Production/Stable.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

import pytweening

# Easing function: map progress (0.0–1.0) to eased value
print(pytweening.easeInQuad(0.5))  # 0.25

# Line interpolation
print(pytweening.getLine(0, 0, 5, 10))

# Coordinate iteration
for x, y in pytweening.iterLinear(0, 0, 100, 150, 0.1):
    print(x, y)

High install friction due to source-only distribution; no wheels provided.

Verify before relying

  • Whether the source tarball build succeeds reliably across all claimed Python versions (2.7, 3.4–3.12) on modern systems.
  • Current status of Python 2.7 support given its end-of-life; whether 2.7 classifier is maintained or vestigial.

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 906 days since the last release
Last repo commit
First released
Downloads 2,983,593/month — #2,801 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytweening-1.2.0.tar.gz

Keywords: 2D, animation, tween, tweening, easing

Development Status :: 5 - Production/StableEnvironment :: MacOS XEnvironment :: Win32 (MS Windows)Environment :: X11 ApplicationsIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

easing functions animationtweening library pythonanimation interpolationease-in ease-out curvesbresenham line algorithmcoordinate interpolationmotion curves
animationeasing-curvesgraphics

More Graphics packages