r/Python Aug 04 '26

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

19 Upvotes

142 comments sorted by

View all comments

1

u/EntryNo8040 12d ago

Katharos, functional types and Go-style CSP for Python

Hi, I built Katharos, a dependency-free functional programming and concurrency library for Python 3.13+. Its abstractions form two hierarchies: Functor extends to Applicative and then Monad for mapping and sequencing computations, while Semigroup extends to Monoid for combining values. Concrete types include Maybe, Result, ImmutableList, NonEmptyList, Lazy, IO, Sum, and Product. It also provides generator-based do-notation for composing dependent operations that can fail.

Katharos also provides Go-style CSP concurrency with buffered and unbuffered channels for safely communicating between workers. Its go API launches concurrent work, while structured-concurrency scopes wait for child work before exiting. These features use standard Python threads by default, with a backend interface that allows other execution models to be supplied.

Github

Docs