Skip to main content

pyd3js-ease

PyPI version Python versions License CI Security

Python port of d3-ease.

Tracked version: upstream_lock.json (d3-ease@3.0.1).

What is d3-ease?

d3-ease supplies easing functions: maps (t \in [0,1]) for animations and transitions (polynomial, sinusoidal, exponential, elastic, bounce, etc.). This package mirrors the default export surface of the pinned upstream version for use from Python.

What you get

  • 100% upstream export parity for the pinned d3-ease@3.0.1 (compatibility matrix and docs/UPSTREAM_API.md).
  • 100% line coverage for pyd3js_ease (enforced via --cov-fail-under=100 in this package’s pytest config).
  • Pytest ports of every upstream Mocha file for v3.0.1, plus runnable docs (README + docs/USER_GUIDE.md) checked like pyd3js-array.
  • D3-style ease* names and aliases; polynomial, back, and elastic configurators expose .exponent, .overshoot, .amplitude / .period like upstream (as callable classes in Python).

Install

From PyPI:

pip install pyd3js-ease

The published package has no third-party Python dependencies (standard library only).

Workspace development:

uv sync --group dev

Usage

import pyd3js_ease as d3

print(d3.easeCubicIn(0.5))
print(d3.easeQuad is d3.easeQuadInOut)

p = d3.easePolyIn.exponent(2.5)
print(round(p(0.5), 6))

f = d3.easeElasticIn.amplitude(1.3).period(0.2)
print(round(f(0.5), 6))
0.125
True
0.176777
-0.030303

Compatibility matrix

Pinned upstream inventory: docs/UPSTREAM_API.md.

Legend:

  • [implemented]: ported for the pinned version; covered by Python tests.
  • [missing]: reserved for upstream drift (should not appear for the pinned version).

Upstream exports (d3-ease@3.0.1)

  • easeLinear — [implemented]
  • easeQuad — [implemented]
  • easeQuadIn — [implemented]
  • easeQuadOut — [implemented]
  • easeQuadInOut — [implemented]
  • easeCubic — [implemented]
  • easeCubicIn — [implemented]
  • easeCubicOut — [implemented]
  • easeCubicInOut — [implemented]
  • easePoly — [implemented]
  • easePolyIn — [implemented]
  • easePolyOut — [implemented]
  • easePolyInOut — [implemented]
  • easeSin — [implemented]
  • easeSinIn — [implemented]
  • easeSinOut — [implemented]
  • easeSinInOut — [implemented]
  • easeExp — [implemented]
  • easeExpIn — [implemented]
  • easeExpOut — [implemented]
  • easeExpInOut — [implemented]
  • easeCircle — [implemented]
  • easeCircleIn — [implemented]
  • easeCircleOut — [implemented]
  • easeCircleInOut — [implemented]
  • easeBounce — [implemented]
  • easeBounceIn — [implemented]
  • easeBounceOut — [implemented]
  • easeBounceInOut — [implemented]
  • easeBack — [implemented]
  • easeBackIn — [implemented]
  • easeBackOut — [implemented]
  • easeBackInOut — [implemented]
  • easeElastic — [implemented]
  • easeElasticIn — [implemented]
  • easeElasticOut — [implemented]
  • easeElasticInOut — [implemented]

Python-only exports

The module also documents PolyIn, PolyOut, PolyInOut, BackIn, BackOut, BackInOut, ElasticIn, ElasticOut, ElasticInOut, and __version__ for typing and explicit construction (not separate names in upstream index.js).

Testing

From repo root:

uv run pytest packages/pyd3js-ease/package_tests -q --cov=pyd3js_ease --cov-report=term-missing --cov-fail-under=100
uv run ruff format packages/pyd3js-ease
uv run ruff check packages/pyd3js-ease
uv run ty check packages/pyd3js-ease/src

Documentation

Metadata

Release files for pyd3js-ease 0.1.0

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

Source distribution (sdist)

Source distribution for pyd3js-ease 0.1.0
File Size Uploaded
pyd3js_ease-0.1.0.tar.gz 422.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyd3js-ease 0.1.0
File Interpreter ABI Platform
pyd3js_ease-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 432.6 kB

Release files / pyd3js_ease-0.1.0.tar.gz

Download URL pyd3js_ease-0.1.0.tar.gz
Size 422.7 kB
Tags Source
SHA-256 checksum
How to use checksums
530d9ac30f880c96188a8585e71523e04132f0b35c4d81dab9d5b14f0942b6aa
BLAKE2b-256 checksum
How to use checksums
10f5ec212afc81a2becf495f4173514c83383b085fa8f568d3b86546db3cb4c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / pyd3js_ease-0.1.0-py3-none-any.whl

Download URL pyd3js_ease-0.1.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37ae84c0319eddc0fe977638671592f5869928a24f8e216edb2360f11849c6c5
BLAKE2b-256 checksum
How to use checksums
d586f2fa274411b2e84859ea7e1e4e69767961c3806d3b014e88bfd9fee15263
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.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