<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lorenzo Tenti</title>
    <description>The latest articles on DEV Community by Lorenzo Tenti (@lorenzotenti).</description>
    <link>https://dev.to/lorenzotenti</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F98875%2F0778dd2d-4653-47b4-80fb-93a096eb87dd.jpg</url>
      <title>DEV Community: Lorenzo Tenti</title>
      <link>https://dev.to/lorenzotenti</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lorenzotenti"/>
    <language>en</language>
    <item>
      <title>The Future of AI and other stories</title>
      <dc:creator>Lorenzo Tenti</dc:creator>
      <pubDate>Mon, 19 Feb 2024 18:38:39 +0000</pubDate>
      <link>https://dev.to/lorenzotenti/the-future-of-ai-and-other-stories-4dk9</link>
      <guid>https://dev.to/lorenzotenti/the-future-of-ai-and-other-stories-4dk9</guid>
      <description>&lt;p&gt;This article originally appeared on &lt;a href="https://open.substack.com/pub/ingestthis/p/ingest-this-3?r=3z2u0&amp;amp;utm_campaign=post&amp;amp;utm_medium=web"&gt;ingest this!&lt;/a&gt;, a curated newsletter about Data Engineering, MLOps, and Machine Learning Engineering.&lt;/p&gt;




&lt;h2&gt;
  
  
  Read this 📚
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.unusual.vc/post/devtools-for-language-models"&gt;DevTools for language models — predicting the future&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fysncxonn4wmwhtwroqoo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fysncxonn4wmwhtwroqoo.png" alt="LLM capabilities" width="800" height="683"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This post covers the state of LLM DevTools today and where the authors think it’s heading in the future, touching on topics such as experimentation, prompt design, vector databases, and more.&lt;/p&gt;




&lt;h2&gt;
  
  
  Watch this 👀
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.youtube.com/watch?v=L_Guz73e6fw"&gt;OpenAI CEO on GPT-4, ChatGPT, and the future of AI&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In this podcast episode, Lex Fridman interviews Sam Altman, CEO of OpenAI. They cover a wide range of topics, from GPT-4 to the meaning of life.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/L_Guz73e6fw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Hack this 🛠️
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/gventuri/pandas-ai"&gt;Add generative artificial intelligence capabilities to Pandas with PandasAI&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;PandasAI is a Python library that adds generative artificial intelligence capabilities to Pandas, the popular data analysis and manipulation tool. It makes Pandas conversational, allowing you to ask questions about your data and get answers back, in the form of Pandas DataFrames. It can also create plots from a DataFrame.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pandas_ai.run(
    df,
    "Plot the histogram of countries showing for each the gpd, using different colors for each bar")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj71n2wxowm5nyp1961am.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj71n2wxowm5nyp1961am.png" alt="PandasAI example" width="578" height="552"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Meme this 🚀
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmp51ajk996655v0acfx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmp51ajk996655v0acfx.png" alt="ML infra" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This article originally appeared on &lt;a href="https://open.substack.com/pub/ingestthis/p/ingest-this-3?r=3z2u0&amp;amp;utm_campaign=post&amp;amp;utm_medium=web"&gt;ingest this!&lt;/a&gt;, a curated newsletter about Data Engineering, MLOps, and Machine Learning Engineering.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>machinelearningengineering</category>
      <category>dataengineering</category>
      <category>mlops</category>
    </item>
    <item>
      <title>Build data apps with markdown and SQL &amp; other stories</title>
      <dc:creator>Lorenzo Tenti</dc:creator>
      <pubDate>Mon, 19 Feb 2024 18:25:06 +0000</pubDate>
      <link>https://dev.to/lorenzotenti/build-data-apps-with-markdown-and-sql-l6g</link>
      <guid>https://dev.to/lorenzotenti/build-data-apps-with-markdown-and-sql-l6g</guid>
      <description>&lt;p&gt;This article originally appeared on &lt;a href="https://open.substack.com/pub/ingestthis/p/build-data-apps-with-sql?r=3z2u0&amp;amp;utm_campaign=post&amp;amp;utm_medium=web&amp;amp;showWelcomeOnShare=true"&gt;ingest this!&lt;/a&gt;, a curated newsletter about Data Engineering, MLOps, and Machine Learning Engineering.&lt;/p&gt;

