FindStat has a well-working SageMath interface. We recommend looking at the detailed SageMath documentation which includes a great guided tour to learn how to use the FindStat functionality from within SageMath!

To access the database, use

```
sage: findstat
The Combinatorial Statistic Finder (https://www.findstat.org/)
```

There are many ways to use the interface. Two examples would be

```
sage: def statistic(pi):
....: return sum( 1 for i in [1 .. len(pi)] if pi(i) == i )
sage: findstat("Permutations", statistic)
0: (St000022: The number of fixed points of a permutation., [], 200)
1: (St000475: The number of parts equal to 1 in a partition., [Mp00108: cycle type], 200)
...
sage: PM8 = PerfectMatchings(8)
sage: findstat([(m, m.number_of_nestings()) for m in PM8])
0: (St000041: The number of nestings of a perfect matching. , [], 105)
...
```