iwtlib
Strictly speaking I don’t think there is such a thing as a “Risk free” rate, but government treasury bills must come as close as you can ever get, certainly less risky than a bank deposit. As for a time frame, I would suggest looking at bills which expire closest to that of the expiry date of option you’re trying to value. Even then, the yield on the bill will be changing, when the BS model assumes a constant interest rate over the life of the option - so clearly a contradiction there.
But don’t worry… of all the inputs into the BS model, slight differences in interest rates affect the option valuation least of all, especially with near-time options.