&lt;p&gt;The cover picture was generated using ChatGPT 4:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here's a cartoon representation of SQL functionalities, set in a whimsical data world. This playful illustration brings to life the various SQL operations with colorful, anthropomorphic characters each performing their unique tasks in a fantastical digital realm.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Read this 📚
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://practicaldataengineering.substack.com/p/open-source-data-engineering-landscape"&gt;Open Source Data Engineering Landscape 2024&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fphb02z4m2zx68x5n1ayx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fphb02z4m2zx68x5n1ayx.png" alt="Open Source Data Engineering Landscape 2024" width="800" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This post from Practical Data Engineering presents a full exploration of the open-source data engineering landscape for 2024. As usual, it’s both overwhelming and inspiring. I’m sure you’ll discover something new while reading this.&lt;/p&gt;




&lt;h2&gt;
  
  
  Watch this 👀
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.youtube.com/watch?v=ww99npDh4cg"&gt;The Future of Knowledge Graphs in a World of LLMs&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This video discusses the future of knowledge graphs in the context of large language models (LLMs), showing how they will complement each other, allowing us to reap the benefits of both technologies.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ww99npDh4cg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Hack this 🛠️
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/evidence-dev/evidence"&gt;Build polished data products with SQL&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Evidence is a lightweight framework for building data apps using markdown and SQL. It's open source and free to get started.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou11k9bs8uueela769hy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou11k9bs8uueela769hy.png" alt="Evidence" width="600" height="424"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Meme this 🚀
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figzstctz377ovfyg8eny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figzstctz377ovfyg8eny.png" alt="Dog Interviewer" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This article originally appeared on &lt;a href="https://open.substack.com/pub/ingestthis/p/build-data-apps-with-sql?r=3z2u0&amp;amp;utm_campaign=post&amp;amp;utm_medium=web&amp;amp;showWelcomeOnShare=true"&gt;ingest this!&lt;/a&gt;, a curated newsletter about Data Engineering, MLOps, and Machine Learning Engineering.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>mlops</category>
      <category>dataengineering</category>
      <category>machinelearningengineering</category>
    </item>
    <item>
      <title>Big Data is dead &amp; other stories</title>
      <dc:creator>Lorenzo Tenti</dc:creator>
      <pubDate>Tue, 13 Feb 2024 09:57:35 +0000</pubDate>
      <link>https://dev.to/lorenzotenti/big-data-is-dead-other-stories-6bg</link>
      <guid>https://dev.to/lorenzotenti/big-data-is-dead-other-stories-6bg</guid>
      <description>&lt;p&gt;This article originally appeared on &lt;a href="https://ingestthis.substack.com/p/ingest-this-2"&gt;ingest this!&lt;/a&gt;, a curated newsletter about Data Engineering, MLOps, and Machine Learning Engineering.&lt;/p&gt;




&lt;h2&gt;
  
  
  Read this 📚
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://motherduck.com/blog/big-data-is-dead/"&gt;Big Data is Dead&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1_xzB9Dc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://substackcdn.com/image/fetch/w_1456%2Cc_limit%2Cf_auto%2Cq_auto:good%2Cfl_progressive:steep/https%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F8287f3c0-9be7-480e-b59d-dfb360d60c60_850x627.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1_xzB9Dc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://substackcdn.com/image/fetch/w_1456%2Cc_limit%2Cf_auto%2Cq_auto:good%2Cfl_progressive:steep/https%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F8287f3c0-9be7-480e-b59d-dfb360d60c60_850x627.jpeg" alt="single machines are capable of processing a much greater percentage of workloads as time goes on and technology advances" title="single machines are capable of processing a much greater percentage of workloads as time goes on and technology advances" width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, &lt;a href="https://twitter.com/jrdntgn"&gt;Jordan Tigani&lt;/a&gt; challenges the idea that &lt;strong&gt;big data&lt;/strong&gt; is necessary for analytics and argues that it’s mainly a result of poor data management practices. The article explains that big data solutions are often overkill for most analytics workloads and that they incur high costs and complexity. In addition, he suggests that modern hardware advancements have made it possible to process large amounts of data on a single machine without the need for distributed computing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Learn this 🧑🏻‍🏫
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/dair-ai/Prompt-Engineering-Guide"&gt;Prompt Engineering Guide&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Prompt engineering is a hot topic these days, thanks to the rise of &lt;strong&gt;large language models&lt;/strong&gt; (did you catch that?). This guide has everything you need to get started: recent papers, tutorials, videos, links and tools.&lt;/p&gt;




