Skip to main content

No project description provided

Project description

geomanpy

Python bindings for glam and wreck — fast geometric/linear-algebra primitives and collision detection, backed by Rust.

geomanpy exposes glam's vectors, quaternions, matrices and affine transforms, plus wreck's collision shapes and broad/narrow-phase queries, as native Python classes. Every type integrates with NumPy and behaves like a dataclass for serialization frameworks.

Features

  • Linear algebraVec2, Vec3, Vec4, Quat, Mat3, Mat4, Affine3 with the full glam method surface (normalization, projection, interpolation, Euler conversions, projection/view matrices, …).
  • Collision shapesSphere, Capsule, Cuboid, Cylinder, ConvexPolytope, ConvexPolygon, Line, Ray, LineSegment, Plane, Pointcloud, plus SphereCollection and Collider aggregates.
  • Transform & query protocols — shared Scalable, Transformable, Bounded, Stretchable, and Collides interfaces across shapes (scaled, translated, rotated_quat, transformed, broadphase, obb, aabb, collides).
  • NumPy interopfrom_numpy/to_numpy and the __array__ protocol on every primitive.
  • Serialization — instances expose __dataclass_fields__ so orjson, msgspec, and pydantic treat them as dataclasses; pickling is supported via __getnewargs_ex__.
  • Fully typed — ships a py.typed marker and complete .pyi stubs.

Installation

pip install geomanpy

Usage

import numpy as np
from geomanpy import Vec3, Quat, Sphere, Cuboid, Collider

# Linear algebra
a = Vec3(1.0, 2.0, 3.0)
b = Vec3.from_numpy(np.array([4.0, 5.0, 6.0]))
print(a.dot(b), a.cross(b).to_numpy())

# Rotations
q = Quat.from_rotation_z(np.pi / 2)
print((q * Vec3.X).to_numpy())

# Collision detection
ball = Sphere(Vec3.ZERO, radius=1.0)
box = Cuboid.from_aabb(Vec3(0.5, 0.5, 0.5), Vec3(2.0, 2.0, 2.0))
print(ball.collides(box))

# Aggregate many shapes behind a single broad/narrow-phase query
scene = Collider()
scene.add(box)
print(scene.collides(ball))

Convenience aliases are provided for common names: Quaternion (Quat), Rotation3d (Mat3), Translation3d (Vec3), Transform3d (Affine3), Box3d (Cuboid), Sphere3d (Sphere), Cylinder3d (Cylinder), ObstacleUnion (Collider), and PointCloud (Pointcloud).

Backends

geomanpy can target two Python runtimes, selected at build time by Cargo feature:

  • pyo3-backend (default) — builds a CPython extension module via PyO3.
  • rustpython-backend — registers a geomanpy module inside an embedded RustPython VM, reusing the same wrapper types.

Exactly one backend must be active. The optional safe-locks feature switches mutable wrappers to RustPython's PyRwLock.

Building from source

The CPython wheel is built with maturin:

maturin develop   # build and install into the active virtualenv
maturin build --release

License

Licensed under the Apache License, Version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geomanpy-0.2.0.tar.gz (93.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

geomanpy-0.2.0-cp314-cp314t-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.14tWindows x86-64

geomanpy-0.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64

geomanpy-0.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ ARM64

geomanpy-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

geomanpy-0.2.0-cp37-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7+Windows x86-64

geomanpy-0.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

geomanpy-0.2.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

geomanpy-0.2.0-cp37-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

File details

Details for the file geomanpy-0.2.0.tar.gz.

File metadata

  • Download URL: geomanpy-0.2.0.tar.gz
  • Upload date:
  • Size: 93.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5b71f8c10ceed5978fa06b3f6074965c3a97be8b6ef9609f4eb26e43e070ddd4
MD5 3416f477ae71428f07a39d40aac38a2b
BLAKE2b-256 0e0bfeddd116772e3df9e9731dca564c17c0f7de6537a593008b01d22d1683ea

See more details on using hashes here.

File details

Details for the file geomanpy-0.2.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: geomanpy-0.2.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 4ff9b0fe6237447a0f1d3ad7761c08cdf5c2a70969dfb76c633fb5b8f80efaef
MD5 b12c4f34db13f595d5c59bf82856b8bc
BLAKE2b-256 b43fbcf5d10a7f8782e389d4cc7b076cf0c5153b528ee98f7f7457d46506eb6b

See more details on using hashes here.

File details

Details for the file geomanpy-0.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: geomanpy-0.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.14t, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a78e042d85f3f4359ee60c161ae2587c0b168bbacfcca5058b82eb012de7333
MD5 c9e2bd5ffd8539099813939d2adf13dd
BLAKE2b-256 9b3e987001fc97f0abc68834f5bd79c75df20aa19270f6aac7cd35b5e9eabfd0

See more details on using hashes here.

File details

Details for the file geomanpy-0.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: geomanpy-0.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.14t, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2b967e56bf30753602a43161c91e40e1451d37f1b3ba5a2979a3066901bdea0d
MD5 6e92fe0a9afbe44ee5d081424e5fca07
BLAKE2b-256 188bf9e5a2e23409b072ad94a9cdd94cef6cb70a3b1cd7fd215474cbc8879684

See more details on using hashes here.

File details

Details for the file geomanpy-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

  • Download URL: geomanpy-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.14t, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5984fd461527c34ff7dabc91c66522fc268d388a4e4faef0fe5021bfb7da6a71
MD5 0e39bd928d8b831886d2f0897f35ba5b
BLAKE2b-256 094247af9c3cd040966978a206a1096bb85a813bac2682d8ac4b4d7a523151e8

See more details on using hashes here.

File details

Details for the file geomanpy-0.2.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: geomanpy-0.2.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 012df47d9af9fa6d1c160026a1da74509544e8d7b06940340bb46c65aa3c578b
MD5 98a9accaa202602cb74babe6844262e3
BLAKE2b-256 d2b6da2a99856bf8ab1a1da567b5fe23951feb3f9d28087d9bbd61e0d37d544d

See more details on using hashes here.

File details

Details for the file geomanpy-0.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: geomanpy-0.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9a9e340eef0d213b651a18704e564704881906497df115f92814d92972016f2f
MD5 7cc2da6d68b31bfe7b44b7376b694552
BLAKE2b-256 236ffbd3b943c8a0a9c97092bf921520b826d2bd6bfb4c566b1f117caf6f1163

See more details on using hashes here.

File details

Details for the file geomanpy-0.2.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: geomanpy-0.2.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d5a6b7c071821c14c11340702f63d2e2a8e34c0e589548904c6b8059d49d56ae
MD5 b49a05f4a5af646fa50ce51467c3e01d
BLAKE2b-256 8bf63ba36299e9def4ee1ac9074b80f92dd602ce7bea158506c8fad751f299f9

See more details on using hashes here.

File details

Details for the file geomanpy-0.2.0-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: geomanpy-0.2.0-cp37-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.7+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for geomanpy-0.2.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10ab2604ee6373375a55c0acf84bd227d70fe511b1ba0bb28e430390e474c559
MD5 bc6db06d0b7d7bff9e7989f862d16a75
BLAKE2b-256 c197c69ab975c6d20bf9ffcc19eea66f61bc4f22128379ad5683050ebee90e85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page