Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
#typescript#chatbot#chatwoot#cloud_api#dify#evolution#n8n#openai#pusher#rabbitmq#typebot#whatsapp#whatsapp_api#whatsapp_bot
Evolution API is a powerful tool that lets you connect and control WhatsApp and other messaging platforms easily. It supports both free WhatsApp Web-based API and the official WhatsApp Business API, plus upcoming Instagram and Messenger support. You can integrate it with popular services like OpenAI for AI features, Chatwoot for customer support, and Amazon S3 for media storage. There’s also a lightweight version for simple, fast setups. Using Evolution API helps you automate messaging, manage chats, and build smart bots, saving time and improving communication for your business or projects.
https://github.com/EvolutionAPI/evolution-api