&lt;h2&gt;
  
  
  Watch this 👀
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.youtube.com/watch?v=HaEPXoXVf2k"&gt;Advanced Design Patterns for DynamoDB&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/HaEPXoXVf2k"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The first time I watched this talk, I found it mind-blowing. Rick Houlihan reveals the common misconceptions about NoSQL database services. I used to think &lt;strong&gt;NoSQL&lt;/strong&gt; was great for its flexibility, but the opposite is often true. Even if he focuses on DynamoDB, the concepts explained in the talk (&lt;strong&gt;single-table design&lt;/strong&gt; and using composite keys to support different &lt;strong&gt;access patterns&lt;/strong&gt;) can be applied to many other services. Definitely a must-watch.&lt;/p&gt;




&lt;h2&gt;
  
  
  Hack this 🛠️
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://theresanaiforthat.com/"&gt;There's an AI for that&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This website, by &lt;a href="https://twitter.com/imakecoolsites"&gt;Andrei&lt;/a&gt;, is a curated list of products offering AI-based solutions to any kind of problem.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: this is not an invite to literally hack the website but only to have fun with one of the tools you’ll find there.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Meme this 🚀
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ysjWkA8x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://substackcdn.com/image/fetch/w_1456%2Cc_limit%2Cf_auto%2Cq_auto:good%2Cfl_progressive:steep/https%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F66c5290a-b3e8-43b6-821d-010499c81df9_1080x1311.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ysjWkA8x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://substackcdn.com/image/fetch/w_1456%2Cc_limit%2Cf_auto%2Cq_auto:good%2Cfl_progressive:steep/https%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252F66c5290a-b3e8-43b6-821d-010499c81df9_1080x1311.jpeg" alt="meme this!" width="800" height="971"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This article originally appeared on &lt;a href="https://ingestthis.substack.com/p/ingest-this-2"&gt;ingest this!&lt;/a&gt;, a curated newsletter about Data Engineering, MLOps, and Machine Learning Engineering.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>machinelearningengineering</category>
      <category>dataengineering</category>
      <category>mlops</category>
    </item>
    <item>
      <title>SQL should be your default choice &amp; other stories</title>
      <dc:creator>Lorenzo Tenti</dc:creator>
      <pubDate>Thu, 08 Feb 2024 10:50:14 +0000</pubDate>
      <link>https://dev.to/lorenzotenti/sql-should-be-your-default-choice-other-stories-4pah</link>
      <guid>https://dev.to/lorenzotenti/sql-should-be-your-default-choice-other-stories-4pah</guid>
      <description>&lt;p&gt;This article originally appeared on &lt;a href="https://ingestthis.substack.com/p/ingest-this-1"&gt;ingest this!&lt;/a&gt;, a curated newsletter about Data Engineering, MLOps, and Machine Learning Engineering.&lt;/p&gt;




&lt;h2&gt;
  
  
  Read this 📚
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.robinlinacre.com/recommend_sql/"&gt;SQL should be your default choice for data engineering pipelines&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;We all love a bit of SQL, but is it powerful enough to be the only language used in your data engineering pipelines? In this article, &lt;a href="https://twitter.com/RobinLinacre"&gt;Robin Linacre&lt;/a&gt; argues that you should look no further than SQL, thanks to modern techniques, such as CTEs, and new tools, such as &lt;a href="https://duckdb.org/"&gt;DuckDB&lt;/a&gt;, &lt;a href="https://github.com/tobymao/sqlglot"&gt;SQLGlot&lt;/a&gt;, and &lt;a href="https://github.com/dbt-labs/dbt-core"&gt;dbt&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Watch this 👀
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.youtube.com/watch?v=avoijDORAlc"&gt;Andrew Ng on Data-Centric AI&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Andrew Ng discusses how and why we should move from big data to good data when building AI systems.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/avoijDORAlc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Hear this 🎧
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://podcasts.apple.com/us/podcast/airflow-sucks-for-mlops-stephen-bailey-mlops-podcast-141/id1505372978?i=1000594970549"&gt;Airflow Sucks for MLOps&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Demetrios Brinkmann from MLOps.community interviews Stephen Bailey about working with data platforms, the problems related to the orchestration layer and the limits of the current tools.&lt;/p&gt;

