How rblasser/logical-rush works
Project type and purpose
• This is a Python batch-computing library (“logical_rush”) for loan amortization and cashflow generation.
• It is distributed as a single package with functions for sequential, parallel, and GIL-released computation of cashflows.
• Typical usage: data preparation via pandas, conversion to list-of-dict records, then feeding into the library’s APIs.
File structure
• Top level:
• LICENSE, README.md, setup.py
• logical_rush/ (Python package)
– __init__.py (exports cashflower_fn, cashflower_par, cashflower_gil)
– __pycache__/ (compiled bytecode)
• No distinct “frontend” or “backend”; it is a pure library.
• No external microservices or web servers, but it integrates with pandas and the Python runtime.
• Packaging configuration in setup.py suggests it’s intended for pip distribution.
README for additional insights
• Core workflow:
a. User script creates a pandas.DataFrame of loan parameters.
b. Converts DataFrame to list-of-dicts (“dx_dict”).
c. Calls one of three entry points:
– cashflower_fn (sequential Python loop)
– cashflower_par (parallel via multiprocessing)
– cashflower_gil (GIL-released compute code)
d. Library returns a list of cashflow records for each loan.
• Benchmark script also writes CSV output.
Detail level
• Include:
• Entry point functions (cashflower_fn, cashflower_par, cashflower_gil)
• Data conversion step
• Worker processes in the parallel path
• GIL release boundary in the GIL engine
• Avoid over-fragmentation; group internal helper functions under each engine unless they represent distinct modules.