{"id":8264,"date":"2024-09-18T18:47:56","date_gmt":"2024-09-18T21:47:56","guid":{"rendered":"https:\/\/blog.botcity.dev\/?p=8264"},"modified":"2024-09-18T18:48:46","modified_gmt":"2024-09-18T21:48:46","slug":"execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico","status":"publish","type":"post","link":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/","title":{"rendered":"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es em Python: m\u00e9todos e exemplo pr\u00e1tico"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Quando falamos de automa\u00e7\u00e3o web, temos particularidades que as tornam mais poderosas e eficientes em alguns contextos. Fazer essa execu\u00e7\u00e3o paralela com c\u00f3digo Python aumenta a efici\u00eancia ao executar m\u00faltiplas tarefas simultaneamente. Com o objetivo de lidar com desafios de grande escala, essa abordagem tem um impacto significativo na redu\u00e7\u00e3o do tempo de processamento geral.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Como exemplo de implementa\u00e7\u00e3o, temos a possibilidade de executar v\u00e1rias automa\u00e7\u00f5es em paralelo quando utilizamos webdrivers.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Como funciona o webdriver?<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">O webdriver fornece um protocolo de conex\u00e3o com navegadores, sendo poss\u00edvel control\u00e1-los com um conjunto de interfaces que permitem descobrir e manipular o Document Object Model (DOM).<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8273\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/dom-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/DOM-image.png\" data-orig-size=\"907,518\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"DOM image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/DOM-image.png\" class=\"aligncenter wp-image-8273 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/DOM-image.png\" alt=\"imagem mostrando a estrutura de tags do HTML com a DOM\" width=\"907\" height=\"518\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/DOM-image.png 907w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/DOM-image-300x171.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/DOM-image-900x515.png?crop=1 900w\" sizes=\"auto, (max-width: 907px) 100vw, 907px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Essa comunica\u00e7\u00e3o ocorre atrav\u00e9s do protocolo HTTP (Hypertext Transfer Protocol). O webdriver disponibiliza uma lista de endpoints que recebem comandos e geram a\u00e7\u00f5es (que podem ser cliques) ou retorno de informa\u00e7\u00f5es (que podem ser textos) de uma p\u00e1gina ou elemento espec\u00edfico.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Quando encontramos um elemento de bot\u00e3o, temos entre as op\u00e7\u00f5es, a possibilidade de realizar um clique nele. Atrav\u00e9s do webdriver, essa a\u00e7\u00e3o de clique ocorre por meio de uma chamada de API, fazendo com que os recursos f\u00edsicos da m\u00e1quina n\u00e3o fiquem ocupados.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00c9 poss\u00edvel fazer o paralelismo de execu\u00e7\u00e3o de automa\u00e7\u00f5es web justamente por essa caracter\u00edstica, as chamadas s\u00e3o individuais e vinculadas a uma sess\u00e3o do webdriver, fazendo com que n\u00e3o haja interfer\u00eancia entre as execu\u00e7\u00f5es de automa\u00e7\u00f5es diferentes, nem mesmo aloca\u00e7\u00e3o de recursos I\/O (input\/output) da m\u00e1quina.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Exemplo de c\u00f3digo python + webdriver<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Para exemplificar a constru\u00e7\u00e3o de automa\u00e7\u00f5es web, vamos utilizar o <\/span><a href=\"https:\/\/documentation.botcity.dev\/tutorials\/python-automations\/web\/\"><span style=\"font-weight: 400;\">template de projeto<\/span><\/a><span style=\"font-weight: 400;\"> da BotCity para realizar um processo simples:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Abrir o navegador na p\u00e1gina do google;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Buscar pelo elemento DOM da caixa de pesquisa;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Digitar o texto;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Busca pelo elemento DOM do bot\u00e3o \u2018estou com sorte\u2019;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Clicar no bot\u00e3o \u2018estou com sorte\u2019;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Aguardar a p\u00e1gina carregar totalmente;<\/span>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Cada vez que a p\u00e1gina \u00e9 carregada, uma imagem diferente aparece;<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Fazer uma captura de tela;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Envi\u00e1-la para o BotCity Orquestrador;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Finalizar a tarefa.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Dentro da estrutura do projeto criado a partir do template, vamos identificar o arquivo bot.py e alter\u00e1-lo da seguinte forma:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Imports da biblioteca BotCity<\/span>\r\n<span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">botcity<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">web<\/span> <span style=\"font-weight: 400;\">import<\/span> <span style=\"font-weight: 400;\">WebBot<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">Browser<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">By<\/span>\r\n<span style=\"font-weight: 400;\">from<\/span> <span style=\"font-weight: 400;\">botcity<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">maestro<\/span> <span style=\"font-weight: 400;\">import<\/span> <span style=\"font-weight: 400;\">*<\/span>\r\n\r\n<span style=\"font-weight: 400;\"># Desabilita os erros caso n\u00e3o esteja conectado ao Orquestrador<\/span>\r\n<span style=\"font-weight: 400;\">BotMaestroSDK<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">RAISE_NOT_CONNECTED<\/span> <span style=\"font-weight: 400;\">=<\/span> <span style=\"font-weight: 400;\">False<\/span>\r\n\r\n<span style=\"font-weight: 400;\">def<\/span> <span style=\"font-weight: 400;\">main<\/span><span style=\"font-weight: 400;\">():<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Instancia do BotMaestroSDK para integra\u00e7\u00e3o com o Orquestrador<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">maestro<\/span> <span style=\"font-weight: 400;\">=<\/span> <span style=\"font-weight: 400;\">BotMaestroSDK<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">from_sys_args<\/span><span style=\"font-weight: 400;\">()<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">execution<\/span> <span style=\"font-weight: 400;\">=<\/span> <span style=\"font-weight: 400;\">maestro<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">get_execution<\/span><span style=\"font-weight: 400;\">()<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">print<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">f<\/span><span style=\"font-weight: 400;\">\"Task ID is: <\/span><span style=\"font-weight: 400;\">{<\/span><span style=\"font-weight: 400;\">execution<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">task_id<\/span><span style=\"font-weight: 400;\">}<\/span><span style=\"font-weight: 400;\">\"<\/span><span style=\"font-weight: 400;\">)<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">print<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">f<\/span><span style=\"font-weight: 400;\">\"Task Parameters are: <\/span><span style=\"font-weight: 400;\">{<\/span><span style=\"font-weight: 400;\">execution<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">parameters<\/span><span style=\"font-weight: 400;\">}<\/span><span style=\"font-weight: 400;\">\"<\/span><span style=\"font-weight: 400;\">)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Instancia do WebBot<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">bot<\/span> <span style=\"font-weight: 400;\">=<\/span> <span style=\"font-weight: 400;\">WebBot<\/span><span style=\"font-weight: 400;\">()<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Configura o navegador para ser executado em modo headless<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">headless<\/span> <span style=\"font-weight: 400;\">= <\/span><span style=\"font-weight: 400;\">True<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Seleciona o navegador que ser\u00e1 utilizado<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">browser<\/span> <span style=\"font-weight: 400;\">=<\/span> <span style=\"font-weight: 400;\">Browser<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">FIREFOX<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Define o caminho do webdriver<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">driver_path<\/span> <span style=\"font-weight: 400;\">=<\/span> <span style=\"font-weight: 400;\">\"resources\\geckodriver.exe\"<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Abre o navegador e navega at\u00e9 o site do Google<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">browse<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">\"https:\/\/www.google.com\"<\/span><span style=\"font-weight: 400;\">)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Encontra o elemento DOM de caixa de texto<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">caixa_texto<\/span> <span style=\"font-weight: 400;\">=<\/span> <span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">find_element<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">\"APjFqb\"<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">By<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">ID<\/span><span style=\"font-weight: 400;\">)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Digita o texto na caixa de texto<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">caixa_texto<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">send_keys<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">\"This person does not exist\"<\/span><span style=\"font-weight: 400;\">)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Encontra o elemento DOM de bot\u00e3o 'estou com sorte'<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">botao_sorte<\/span> <span style=\"font-weight: 400;\">=<\/span> <span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">find_element<\/span><span style=\"font-weight: 400;\">(<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">\".FPdoLc &gt; center:nth-child(1) &gt; input:nth-child(2)\"<\/span><span style=\"font-weight: 400;\">,<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">By<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">CSS_SELECTOR<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Clica no bot\u00e3o<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">botao_sorte<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">click<\/span><span style=\"font-weight: 400;\">()<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Aguarda 3 segundos at\u00e9 carregar totalmente a p\u00e1gina<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">wait<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">3000<\/span><span style=\"font-weight: 400;\">)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Faz uma captura de tela<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">save_screenshot<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">r<\/span><span style=\"font-weight: 400;\">\"resources<\/span><span style=\"font-weight: 400;\">\\f<\/span><span style=\"font-weight: 400;\">oto.png\"<\/span><span style=\"font-weight: 400;\">)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Envia a foto para o Orquestrador<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">maestro<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">post_artifact<\/span><span style=\"font-weight: 400;\">(<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">task_id<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">execution<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">task_id<\/span><span style=\"font-weight: 400;\">,<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">artifact_name<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">\"foto.png\"<\/span><span style=\"font-weight: 400;\">,<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">filepath<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">r<\/span><span style=\"font-weight: 400;\">\"resources<\/span><span style=\"font-weight: 400;\">\\f<\/span><span style=\"font-weight: 400;\">oto.png\"<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Fecha o navegador<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">bot<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">stop_browser<\/span><span style=\"font-weight: 400;\">()<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\"># Finalizando a tarefa no Orquestrador<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">maestro<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">finish_task<\/span><span style=\"font-weight: 400;\">(<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">task_id<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">execution<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">task_id<\/span><span style=\"font-weight: 400;\">,<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">status<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">AutomationTaskFinishStatus<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">SUCCESS<\/span><span style=\"font-weight: 400;\">,<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">message<\/span><span style=\"font-weight: 400;\">=<\/span><span style=\"font-weight: 400;\">\"Tarefa finalizada com sucesso!\"<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">if<\/span> <span style=\"font-weight: 400;\">__name__<\/span> <span style=\"font-weight: 400;\">==<\/span> <span style=\"font-weight: 400;\">'__main__'<\/span><span style=\"font-weight: 400;\">:<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">main<\/span><span style=\"font-weight: 400;\">()<\/span><\/pre>\n<h2><span style=\"font-weight: 400;\">Como gerenciar execu\u00e7\u00f5es paralelas?<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Para fazer o paralelismo de execu\u00e7\u00e3o de tarefas, o mais indicado \u00e9 utilizar uma ferramenta de orquestra\u00e7\u00e3o de automa\u00e7\u00f5es, como o BotCity Orquestrador. Para isso, precisamos dos seguintes requisitos:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Automa\u00e7\u00f5es web que interagem com navegadores via webdrivers;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/documentation.botcity.dev\/runner\/\"><span style=\"font-weight: 400;\">Runners<\/span><\/a><span style=\"font-weight: 400;\"> distintos para executar as automa\u00e7\u00f5es em paralelo (cada runner executa uma tarefa por vez).<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Al\u00e9m disso, ainda podemos paralelizar essas execu\u00e7\u00f5es com uma automa\u00e7\u00e3o do tipo desktop, a qual utiliza os recursos I\/O e vis\u00e3o computacional para realiza\u00e7\u00e3o de tarefas.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As automa\u00e7\u00f5es web podem ser configuradas para executar no \u201cmodo headless\u201d, ou seja, sem que a interface gr\u00e1fica seja carregada, agindo como um servi\u00e7o na m\u00e1quina.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Desta forma, enquanto as automa\u00e7\u00f5es web executam sem serem vistas, deixamos que os recursos fiquem livres para que a vis\u00e3o computacional opere no mesmo ambiente.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Passos a passo para a orquestra\u00e7\u00e3o<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Para esse exemplo, vamos executar uma automa\u00e7\u00e3o desktop, que utiliza os recursos do ambiente, vis\u00e3o computacional e entradas de teclado. Ao mesmo tempo executar em paralelo uma automa\u00e7\u00e3o web, em modo headless, sem necessidade de visualiza\u00e7\u00e3o da sua interface gr\u00e1fica, assim n\u00e3o interferindo na automa\u00e7\u00e3o desktop.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Passo 1:<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Crie os Runners no BotCity Orquestrador. Configure-os com o tipo \u201cbackground\u201d para executar automa\u00e7\u00f5es web e tipo \u201cdesktop\u201d para executar automa\u00e7\u00f5es desktop. Siga tamb\u00e9m <\/span><a href=\"https:\/\/documentation.botcity.dev\/runner\/runner-setup\/\"><span style=\"font-weight: 400;\">o passo a passo de setup dos runners<\/span><\/a><span style=\"font-weight: 400;\"> da documenta\u00e7\u00e3o.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8275\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/runners-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-image.png\" data-orig-size=\"873,263\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Runners image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-image.png\" class=\"aligncenter wp-image-8275 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-image.png\" alt=\"print da tela dos runners criados para mostrar o processamento em paralelo em automa\u00e7\u00f5es Python\" width=\"873\" height=\"263\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-image.png 873w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-image-300x90.png 300w\" sizes=\"auto, (max-width: 873px) 100vw, 873px\" \/><\/p>\n<h3><span style=\"font-weight: 400;\">Passo 2:<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Escolha o ambiente onde as automa\u00e7\u00f5es executar\u00e3o e fa\u00e7a a instala\u00e7\u00e3o via wizard do <\/span><a href=\"https:\/\/documentation.botcity.dev\/getting-started\/botcity-studio-sdk\/\"><span style=\"font-weight: 400;\">BotCity SDK<\/span><\/a><span style=\"font-weight: 400;\">. Ap\u00f3s a instala\u00e7\u00e3o, precisamos garantir que os runners ser\u00e3o identificados corretamente. Ent\u00e3o dentro da pasta de cada um, identifique o arquivo conf.bcf na pasta conf. Dentro deste arquivo, ajuste o machineID com os nomes dos runners criados. Dessa forma cada Runner poder\u00e1 executar uma tarefa diferente.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8277\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/runners-waiting-tasks-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-waiting-tasks-image.png\" data-orig-size=\"895,543\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Runners waiting tasks image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-waiting-tasks-image.png\" class=\"aligncenter wp-image-8277 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-waiting-tasks-image.png\" alt=\"print dos tr\u00eas runners criados em status de aguardando novas tarefas para demonstrar o processamento paralelo de automa\u00e7\u00f5es python\" width=\"895\" height=\"543\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-waiting-tasks-image.png 895w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-waiting-tasks-image-300x182.png 300w\" sizes=\"auto, (max-width: 895px) 100vw, 895px\" \/><\/p>\n<h3><span style=\"font-weight: 400;\">Passo 3:<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Crie e fa\u00e7a o deploy das automa\u00e7\u00f5es na plataforma.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8280\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/deploy-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Deploy-image.png\" data-orig-size=\"890,207\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Deploy image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Deploy-image.png\" class=\"aligncenter wp-image-8280 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Deploy-image.png\" alt=\"print do deploy das duas automa\u00e7\u00f5es de exemplo: desktop e web para demonstrar processamento paralelo em automa\u00e7\u00f5es python\" width=\"890\" height=\"207\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Deploy-image.png 890w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Deploy-image-300x70.png 300w\" sizes=\"auto, (max-width: 890px) 100vw, 890px\" \/><\/p>\n<h3><span style=\"font-weight: 400;\">Passo 4:<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Vincule cada automa\u00e7\u00e3o aos runners criados anteriormente. Note que a automa\u00e7\u00e3o desktop foi vinculada ao runner \u201cvm-01\u201d apenas, enquanto a automa\u00e7\u00e3o web foi vinculada aos runners \u201cvm-02\u201d e \u201cvm-03\u201d.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8282\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/add-runners-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Add-runners-image.png\" data-orig-size=\"905,267\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Add runners image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Add-runners-image.png\" class=\"aligncenter wp-image-8282 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Add-runners-image.png\" alt=\"print adicionando os runners nas automa\u00e7\u00f5es criadas para demonstrar processamento paralelo de automa\u00e7\u00f5es em python\" width=\"905\" height=\"267\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Add-runners-image.png 905w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Add-runners-image-300x89.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Add-runners-image-900x267.png 900w\" sizes=\"auto, (max-width: 905px) 100vw, 905px\" \/><\/p>\n<h3><span style=\"font-weight: 400;\">Passo 5:<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Crie v\u00e1rias tarefas para serem executadas paralelamente.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8284\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/task-queue-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-image.png\" data-orig-size=\"876,740\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Task queue image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-image.png\" class=\"aligncenter wp-image-8284 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-image.png\" alt=\"print de diversas tarefas criadas na fila com status &quot;em fila&quot; para demonstrar execu\u00e7\u00e3o do processamento paralelo em automa\u00e7\u00f5es python\" width=\"876\" height=\"740\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-image.png 876w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-image-300x253.png 300w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/p>\n<h3><span style=\"font-weight: 400;\">Passo 6:<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Ao clicar em start na interface dos runners, eles far\u00e3o a conex\u00e3o com o BotCity Orquestrador, acessando a fila de tarefas e buscando as que foram vinculadas ao seu machineID. Dessa forma cada um dos Runners consegue executar uma tarefa diferente na fila.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8287\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/runners-executing-tasks-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-executing-tasks-image.png\" data-orig-size=\"894,536\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Runners executing tasks image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-executing-tasks-image.png\" class=\"aligncenter wp-image-8287 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-executing-tasks-image.png\" alt=\"os tr\u00eas runners agora com status de &quot;executando tarefa&quot; em que dois est\u00e3o executando tarefas da automa\u00e7\u00e3o web e um est\u00e1 executando tarefa da automa\u00e7\u00e3o desktop, demonstrando processamento paralelo de automa\u00e7\u00f5es em python \" width=\"894\" height=\"536\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-executing-tasks-image.png 894w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Runners-executing-tasks-image-300x180.png 300w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8290\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/task-queue-running-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-running-image.png\" data-orig-size=\"810,678\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Task queue running image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-running-image.png\" class=\"aligncenter wp-image-8290 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-running-image.png\" alt=\"print das tarefas em fila sendo executadas, algumas com status &quot;em fila&quot; e outras com status &quot;executando&quot;\" width=\"810\" height=\"678\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-running-image.png 810w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Task-queue-running-image-300x251.png 300w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/h3>\n<h3><span style=\"font-weight: 400;\">Resultado<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Ap\u00f3s finalizar a execu\u00e7\u00e3o, no menu de arquivos de resultado, as fotos capturadas no processo estar\u00e3o dispon\u00edveis para download.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8293\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/result-files-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Result-files-image.png\" data-orig-size=\"881,675\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Result files image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Result-files-image.png\" class=\"aligncenter wp-image-8293 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Result-files-image.png\" alt=\"print da tela de result files mostrando as imagens salvas ap\u00f3s a execu\u00e7\u00e3o do processamento paralelo de automa\u00e7\u00f5es em python\" width=\"881\" height=\"675\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Result-files-image.png 881w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Result-files-image-300x230.png 300w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Result-files-image-260x200.png?crop=1 260w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/Result-files-image-87x67.png?crop=1 87w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"8295\" data-permalink=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/people-image\/\" data-orig-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/People-image.png\" data-orig-size=\"914,514\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"People image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/People-image.png\" class=\"aligncenter wp-image-8295 size-full\" src=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/People-image.png\" alt=\"print das quatro imagens geradas ap\u00f3s execu\u00e7\u00e3o\" width=\"914\" height=\"514\" srcset=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/People-image.png 914w, https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/People-image-300x169.png 300w\" sizes=\"auto, (max-width: 914px) 100vw, 914px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Nesse contexto, quanto mais runners dispon\u00edveis, mais tarefas podem ser executadas paralelamente. Lembrando que para execu\u00e7\u00e3o com efici\u00eancia tamb\u00e9m \u00e9 necess\u00e1rio que o ambiente suporte a execu\u00e7\u00e3o dessas tarefas, verifique sempre as configura\u00e7\u00f5es da m\u00e1quina em execu\u00e7\u00e3o para decidir qual a quantidade ideal de runners para ela.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Tenha v\u00e1rias automa\u00e7\u00f5es paralelas com RPA em Python<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Se voc\u00ea busca uma solu\u00e7\u00e3o de Automa\u00e7\u00e3o de Processos Rob\u00f3ticos (RPA) para criar e orquestrar automa\u00e7\u00f5es em Python, recomendamos que conhe\u00e7a a BotCity, que conta com um assistente de c\u00f3digo em python e um orquestrador de automa\u00e7\u00f5es em python para opera\u00e7\u00f5es complexas. Voc\u00ea pode <\/span><a href=\"https:\/\/developers.botcity.dev\/signup\"><span style=\"font-weight: 400;\">criar uma conta gratuita<\/span><\/a><span style=\"font-weight: 400;\"> e testar todo o processo que apresentamos aqui. E caso tenha d\u00favidas, fique \u00e0 vontade para envi\u00e1-las no <\/span><a href=\"https:\/\/community.botcity.dev\/\"><span style=\"font-weight: 400;\">f\u00f3rum<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quando falamos de automa\u00e7\u00e3o web, temos particularidades que as tornam mais poderosas e eficientes em alguns contextos. Fazer essa execu\u00e7\u00e3o paralela com c\u00f3digo Python aumenta a efici\u00eancia ao executar m\u00faltiplas tarefas simultaneamente. Com o objetivo de lidar com desafios de grande escala, essa abordagem tem um impacto significativo na redu\u00e7\u00e3o do tempo de processamento geral.<\/p>\n","protected":false},"author":214060736,"featured_media":8266,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[773019],"tags":[],"class_list":{"0":"post-8264","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-nao-categorizado"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es Python: m\u00e9todos e exemplo<\/title>\n<meta name=\"description\" content=\"Conhe\u00e7a como executar automa\u00e7\u00f5es Python paralelamente, as suas vantagens e como criar seus rob\u00f4s na pr\u00e1tica.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es Python: m\u00e9todos e exemplo\" \/>\n<meta property=\"og:description\" content=\"Conhe\u00e7a como executar automa\u00e7\u00f5es Python paralelamente, as suas vantagens e como criar seus rob\u00f4s na pr\u00e1tica.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog BotCity - Conte\u00fado para Automa\u00e7\u00e3o e Governan\u00e7a\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-18T21:47:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-18T21:48:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/capas-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Bruna Ferreira\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bruna Ferreira\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/\"},\"author\":{\"name\":\"Bruna Ferreira\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#\\\/schema\\\/person\\\/3f40b28507caec54758533d1ae8b59f3\"},\"headline\":\"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es em Python: m\u00e9todos e exemplo pr\u00e1tico\",\"datePublished\":\"2024-09-18T21:47:56+00:00\",\"dateModified\":\"2024-09-18T21:48:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/\"},\"wordCount\":988,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/capas-1.png\",\"articleSection\":[\"N\u00e3o categorizado\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/\",\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/\",\"name\":\"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es Python: m\u00e9todos e exemplo\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/capas-1.png\",\"datePublished\":\"2024-09-18T21:47:56+00:00\",\"dateModified\":\"2024-09-18T21:48:46+00:00\",\"description\":\"Conhe\u00e7a como executar automa\u00e7\u00f5es Python paralelamente, as suas vantagens e como criar seus rob\u00f4s na pr\u00e1tica.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/capas-1.png\",\"contentUrl\":\"https:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/capas-1.png\",\"width\":1400,\"height\":800,\"caption\":\"capa do artigo\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/2024\\\/09\\\/18\\\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es em Python: m\u00e9todos e exemplo pr\u00e1tico\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#website\",\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/\",\"name\":\"Blog BotCity\",\"description\":\"Explore o blog BotCity com conte\u00fados para automatizar e governar em Python. Mantenha-se informado e melhore o desempenho tecnol\u00f3gico, a seguran\u00e7a e o ROI da sua empresa.\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#organization\",\"name\":\"BotCity\",\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"http:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/logo_botcity_2024_black.png\",\"contentUrl\":\"http:\\\/\\\/blog.botcity.dev\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/logo_botcity_2024_black.png\",\"width\":1611,\"height\":384,\"caption\":\"BotCity\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/#\\\/schema\\\/person\\\/3f40b28507caec54758533d1ae8b59f3\",\"name\":\"Bruna Ferreira\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/352426ca1245b0377d71a38ec39455339f998d5cd76ff101a0fc27ff9f44a27e?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/352426ca1245b0377d71a38ec39455339f998d5cd76ff101a0fc27ff9f44a27e?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/352426ca1245b0377d71a38ec39455339f998d5cd76ff101a0fc27ff9f44a27e?s=96&d=identicon&r=g\",\"caption\":\"Bruna Ferreira\"},\"description\":\"Sou Bruna Ferreira, bel.a em ci\u00eancia da computa\u00e7\u00e3o, desenvolvedora de software atuando no time DX | AX na BotCity com automa\u00e7\u00e3o RPA e Python. Tamb\u00e9m sou criadora de conte\u00fado, compartilhando tutoriais, artigos, v\u00eddeos e fazendo lives sobre programa\u00e7\u00e3o em diversas plataformas. Participo do CodeShow, o canal \u00e9 um coletivo de criadores de conte\u00fado educacional voltado para programa\u00e7\u00e3o. Tamb\u00e9m da Feministech, uma comunidade feminista com foco em tecnologia e diversidade.\",\"sameAs\":[\"https:\\\/\\\/bugelseif.github.io\\\/website\\\/\"],\"url\":\"https:\\\/\\\/blog.botcity.dev\\\/pt-br\\\/author\\\/bugelseif\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es Python: m\u00e9todos e exemplo","description":"Conhe\u00e7a como executar automa\u00e7\u00f5es Python paralelamente, as suas vantagens e como criar seus rob\u00f4s na pr\u00e1tica.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/","og_locale":"pt_BR","og_type":"article","og_title":"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es Python: m\u00e9todos e exemplo","og_description":"Conhe\u00e7a como executar automa\u00e7\u00f5es Python paralelamente, as suas vantagens e como criar seus rob\u00f4s na pr\u00e1tica.","og_url":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/","og_site_name":"Blog BotCity - Conte\u00fado para Automa\u00e7\u00e3o e Governan\u00e7a","article_published_time":"2024-09-18T21:47:56+00:00","article_modified_time":"2024-09-18T21:48:46+00:00","og_image":[{"width":1400,"height":800,"url":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/capas-1.png","type":"image\/png"}],"author":"Bruna Ferreira","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Bruna Ferreira","Est. tempo de leitura":"6 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/#article","isPartOf":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/"},"author":{"name":"Bruna Ferreira","@id":"https:\/\/blog.botcity.dev\/pt-br\/#\/schema\/person\/3f40b28507caec54758533d1ae8b59f3"},"headline":"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es em Python: m\u00e9todos e exemplo pr\u00e1tico","datePublished":"2024-09-18T21:47:56+00:00","dateModified":"2024-09-18T21:48:46+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/"},"wordCount":988,"commentCount":0,"publisher":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/#organization"},"image":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/capas-1.png","articleSection":["N\u00e3o categorizado"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/","url":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/","name":"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es Python: m\u00e9todos e exemplo","isPartOf":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/#primaryimage"},"image":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/capas-1.png","datePublished":"2024-09-18T21:47:56+00:00","dateModified":"2024-09-18T21:48:46+00:00","description":"Conhe\u00e7a como executar automa\u00e7\u00f5es Python paralelamente, as suas vantagens e como criar seus rob\u00f4s na pr\u00e1tica.","breadcrumb":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/#primaryimage","url":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/capas-1.png","contentUrl":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/capas-1.png","width":1400,"height":800,"caption":"capa do artigo"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.botcity.dev\/pt-br\/2024\/09\/18\/execucao-paralela-de-automacoes-em-python-metodos-e-exemplo-pratico\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.botcity.dev\/pt-br\/"},{"@type":"ListItem","position":2,"name":"Execu\u00e7\u00e3o paralela de automa\u00e7\u00f5es em Python: m\u00e9todos e exemplo pr\u00e1tico"}]},{"@type":"WebSite","@id":"https:\/\/blog.botcity.dev\/pt-br\/#website","url":"https:\/\/blog.botcity.dev\/pt-br\/","name":"Blog BotCity","description":"Explore o blog BotCity com conte\u00fados para automatizar e governar em Python. Mantenha-se informado e melhore o desempenho tecnol\u00f3gico, a seguran\u00e7a e o ROI da sua empresa.","publisher":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.botcity.dev\/pt-br\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/blog.botcity.dev\/pt-br\/#organization","name":"BotCity","url":"https:\/\/blog.botcity.dev\/pt-br\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/blog.botcity.dev\/pt-br\/#\/schema\/logo\/image\/","url":"http:\/\/blog.botcity.dev\/wp-content\/uploads\/2025\/09\/logo_botcity_2024_black.png","contentUrl":"http:\/\/blog.botcity.dev\/wp-content\/uploads\/2025\/09\/logo_botcity_2024_black.png","width":1611,"height":384,"caption":"BotCity"},"image":{"@id":"https:\/\/blog.botcity.dev\/pt-br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/blog.botcity.dev\/pt-br\/#\/schema\/person\/3f40b28507caec54758533d1ae8b59f3","name":"Bruna Ferreira","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/352426ca1245b0377d71a38ec39455339f998d5cd76ff101a0fc27ff9f44a27e?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/352426ca1245b0377d71a38ec39455339f998d5cd76ff101a0fc27ff9f44a27e?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/352426ca1245b0377d71a38ec39455339f998d5cd76ff101a0fc27ff9f44a27e?s=96&d=identicon&r=g","caption":"Bruna Ferreira"},"description":"Sou Bruna Ferreira, bel.a em ci\u00eancia da computa\u00e7\u00e3o, desenvolvedora de software atuando no time DX | AX na BotCity com automa\u00e7\u00e3o RPA e Python. Tamb\u00e9m sou criadora de conte\u00fado, compartilhando tutoriais, artigos, v\u00eddeos e fazendo lives sobre programa\u00e7\u00e3o em diversas plataformas. Participo do CodeShow, o canal \u00e9 um coletivo de criadores de conte\u00fado educacional voltado para programa\u00e7\u00e3o. Tamb\u00e9m da Feministech, uma comunidade feminista com foco em tecnologia e diversidade.","sameAs":["https:\/\/bugelseif.github.io\/website\/"],"url":"https:\/\/blog.botcity.dev\/pt-br\/author\/bugelseif\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/blog.botcity.dev\/wp-content\/uploads\/2024\/09\/capas-1.png","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pdx8c3-29i","_links":{"self":[{"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/posts\/8264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/users\/214060736"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/comments?post=8264"}],"version-history":[{"count":12,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/posts\/8264\/revisions"}],"predecessor-version":[{"id":8298,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/posts\/8264\/revisions\/8298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/media\/8266"}],"wp:attachment":[{"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/media?parent=8264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/categories?post=8264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.botcity.dev\/pt-br\/wp-json\/wp\/v2\/tags?post=8264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}