Skip to main content

PadelKit 🎾

An End-to-End 3D Computer Vision, Camera Calibration, Match Scoring & Synthetic Data Engine for Padel.

PyPI - Version License

Installation

pip install padelkit

For optional headless Blender synthetic rendering:

pip install "padelkit[blender]"

Quickstart

from padelkit import (
    BallPhysicsEngine,
    BallState,
    Camera,
    Court,
    Match,
    MatchTimeline,
    PadelVisualizer,
    TeamId,
)

# 1. 3D Court Geometry & 17 Official Landmarks
court = Court.fip_standard()
landmarks_3d = court.landmarks_3d()

# 2. Projective Camera & 3D-to-2D / 2D-to-3D Transformations
camera = Camera.broadcast_near(court=court)
landmarks_2d = camera.project_court_landmarks(court=court)
floor_xyz = camera.project_pixel_to_plane(landmarks_2d["center"], plane_z=0.0)

# 3. 9D Ball Aerodynamics (Drag + Spindt Magnus Lift) & Contact Physics
engine = BallPhysicsEngine(court=court)
shot = BallState.from_shot(
    position=(-2.5, -2.0, 2.3),
    velocity=(3.5, 16.0, -2.5),
    topspin_rpm=-1800.0,
)
trajectory = engine.simulate(shot, duration=2.5)

# 4. Universal Match Format (.parquet), 3D Visualization & Synthetic CV Passes (Three.js)
timeline = MatchTimeline.demo_rally(court=court, fps=60.0, bake_skeleton=True)
timeline.to_parquet("demo_rally.parquet")

viz = PadelVisualizer.from_parquet("demo_rally.parquet")
viz.export_html("padel_studio.html")

# 5. Event-Sourced Match Scoring Engine
match = Match(best_of_sets=3, advantage_method="gold_point")
match.history.add_point(TeamId.A)
print(match.history.get_current_score())

Features

  • Court Geometry (padelkit.court): Official FIP dimensions, enclosure variants, and 17-point 2D/3D landmark coordinate systems (CENTERED and CORNER_BASED).
  • Camera & 3D Projection (padelkit.camera): Intrinsics (FOV & physical sensor models), 6-DoF extrinsics (look_at, euler, OpenCV/OpenGL matrices), lens distortion (Brown-Conrady & Fisheye), vectorized 3D-to-2D projection, and 2D-to-3D ray/plane intersection.
  • 9D Ball Physics & Dynamics (padelkit.physics): RK4 aerodynamic integrator with felt-adjusted drag, Spindt Magnus lift, atmospheric density modeling (from_atmosphere), analytical Coulomb Sliding-to-Rolling rebound physics across turf/glass/fence/net, and vectorized simulate_batch().
  • 3D Visualizer & Replay Studio (padelkit.viz): Interactive Three.js 3D court studio supporting Universal Match Format (.parquet), CSV match replay, 17-joint 3D skeletal baking (bake_skeletal_poses()), Mixamo .glb animation library playback, real-time live streaming (serve() + push_frame()), standalone HTML/Jupyter export, and CV render passes (RGB, Semantic Segmentation, Depth, and 17 Landmarks).
  • Scoring System (padelkit.scoring): Full event-sourced match, set, game, tie-break, and serving rotation engine.

Contributing

We welcome contributions to both the Python library and the official documentation website!

  • Code & Features: Target your Pull Requests to the develop branch. Read our Contributing Guide (CONTRIBUTING.md) for local setup with uv, testing (pytest), linting (ruff), and versioning rules.
  • Website Documentation (padelkit.dev): All documentation pages (.mdx), navigation menus (docs.config.json), custom icons, and SVG schematics live directly inside docs/. Merging changes into develop automatically deploys the preview documentation site, and merging into main updates https://padelkit.dev. See docs/README.md for details.

License

Apache 2.0 License.

Metadata

Release files for padelkit 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 padelkit 0.1.0
File Size Uploaded Provenance Actions
padelkit-0.1.0.tar.gz 319.0 kB With provenance Details for padelkit-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 404.2 kB

Release files / padelkit-0.1.0.tar.gz

Download URL padelkit-0.1.0.tar.gz
Size 319.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5a20c2cac7996c2074bd6f1c06465dbb0a56fdd021b2563d41dcf39ee9752572
BLAKE2b-256 checksum
How to use checksums
6aa1406f655715bd788a425352d1c89fcfa4fd4a89a8416e54f1b53382ebdc50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

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

Download URL padelkit-0.1.0-py3-none-any.whl
Size 85.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b905f1ae4769774055b5ff1efcba64d9ea179dc002d29c305240f81e04cade56
BLAKE2b-256 checksum
How to use checksums
38cf5464cd9f57a4c263e540d51b281ca2b9d5fbef949ba7654db311b89abe68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for padelkit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for padelkit-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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