Python classes can have class attributes:
class Foo(object):
bar = 4
Is there an analogous construct for defining class attributes in Cy
While it doesn't seem to be possible to have C-typed static attributes, Cython extension types can have regular Python static attributes which are also automatically accessible in Python. Just declare them as you would declare them in Python:
cdef class Foo:
bar = 4
The generated code shows that these static attributes are stored as Python objects in the attribute dict of the class object, i.e. if you use them in contexts where C-types are used, they are converted back from Python objects.