Writing Python like it’s Rust

This page summarizes the projects mentioned and recommended in the original post on /r/rust

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. cattrs

    Composable custom class converters for attrs, dataclasses and friends.

    I'd suggest you look at my cattrs (https://catt.rs) library as a good serde lookalike in Python (sum type support present and getting better), and to use attrs instead of dataclasses in general.

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. plum

    Multiple dispatch in Python

    You can use https://github.com/beartype/plum instead of that elif chain too

  4. jaxtyping

    Type annotations and runtime checking for shape and dtype of JAX/NumPy/PyTorch/etc. arrays. https://docs.kidger.site/jaxtyping/

    Since you mention ML use-cases, you might like jaxtyping.

  5. equinox

    Elegant easy-to-use neural networks + scientific computing in JAX. https://docs.kidger.site/equinox/

    I'm a big fan of using ABCs to declare interfaces -- so much so that I have an improved abc.ABCMeta that also handles abstract instance variables and abstract class variables: https://github.com/patrick-kidger/equinox/blob/main/equinox/_better_abstract.py

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • cattrs VS ctxure - a user suggested alternative

    2 projects | 5 Jun 2026
  • marshmallow VS ctxure - a user suggested alternative

    2 projects | 5 Jun 2026
  • ML API Styles

    1 project | news.ycombinator.com | 16 Dec 2025
  • Axlearn: Extensible Deep Learning Library

    1 project | news.ycombinator.com | 3 Jul 2025
  • AXLearn: Apple's Deep Learning library built on top of Jax

    1 project | news.ycombinator.com | 18 Feb 2025

Did you know that Python is
the 1st most popular programming language
based on number of references?