<?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: h2L</title>
    <description>The latest articles on DEV Community by h2L (@h2l).</description>
    <link>https://dev.to/h2l</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%2F193445%2F56950f6f-aa4b-4624-a5ad-8d75715dd9fd.png</url>
      <title>DEV Community: h2L</title>
      <link>https://dev.to/h2l</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/h2l"/>
    <language>en</language>
    <item>
      <title>How should I go about making multiple concurrent api calls from FastAPI ?</title>
      <dc:creator>h2L</dc:creator>
      <pubDate>Fri, 04 Dec 2020 04:58:08 +0000</pubDate>
      <link>https://dev.to/h2l/how-should-i-go-about-making-multiple-concurrent-api-calls-from-fastapi-59id</link>
      <guid>https://dev.to/h2l/how-should-i-go-about-making-multiple-concurrent-api-calls-from-fastapi-59id</guid>
      <description>&lt;p&gt;I am currently supporting an API that generates a report for my team using the python framework FastAPI. One of my endpoints makes a call to function called generate which in turn makes 4 calls to the same service to get different pieces of data for the report being built. The extract function is synchronous and takes about 10 - 15 seconds per call to get data.&lt;/p&gt;

&lt;p&gt;For now, I would like to keep my '/report' endpoint synchronous but I would like to concurrently make those 4 calls in the generate function below to speed up response times. How should I got about achieving this in FastAPI. Should I spawn threads? Should I use something within the framework to achieve this ?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@app.route('/report')
def fetch_report():
    return report.generate()


 def generate():
  #would like to call these at the same time essentially
  data1 = reporting_datasource.extract(r1)
  data2 = reporting_datasource.extract(r2)
  data3 = reporting_datasource.extract(r3)
  data4 = reporting_datasource.extract(r4)

  return { 
    'part1' : data1,
    'part2' : data2,
    'part3' : data3,
    'part4' : data4
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>fastapi</category>
      <category>asynchronous</category>
      <category>api</category>
    </item>
    <item>
      <title>Python Pattern Design Help!!!</title>
      <dc:creator>h2L</dc:creator>
      <pubDate>Tue, 15 Sep 2020 13:53:50 +0000</pubDate>
      <link>https://dev.to/h2l/python-pattern-design-help-3k1g</link>
      <guid>https://dev.to/h2l/python-pattern-design-help-3k1g</guid>
      <description>&lt;p&gt;I am developing a service at work that generates a report on a weekly basis. The api I use to get the data can take a while so rather than blocking, the api returns a new url to the soon-to-be-completed report that I have to poll until the data returns. To generate my report, I have to make 5 calls to this api. In addition, data from 3 of the calls are related as they have to be combined and massaged to create a particular section of the my report. The data from the other 2 api calls can be copied to the report as returned. I was wondering what type of pattern should I use here. Async polling? &lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Good sources (courses, books, sites) on database design and data modeling?</title>
      <dc:creator>h2L</dc:creator>
      <pubDate>Wed, 29 Jan 2020 15:37:19 +0000</pubDate>
      <link>https://dev.to/h2l/good-sources-courses-books-sites-on-database-design-and-data-modeling-3m2n</link>
      <guid>https://dev.to/h2l/good-sources-courses-books-sites-on-database-design-and-data-modeling-3m2n</guid>
      <description>&lt;p&gt;Hi, everyone! Hope everyone is well. I am new to the community! I am currently in search of some sound resources on database design and data modeling. It would be nice to find some sources that include both theory and a couple of case studies showcasing the implementation of good data modeling design practices/patterns. Anything helps! Thanks in advance!&lt;/p&gt;

</description>
      <category>database</category>
      <category>design</category>
      <category>sql</category>
    </item>
    <item>
      <title>Database management and use among multiple developers?</title>
      <dc:creator>h2L</dc:creator>
      <pubDate>Thu, 11 Jul 2019 02:43:26 +0000</pubDate>
      <link>https://dev.to/h2l/database-management-and-use-among-multiple-developers-5eoh</link>
      <guid>https://dev.to/h2l/database-management-and-use-among-multiple-developers-5eoh</guid>
      <description>&lt;p&gt;A couple of friends and I started developing an application and we are currently using a MySQL database. It's really just for practice, but we were wondering how would you go about creating a database and sharing the database with my other teammates so we can all use the same dummy data to test and develop with.&lt;/p&gt;

&lt;p&gt;Should I execute mysqldump command and source the generated sql script? With that, how would I manage credentials?&lt;/p&gt;

&lt;p&gt;Or should I just create a low-cost development database on some cloud platform to remove the dependency all together?&lt;/p&gt;

</description>
      <category>sql</category>
    </item>
  </channel>
</rss>
