I have two raspberrypis.
raspberrypi 1
raspberrypi 2
I want to send a text message from raspberrypi 1 to raspberrypi 2 using python. Is there anyway to do it without using sockets?
or connect both raspberrypis to each other and create a local network?
To establish communication you need access from one to another, whether its a local network or you home network. That does not really change the need that you have to use some kind of protocol or create one. Both solutions include creating a socket.
The first solution would save you from writing any of that, but still you would need to decide how they are going to communicate which basically can be defined by what you want them to talk about.
How to send a text message from raspberrypi 1 to raspberrypi2 using Python