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

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

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