The following is a missing piece of documentation for adding new <tt>.pyx<\tt> to the Sage library: See 5.2 of the Programming Documentation
Writing Optimized Compiled Code with Sage
Creating .pyx Files in the Sage Library
Suppose you want a more permanent way of including your optimized Cython code in Sage. Perhaps you want to contribute to the Sage project? This guide will show you how to create a simple Cython module and then link it to the Sage library so that your code will appear in future versions of Sage.