pytweening
A collection of tweening (aka easing) functions.
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 pytweeninguv
uv add pytweeningpoetry
poetry add pytweeningInstalling 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
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
pyquaternionProvides quaternion representation,…
permissive · top 5,000 on PyPI
pytransform3dpytransform3d provides operations, conversions,…
permissive · top 15,000 on PyPI
piecewise-rationalPerforms shape-preserving piecewise rational…
permissive · top 15,000 on PyPI
terminaltexteffectsRenders animated visual effects for text…
permissive · top 15,000 on PyPI
py-expression-evalParses and evaluates mathematical expressions…
permissive · top 15,000 on PyPI
manimManim is an animation engine that creates…
permissive · top 15,000 on PyPI
fast-simplificationSimplifies 3D meshes by reducing the number of…
permissive · top 15,000 on PyPI
opensimplexGenerates OpenSimplex noise across 2D, 3D, and…
permissive · top 15,000 on PyPI
affineAffine provides a Python class for representing…
permissive · top 5,000 on PyPI