Restaurants are a transaction. Family is not, which is what makes it harder. The person cooking for you is usually trying to be kind, and the thing you have to tell them is that their kindness has a rule attached to it now.
For somebody hosting you
I would love to come. One thing that would help: I react to beef, pork and lamb, including things made from them like stock, gelatin and lard. It is a real allergy rather than a preference. If it is easier, I am very happy to bring a dish I know works.
Offering to bring something is the part that lands. It turns your condition from a problem they have to solve into a thing you are handling together.
It also helps to be specific about the small things rather than leaving them to guess, because the guessing is what makes people anxious and avoidant. Naming two or three concrete swaps, like olive oil instead of butter for the potatoes, gives somebody a job they can do.
For the person who does not take it seriously
There is usually one. The response that works better than arguing is to be flat and unembarrassed about the consequence, and then move on rather than defending it.
It is not a diet. If I get this wrong I end up in hospital. Which is why I am careful about it and why I will ask questions that sound fussy.
You do not owe anybody the full explanation and you are allowed to stop the conversation there. People who want to understand it will ask. People who wanted to argue were not going to be convinced by more detail.
For a partner or somebody you live with
The two things worth doing early are showing them where your epinephrine is if you carry it, and telling them what a reaction has looked like for you so far. The delay is the part they need to hold on to, because if you are unwell at one in the morning the useful question is what you ate at eight in the evening, and that is not an obvious question to ask.
If somebody in your house shops for you, the fastest thing you can hand them is not a lecture. It is the scanner. Point it at a label, and the flags do the explaining.