I'm late to the party but I would really like to add that considering this is a life safety equipment, the usual design process of generator solutions that you see on Reddit for common needs, needs to be strengtened significantly.
Specifically : you need to have a backup plan. For the backup plan. So if you do get a generator, you need to have a backup if the generator fails. Because generators do fail to start, sometimes, or may fail in operation.
I agree with the other replies as to getting an oxygen bottle. You should be able to get one. There are fire safety considerations to this, especially if the bottle is very big. You might have to store it outside, but be mindful of corrosion if that's the case.
Ideally, aim to get an oxygen bottle that would last you for 2 weeks. I have no idea if this is realistic. The reason I say this is because it is the time it will likely take you to get power back or another bottle, if there is a significant event in your area.
Regarding generators, if you live in an apartment, it is definitely challenging. If you do end up getting a generator, you need a battery powered CO detector (in fact you should have one anyway). You should not run a generator near any window of any other apartment.
If you do get a generator, keep in mind that there are severe maintenance requirements to approach the reliability required for a life safety application : yearly maintenance and oil change at a Honda dealer, I say Honda because you should get the best and not a cheap chinese generator (look into the EU2200i), you also need to test it regularly (I suggest monthly, run it for at least 15 mn with a load), and the fuel needs to be rotated so that it is not older than 3 months (and fuel storage can be an issue too).
This maintenance is going to have a cost. You need to budget for it.
Get a generator which is as small as possible. Not too small so that it can handle surge loads when appliances start, but not too big so that it is more fuel efficient.
Also, make sure you have the necessary power cords and everything required to run it. Practice a full test run every year (run the equipment on the generator for at least 3 hours).
Finally, generator theft does happen. If you leave your generator running unattended, you need to have a way to secure it (there are kits available for sale for this)
Basically, the TLDR of my message is that buying a generator is not a one-time buy-it-and-forget-about-it operation. People really forget the maintenance and regular testing, and underestimate failure rates of generators.
Hope it helps.