We introduce a python library for real-time fMRI (rtfMRI) data processing systems, Real-Time Processing System in python (RTPSpy), to provide building blocks for a custom rtfMRI application with extensive and advanced functionalities. RTPSpy is a library package including 1) a fast, comprehensive, and flexible online fMRI denoising pipeline comparable to offline processing, 2) utilities for fast and accurate anatomical image processing to define a target region on-site, 3) a simulation system of online fMRI processing to optimize a pipeline and target signal calculation, 4) interface to an external application for feedback presentation, and 5) a boilerplate graphical user interface (GUI) integrating operations with RTPSpy library. Since online fMRI data processing cannot be equivalent to offline, we discussed the limitations of online analysis and their solutions in the RTPSpy implementation. We developed a fast and accurate anatomical image processing script with fast tissue segmentation (FastSeg), image alignment, and spatial normalization, utilizing the FastSurfer, AFNI, and ANTs. We confirmed that the FastSeg output was comparable with FreeSurfer, and could complete all the anatomical image processing in a few minutes. Thanks to its highly modular architecture, RTPSpy can easily be used for a simulation analysis to optimize a processing pipeline and target signal calculation. We present a sample script for building a real-time processing pipeline and running a simulation using RTPSpy. The library also offers a simple signal exchange mechanism with an external application. An external application can receive a real-time neurofeedback signal from RTPSpy in a background thread with a few lines of script. While the main components of the RTPSpy are the library modules, we also provide a GUI class for easy access to the RTPSpy functions. The boilerplate GUI application provided with the package allows users to develop a customized rtfMRI application with minimum scripting labor. Finally, we discussed the limitations of the package regarding environment-specific implementations. We believe that RTPSpy is an attractive option for developing rtfMRI applications highly optimized for individual purposes. The package is available from GitHub (https://github.com/mamisaki/RTPSpy) with GPL3 license.