I spent a couple months here and loved it. I studied spanish in a school called Peruwayna in the heart of Miraflores. The school was great and this was a great way to meet people. I went to a couple hostels to meet up with some friends, and met a lot of really cool people that way. Loki is a really cool place in Miraflores to hang out and stay if you're doing the hostel thing, and like to drink. I had a very nice private airbnb in miraflores for less than $30 a day. I also stayed in Barranco for $32 a day in a very elegant condo with 2 beds and 2 baths which was about a half mile away from the action. Virtually everyone I met was kind and welcoming and really liked that I spoke the language. Barranco is a really beautiful place to watch the sunset, and the nightlife is really cool. Uber is cheap and reliable. I avoided regular cabs because I didn't want to negotiate and end up with a gringo price. If you're going to the airport, get a private taxi. I say this because I almost missed my flight home after two Ubers showed up and rejected me once they found out I wanted to go the airport. Luckily, the third was agreeable.
You'll want to know at least some basic spanish to get around. If you have a conversational level or are in the process of learning, you'll get a lot more out of the experience because not many people speak english. The food is delicious and unlike the food anywhere else, though most of the local cuisine is a bit heavy and unhealthy. You can easily eat for half the price of major American city, and probably a third of that if we're talking NY,LA, or San fran. Ask about menus. Those are lunch specials for $3-4 that include 3 courses and a drink. They're usually really good too. The happy hours are usually 2 for 1, meaning 2 drinks for the price of 1, which is better than most US happy hours. Especially considering the original drink you're buying is a lot cheaper in the first place. Don't buy souvenirs in miraflores! You can get that stuff much much cheaper in the centro de Lima just don't linger there after dark, because it gets very sketchy.
I never had any security problems or felt unsafe. I also live in Baltimore, one of the most dangerous cities in the US, and I felt much safer in Lima. I know women need to be much more carful, because there is an epidemic of sexual assault in Lima, especially on public transit. The visiting women that I met never complained to me about any problems, but I have heard quite a few stories from local women about being groped and/or catcalled. I was warned many times to be careful with my cellphone in public. If you're talking on your cell in public, at least be aware of your surroundings because there are many people who specialize in grabbing your cell from your hand quickly and running off. Though technically illegal, weed is easy to find and cheap, and you can pretty much smoke in the street without worrying about cops bothering you, if that's your thing.