&lt;p&gt;Also available as a video &lt;a href="https://home.mlops.community/public/videos/airflow-sucks-for-mlops"&gt;here&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Hack this 🛠️
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/red-data-tools/YouPlot"&gt;Draw plots on the terminal with YouPlot&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;YouPlot is a great tool written in Ruby that allows you to create plots directly on your terminal. Many different plot types are available.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg31nrkd0mhv6jhn3717p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg31nrkd0mhv6jhn3717p.png" alt="YouPlot in action" width="631" height="383"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Meme this 🚀
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6no4eku09443d59pf3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6no4eku09443d59pf3w.png" alt="Worked fine in Jupyter" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>mlops</category>
      <category>machinelearning</category>
      <category>machinelearningengineering</category>
    </item>
    <item>
      <title>How to build a Serverless Twitter bot</title>
      <dc:creator>Lorenzo Tenti</dc:creator>
      <pubDate>Wed, 30 Jan 2019 16:22:50 +0000</pubDate>
      <link>https://dev.to/lorenzotenti/how-to-build-a-serverless-twitter-bot-lph</link>
      <guid>https://dev.to/lorenzotenti/how-to-build-a-serverless-twitter-bot-lph</guid>
      <description>&lt;p&gt;In this post I'm going to show you how to build a Twitter bot using the &lt;a href="https://github.com/serverless/serverless" rel="noopener noreferrer"&gt;Serverless Framework&lt;/a&gt;. This framework represents "the easy and open way to build serverless applications", and if you don't know what I'm talking about you should definitely check it out.&lt;/p&gt;

&lt;p&gt;We're going to build a bot that will retweet at regular intervals the most relevant tweets about serverless computing, and will follow the tweet's author. Have a look &lt;a href="https://twitter.com/_serverlessbot_" rel="noopener noreferrer"&gt;here&lt;/a&gt; if you're not afraid of spoilers.&lt;/p&gt;

&lt;p&gt;For this tutorial we're using AWS Lambda with the Python 3.6 runtime, but you could easily switch to another provider/programming language. &lt;/p&gt;

&lt;p&gt;We are going to interact with the Twitter API using &lt;a href="https://twython.readthedocs.io" rel="noopener noreferrer"&gt;Twython&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setup the Twitter Account and App
&lt;/h1&gt;

&lt;p&gt;First of all, you need to create a Twitter account for the bot and then go to &lt;a href="https://developer.twitter.com/" rel="noopener noreferrer"&gt;developer.twitter.com&lt;/a&gt; to apply for a developer account to access the Twitter API.&lt;/p&gt;

&lt;p&gt;After that, you can create a Twitter App and get the keys and tokens needed. The Twitter interface is easy to use and the process is quite straightforward.&lt;/p&gt;

&lt;h1&gt;
  
  
  Install Serverless and configure the environment
&lt;/h1&gt;

&lt;p&gt;The easiest way to install the Serverless framework is to follow their installation guide, &lt;a href="https://serverless.com/framework/docs/providers/aws/guide/installation/" rel="noopener noreferrer"&gt;here&lt;/a&gt;, and then setup the AWS credentials as shown &lt;a href="https://serverless.com/framework/docs/providers/aws/guide/credentials/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;When the the framework is installed and configured, a new service can be easily created with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;serverless create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--template&lt;/span&gt; aws-python3 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; serverlessbot &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--path&lt;/span&gt; serverlessbot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then, &lt;code&gt;cd&lt;/code&gt; into the newly created directory and create a Python virtual environment using &lt;code&gt;virtualenv&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;serverlessbot
&lt;span class="nv"&gt;$ &lt;/span&gt;virtualenv venv &lt;span class="nt"&gt;--python&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;python3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You will need to activate the virtual environment with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;source &lt;/span&gt;venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now you can install the &lt;code&gt;twython&lt;/code&gt; library and then save the package versions of the environment to a &lt;code&gt;requirements.txt&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;twython
&lt;span class="nv"&gt;$ &lt;/span&gt;pip freeze &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;At this point we should be ready to start coding the bot. However, manually configuring Lambda to use external libraries could be tricky, therefore we're going to use the &lt;code&gt;serverless-python-requirements&lt;/code&gt; plugin to make it easier.&lt;/p&gt;

&lt;p&gt;First of all, initialize &lt;code&gt;npm&lt;/code&gt; with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npm init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;accept all the defaults (press enter several times)&lt;br&gt;
then install the plugin with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save&lt;/span&gt; serverless-python-requirements
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Finally, add the following at the end of your &lt;code&gt;serverless.yml&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;serverless-python-requirements&lt;/span&gt;

&lt;span class="na"&gt;custom&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pythonRequirements&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;dockerizePip&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;non-linux&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You can find more information on this plugin &lt;a href="https://serverless.com/blog/serverless-python-packaging/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Programming the bot
&lt;/h1&gt;

&lt;p&gt;Now we can finally start building the bot. &lt;/p&gt;

&lt;p&gt;We have to change the &lt;code&gt;functions&lt;/code&gt; section in the &lt;code&gt;serverless.yml&lt;/code&gt; file to look like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;functions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;retweet&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;handler.retweet&lt;/span&gt;
    &lt;span class="na"&gt;events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;rate(2 hours)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This will call the method &lt;code&gt;retweet&lt;/code&gt; of &lt;code&gt;handler.py&lt;/code&gt; every 2 hours. &lt;/p&gt;

&lt;p&gt;Then, we can replace the &lt;code&gt;handler.py&lt;/code&gt; file with the following content:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;twython&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Twython&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TwythonError&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;retweet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;

    &lt;span class="n"&gt;twitter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Twython&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;APP_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;APP_SECRET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OAUTH_TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OAUTH_TOKEN_SECRET&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;search_results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;twitter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;serverless&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;mixed&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;en&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;tweet&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;search_results&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;statuses&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;twitter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;retweet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tweet&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
            &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Retweeted &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;tweet&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt; by &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;tweet&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
            &lt;span class="n"&gt;twitter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_friendship&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tweet&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;TwythonError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;pass&lt;/span&gt;

    &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;statusCode&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;body&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The code is quite self-explanatory. Basically, we are searching for English tweets mentioning &lt;code&gt;serverless&lt;/code&gt;, retweeting them, and follow the tweet's author.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;return response&lt;/code&gt; is only for logging and testing.&lt;/p&gt;

&lt;p&gt;As you can see, the Twitter keys and tokens are read using &lt;code&gt;config&lt;/code&gt;. All you need to do is to create a &lt;code&gt;config.py&lt;/code&gt; file in the same directory and fill it with the information you got from the Twitter App page:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;APP_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xxxyyyzz&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;APP_SECRET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xxxyyyzz&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;OAUTH_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xxxyyyzz-xxxyyyzz&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;OAUTH_TOKEN_SECRET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xxxyyyzz&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h1&gt;
  
  
  Deploying the bot
&lt;/h1&gt;

&lt;p&gt;At this point, we're going to deploy the function with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;serverless deploy &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Serverless Framework will now take care of everything needed to deploy your Lambda function. When the process is finished, you will be able to see it in the Lambda Management Console on AWS. If you notice, there will be a CloudWatch event configured to fire the function every 2 hours. &lt;/p&gt;

&lt;p&gt;If you don't want to wait 2 hours, you can invoke the function directly with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;serverless invoke &lt;span class="nt"&gt;-f&lt;/span&gt; retweet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If you want to remove the function from your AWS account you can simply use:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;serverless remove
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That's it. You now have your own Twitter bot able to retweeting and following users. You can learn how to add many more functionalities reading the Twython documentation.&lt;/p&gt;
&lt;h1&gt;
  
  
  Closing remarks
&lt;/h1&gt;

&lt;p&gt;The full code used in this article is available on GitHub:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/lorenzotenti" rel="noopener noreferrer"&gt;
        lorenzotenti
      &lt;/a&gt; / &lt;a href="https://github.com/lorenzotenti/serverlessbot" rel="noopener noreferrer"&gt;
        serverlessbot
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;serverlessbot&lt;/h1&gt;

&lt;/div&gt;

&lt;p&gt;This is a Twitter bot retweeting at regular intervals the most relevant tweets about serverless computing.&lt;/p&gt;

&lt;p&gt;Find it &lt;a href="https://twitter.com/_serverlessbot_" rel="nofollow noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A tutorial on how to build this bot can be found &lt;a href="https://dev.to/lorenzotenti/how-to-build-a-serverless-twitter-bot-lph" rel="nofollow"&gt;here&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;It needs a config.py file with the Twitter API keys in order to work:&lt;/p&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;APP_KEY="YOUR_APP_KEY"
APP_SECRET="YOUR_APP_SECRET"
OAUTH_TOKEN="YOUR_OAUTH_TOKEN"
OAUTH_TOKEN_SECRET="YOUR_OAUTH_TOKEN_SECRET"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/lorenzotenti/serverlessbot" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The &lt;em&gt;_serverlessbot_&lt;/em&gt; built in this article can be found &lt;a href="https://twitter.com/_serverlessbot_" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope you liked this tutorial. If not, let me know why in the comments. &lt;/p&gt;

</description>
      <category>serverless</category>
      <category>lambda</category>
      <category>python</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
