<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Joaquin Acuña, Author at asap developers</title>
	<atom:link href="https://www.asapdevelopers.com/author/joaco-acuna/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.asapdevelopers.com/author/joaco-acuna/</link>
	<description>San Francisco Mobile App Developers</description>
	<lastBuildDate>Mon, 11 Jul 2022 19:20:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>

<image>
	<url>https://www.asapdevelopers.com/wp-content/uploads/2017/04/favicon-asap-1.png</url>
	<title>Joaquin Acuña, Author at asap developers</title>
	<link>https://www.asapdevelopers.com/author/joaco-acuna/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Data analytics using Python’s Dash framework</title>
		<link>https://www.asapdevelopers.com/data-analytics-using-python-dash-framework/</link>
					<comments>https://www.asapdevelopers.com/data-analytics-using-python-dash-framework/#respond</comments>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 11 Jul 2022 19:20:15 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=15155</guid>

					<description><![CDATA[<p>Data analytics is a big part of the tech industry and one of the key tools of any successful decision-making process. Having the right means to manage and visualize data...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/data-analytics-using-python-dash-framework/">Data analytics using Python’s Dash framework</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-weight: 400;">Data analytics is a big part of the tech industry and one of the key tools of any successful decision-making process. Having the right means to manage and visualize data can be a lifesaver in many situations. This is why, in this article, we will show how to use Python Dash to build a choropleth map app for data analytics and go over some Dash framework basics.</span></p>
<h2><span style="font-weight: 400;">What is Dash? </span></h2>
<p><span style="font-weight: 400;">According to the </span><a href="https://dash.plotly.com/"><span style="font-weight: 400;">official documentation</span></a><span style="font-weight: 400;">, “<em>Dash is the original low-code framework for rapidly building data apps in Python, R, Julia, and F# (experimental).</em>”</span></p>
<p><span style="font-weight: 400;">Dash was written on top of Plotly.js and React.js, making it an ideal tool for building and deploying data apps with customized user interfaces. Dash works by abstracting away all the technologies and protocols needed to build a full-stack web app that includes interactive data visualization through a couple of simple patterns.</span></p>
<p><span style="font-weight: 400;">Dash is so simple that it will take you less than 10 minutes to bind a user interface to your code.</span></p>
<p><span style="font-weight: 400;">An app developed with Dash is rendered on a web browser. It can be deployed to VMs or</span><a href="https://plotly.com/dash/kubernetes/"> <span style="font-weight: 400;">Kubernetes clusters</span></a><span style="font-weight: 400;"> to then share it through URLs. The fact that Dash is rendered on the web, means it’s also inherently cross-platform and mobile-ready!</span></p>
<p><span style="font-weight: 400;">All of these features make Dash quite popular; the framework is currently downloaded 600,000 times each month.</span></p>
<h2><span style="font-weight: 400;">What can be done with Dash? </span></h2>
<p><span style="font-weight: 400;">Well, Dash is just the pencil and you are the actual artist. However, to give an idea of what this framework can help you create, check out the </span><a href="https://dash.gallery/Portal/"><span style="font-weight: 400;">Dash app gallery</span></a><span style="font-weight: 400;">.</span></p>
<p><a href="https://dash.gallery/dash-soccer-analytics/"><span style="font-weight: 400;">This</span></a><span style="font-weight: 400;"> is my personal favorite.</span></p>
<h2><span style="font-weight: 400;">Building your first Dash graph</span></h2>
<p><span style="font-weight: 400;">Now that you have some context, let’s get to it and build a Dash graph.</span></p>
<h3><span style="font-weight: 400;">Install Python&#8217;s Dash</span></h3>
<p><span style="font-weight: 400;">First, you’ll need to create a virtual environment and activate it.</span></p>
<p>&nbsp;</p>
<p><strong>virtualenv dashvenv</strong></p>
<p><strong>source ./dashvenv/bin/activate</strong></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Then, install Dash.</span></p>
<p>&nbsp;</p>
<p><strong>pip install dash</strong></p>
<p><strong>pip install jupyter-dash</strong></p>
<p><strong>pip install pandas</strong></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">You can try running one of Dash’s ready-made examples; just create an app.py file and copy one of the </span><a href="https://dash.plotly.com/layout"><span style="font-weight: 400;">following examples</span></a><span style="font-weight: 400;">. For this article, we’ll be using the one below.</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">gist</span></p>
<p><script src="https://gist.github.com/JoaquinAcuna97/046b3881aac13b796dce3713d20fb60f.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/046b3881aac13b796dce3713d20fb60f"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400;">Test the installation</span></h3>
<p><span style="font-weight: 400;">Now, run the example and see how it works. </span></p>
<p><strong># Run this app with `python app.py` and</strong></p>
<p><strong># visit http://127.0.0.1:8050/ in your web browser.</strong></p>
<h3><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-15161 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image1-300x116.png" alt="" width="393" height="152" srcset="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image1-300x116.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image1-768x296.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image1-900x349.png 900w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image1.png 906w" sizes="(max-width: 393px) 100vw, 393px" /></span></h3>
<h3><span style="font-weight: 400;">Change the example</span></h3>
<p><span style="font-weight: 400;">Dash includes a hot-reloading feature that is activated by default when running an app with app.run_server(debug=True). Therefore, Dash will automatically refresh your browser whenever you make a change to your code.</span></p>
<p><span style="font-weight: 400;">Give it a try by changing the title &#8220;Hello Dash&#8221; in your application or by changing the data on the x- or y-axis. Your app should auto-refresh with your changes.</span></p>
<h2><span style="font-weight: 400;">The 3 pillars of Dash</span></h2>
<p><span style="font-weight: 400;">We’ve shown you how to create an example graph app using Dash. Now it’s time to dig a little deeper into Dash itself by looking into three aspects of this framework: Dash components, plotly graphs, and Dash callbacks.</span></p>
<h3><span style="font-weight: 400;">Dash components</span></h3>
<p><span style="font-weight: 400;">dash_html_components (known as dash.html as of Dash version 2.0) includes a component class for each HTML tag, as well as keyword arguments for every HTML argument.</span></p>
<p><span style="font-weight: 400;">Dash provides supercharged components to help you create interactive user interfaces. You can find a core set of components (that are written and maintained by the Dash team) in the dash-core-components library.</span></p>
<p><span style="font-weight: 400;">When it comes to producing Dash apps, we&#8217;d advise you to manage the Dash Core Components styling and layout with Dash Enterprise.</span></p>
<h3><a href="https://plotly.com/python/"><span style="font-weight: 400;">Plotly graphs</span></a></h3>
<p><span style="font-weight: 400;">Plotly&#8217;s Python graphing library helps you create interactive graphs with publication quality. The library includes a wide variety of examples showing you how to produce different plots, charts, histograms, heatmaps, and more. Plotly.py is</span><a href="https://plotly.com/python/is-plotly-free"> <span style="font-weight: 400;">free and open-source</span></a><span style="font-weight: 400;">; this means you can</span><a href="https://github.com/plotly/plotly.py"> <span style="font-weight: 400;">view the source, report issues or even contribute on GitHub</span></a><span style="font-weight: 400;">!</span></p>
<h3><span style="font-weight: 400;">Dash callbacks</span></h3>
<p><span style="font-weight: 400;">Dash apps use callback functions (i.e.: functions that are automatically called by Dash whenever an input component&#8217;s property changes), in order to update some property in another component (i.e.: the output).</span></p>
<h2><span style="font-weight: 400;">Creating your own Python&#8217;s Dash app</span></h2>
<p><span style="font-weight: 400;">Now that we’ve gone over the basics, it’s time to get serious.</span></p>
<p><span style="font-weight: 400;">We will use a </span><a href="https://github.com/owid/covid-19-data/tree/master/public/data"><span style="font-weight: 400;">Covid-19 public dataset</span></a><span style="font-weight: 400;"> to create a world map with the pandemic evolution over time.  </span></p>
<p><span style="font-weight: 400;">First, you need to pull the data as CSV and create a pandas dataframe that includes just the relevant information.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-15162 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image2-1-300x75.png" alt="" width="436" height="109" srcset="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image2-1-300x75.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image2-1-768x192.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image2-1.png 929w" sizes="(max-width: 436px) 100vw, 436px" /></span></p>
<p><span style="font-weight: 400;">Then, create a Dash component that contains the following:</span></p>
<ul>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">DIV</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">H1 header</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">DROPDOWN slct_year, which will contain the dates of our dataset</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">DIV output_container, a div that will display a user-friendly message </span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">A graph of the world heat map</span></li>
</ul>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">To do this, you’ll have to re-format the dates in an object to create the Dash dropdown component.  </span></p>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-15163" src="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image3-300x47.png" alt="python dash" width="421" height="66" srcset="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image3-300x47.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image3-768x120.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image3.png 845w" sizes="(max-width: 421px) 100vw, 421px" /></p>
<p><span style="font-weight: 400;">Then, you can create the app layout with your Dash components.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-15164" src="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image4-300x127.png" alt="python dash" width="435" height="184" srcset="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image4-300x127.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image4-768x326.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image4.png 788w" sizes="(max-width: 435px) 100vw, 435px" /></span></p>
<p><span style="font-weight: 400;">Now, you’ll need to create a callback function that will have the dropdown value as input, and the output_container and the map to update the information with the given input.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-15165" src="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image5-300x53.png" alt="python dash framework" width="408" height="72" srcset="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image5-300x53.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image5.png 661w" sizes="(max-width: 408px) 100vw, 408px" /></span></p>
<p><span style="font-weight: 400;">Then, you can define what to do with the input given value, that is, the selected year.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-15166 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image6-300x171.png" alt="" width="391" height="223" srcset="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image6-300x171.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image6.png 735w" sizes="(max-width: 391px) 100vw, 391px" /></span></p>
<p><span style="font-weight: 400;">You then create the friendly message and the choropleth graph.</span></p>
<p><span style="font-weight: 400;">You can find more information about this plotly.express.choropleth </span><a href="https://plotly.github.io/plotly.py-docs/generated/plotly.express.choropleth.html"><span style="font-weight: 400;">here</span></a><span style="font-weight: 400;">.</span></p>
<p><span style="font-weight: 400;">The data frame will be filtered by date; you can go ahead and add a continent filter, or add a selector for different values, such as vaccination percentage or tests performed.</span></p>
<p><span style="font-weight: 400;">If everything goes well, you should be able to run our app and see it working.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-15167" src="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image7-300x163.png" alt="python's dash" width="427" height="232" srcset="https://www.asapdevelopers.com/wp-content/uploads/2022/07/image7-300x163.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image7-1024x556.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image7-768x417.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image7-1536x834.png 1536w, https://www.asapdevelopers.com/wp-content/uploads/2022/07/image7.png 1680w" sizes="(max-width: 427px) 100vw, 427px" /></span></p>
<p><span style="font-weight: 400;">You can find the repository for this project </span><a href="https://github.com/JoaquinAcuna97/dash.plotly"><span style="font-weight: 400;">here</span></a><span style="font-weight: 400;">.</span></p>
<h2><span style="font-weight: 400;">Final thoughts on data analytics using Python Dash framework</span></h2>
<p><span style="font-weight: 400;">As we can see, amazing apps can be built with small pieces of code by using <a href="https://www.asapdevelopers.com/python-development-company/">Python Dash framework</a>. This is definitely a powerful tool for every developer to have in their toolkit. Moreover, as we all know, when it comes to building something complex, patience and practice are the keys to success. So start practicing!</span></p>
<p>&nbsp;</p>

		<div id="fws_6939788d24bd7"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row top-level standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/python-development-company/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Python Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/data-analytics-using-python-dash-framework/">Data analytics using Python’s Dash framework</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.asapdevelopers.com/data-analytics-using-python-dash-framework/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Flutter with BDD</title>
		<link>https://www.asapdevelopers.com/flutter-with-bdd/</link>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 15 Nov 2021 20:50:19 +0000</pubDate>
				<category><![CDATA[Flutter]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=15044</guid>

					<description><![CDATA[<p>Flutter BDD. “If we want to get serious about quality, it is time to get tired of finding and fixing bugs, and start preventing their happening in the first place.”...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/flutter-with-bdd/">Flutter with BDD</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Flutter BDD. “If we want to get serious about quality, it is time to get tired of finding and fixing bugs, and start preventing their happening in the first place.” Alan Page.</p>



<h2>What is BDD or Behavior Driven Development?</h2>



<p>BDD is a work methodology for software teams that closes the gap between those working on the business side of a project and those on the technical side. This is achieved by:</p>



<ul>
<li>Encouraging collaboration across roles to build a shared understanding of the problem to be solved</li>
<li>Working in rapid and small iterations to increase feedback and the value flow</li>
<li>Producing system documentation that is automatically checked against the system’s behavior</li>
</ul>



<p>All of this is done by focusing collaborative work around concrete, real-world examples that illustrate how we want the system to behave. Those examples guide developers from concept through to implementation in a process of continuous collaboration.</p>





<h2><strong><img decoding="async" loading="lazy" class=" wp-image-15053 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/11/snipsnip1-300x148.png" alt="flutter with bdd" width="343" height="169" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/11/snipsnip1-300x148.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/11/snipsnip1.png 700w" sizes="(max-width: 343px) 100vw, 343px" /></strong></h2>
<h2><strong>Why Use Flutter with BDD</strong></h2>



<p>We thought Teresa Wu made a perfect point in her Mobile London talk on <a href="https://www.youtube.com/watch?v=krY-6YOMJck&amp;t=505s"><em>How to implement BDD in a Flutter project</em></a>, so we’ll let her speak for us as to why or when to use BDD:</p>



<p>“<strong>Given </strong>the mission to get things done right and in time</p>



<p><strong>And </strong>mitigate creating tech debt for the future self </p>



<p><strong>When</strong> working with the new project</p>



<p><strong>Then</strong> we use BDD”</p>



<h2><strong>BDD and agile</strong></h2>



<p>If your team is using agile methodologies already, it can aid you in planning your work in small increments of value like user stories. Keep in mind that BDD doesn’t replace your existing agile process, it just enhances it.</p>



<p>BDD could be compared to a set of plugins for your existing process that will help your team be more capable to deliver on the promises of agile. In other words, BDD will help your team produce timely, reliable releases of working software that meet your organization’s requirements.</p>





<h2><img decoding="async" loading="lazy" class=" wp-image-15054 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/11/snipsnip2-300x289.png" alt="flutter with bdd - wheel" width="342" height="329" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/11/snipsnip2-300x289.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/11/snipsnip2.png 478w" sizes="(max-width: 342px) 100vw, 342px" /></h2>
<h2>Flutter with BDD</h2>



<h3><strong>Building our first Flutter App with BDD</strong></h3>



<p>Let&#8217;s start by building our very first Flutter App using BDD. </p>



<p>We’ll assume that you have your development environment working and that you are able to see the start template app. We’ll be using the web stable version of Flutter.  </p>



<figure class="wp-block-image"><img decoding="async" loading="lazy" class="aligncenter" src="https://lh3.googleusercontent.com/9w79j4ZUlVAo5_STXFxbnFDWcpMB77BSKyHb4xOz9SFCo-RZ0tnqaS4k8bKVyYZzrSiB21yZRKRt8LW4m5YzZPDLZCCrEqNmh5rR3jYQsX8MsWoqG58rNDdT2AGSCQ" alt="flutter with BDD screenshot" width="588" height="559" /></figure>



<p>As we are using BDD, we’ll be focusing on the sometimes regrettably ignored test folder. Files in this folder start compiling just fine, but as the project grows, most developers break its files and end up deleting one or more files, or even the entire folder. </p>



<figure class="wp-block-image"><img decoding="async" loading="lazy" class="aligncenter" src="https://lh5.googleusercontent.com/_GPE_pzCtyh2-QzVf0hsKiYZ3uJLjQFk9TRR9rLF6g-GzYMdrzpxwytBq1wetUKdvngI6luZdIQstkVa6Utk5ylE8vRqSpLftEyZg_66QCLcRI524DoNxBF4ZZazAA" alt="" width="494" height="296" /></figure>



<p>This has a logical explanation. Writing tests is not an easy task; you need to spend time learning what unit, widget and integration tests are and how they work before you can write useful tests.</p>



<p>But, in this article, we will keep things simple following the methodology of KISS software development. </p>



<h3><strong>Write features</strong><strong> </strong></h3>



<p>We’ll write our test in a natural language by creating a *.feature file inside the test folder. Let&#8217;s say you&#8217;re testing the default Flutter counter app, then the content might be:</p>

<p><script src="https://gist.github.com/JoaquinAcuna97/70139168dc8560494a4dd784721a02e0.js"></script></p>
<p><b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/70139168dc8560494a4dd784721a02e0"><span style="font-weight: 400;">script</span></a></p>

<h3><strong>Add the dependency</strong></h3>



<p>To make a widget test with this file, we’ll install the dependencies:</p>



<p><code>
&lt;code&gt;<br />
<strong>dev_dependencies:</strong><br /><strong>
build_runner: </strong><br /><strong>
bdd_widget_test: &lt;put the latest version here&gt;</strong><br /><strong>
...</strong> <br />
&lt;/code&gt;
</code></p>



<h3><strong>Generate the test files</strong></h3>



<p>Now, ask built_value to generate Dart test files for you. You can do this with the following command:</p>

<p><code>
&lt;code&gt;<br />
<strong>flutter packages pub run build_runner watch --delete-conflicting-outputs</strong><br />
&lt;/code&gt;
</code></p>

<h3><strong>Run tests</strong></h3>



<p>Now, it&#8217;s time to run the test. You can do it from your IDE or by running the following:</p>



<p><code>
&lt;code&gt;<br />
<strong>flutter test</strong><br />
&lt;/code&gt;
</code></p>

<p>All tests have passed, congrats! You can now push your changes. </p>



<p>Let’s add a more complex test to test the current project template’s functionality.</p>

<p><script src="https://gist.github.com/JoaquinAcuna97/4a56de06c07cdfb1e413c0e303a6d040.js"></script></p>
<p><b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/4a56de06c07cdfb1e413c0e303a6d040"><span style="font-weight: 400;">script</span></a></p>

<p>When you save your changes on the .feature file, the test file in Dart will be updated with the content of the new test. Go ahead and run it.</p>



<figure class="wp-block-image"><img decoding="async" class="aligncenter" src="https://lh3.googleusercontent.com/oQl5ZwOYuK82dLgCd7AG06iO2Het1jgybbMc6Bk_a4x4YsAo6cxBGteR1bXWN84twMtTBtkCm-v75P8ptrMRRa6oxIvIyYR_YY1nOHL5Nhjla8iRv67UI7pyaSsUzQ" alt="" /></figure>



<p>Green status again! Go ahead and push it.</p>



<p>Now, let’s make use of the BDD circle and add a test for a new functionality we will implement. </p>



<p>Let&#8217;s say we want a button that, when pressed, decreases the counter. </p>



<p>Go ahead and write the scenario:</p>

<p><script src="https://gist.github.com/JoaquinAcuna97/cd20dcfc92c645aedd1f3a3977eeba75.js"></script></p>
<p><b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/cd20dcfc92c645aedd1f3a3977eeba75"><span style="font-weight: 400;">script</span></a></p>

<p>Now, if you check the Dart file, it should have the new test for the given scenarios. </p>



<figure class="wp-block-image"><img decoding="async" class="aligncenter" src="https://lh4.googleusercontent.com/DZHbrU1M6gulnl7wnn1-kMhHY3OnQSnuLhgfrTfOD4tB6dPhm_RD5puhXra1329Ibqyyg8nnCIm1fnokyaxfBS-Ep7W5P8rfiO3CitxuL4NtBKyBokYYCrQ21JJYAw" alt="" /></figure>



<p>Try to run them, just to see them fail. We are in the red status of the BDD circle. Now, let’s add the functionality. </p>



<p>Try replacing your current Action button with a stack of two buttons:</p>

<p><script src="https://gist.github.com/JoaquinAcuna97/4ff0c15e0f4f749c482b9138b0f140be.js"></script></p>
<p><b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/4ff0c15e0f4f749c482b9138b0f140be"><span style="font-weight: 400;">script</span></a></p>

<p>You can write the <strong>_decrementCounter</strong> function on your own so that if you run your test, it passes.</p>



<h2>Final thoughts on Flutter with BDD </h2>



<p>Congrats! You are on your way to following the BDD process in <a href="https://www.asapdevelopers.com/google-flutter-review-2021/">Flutter</a> development! </p>



<p><a href="https://github.com/JoaquinAcuna97/very_first_bdd_app_flutter">Here is the entire code for you to check out. </a></p>



<p>Keep it flowing and don&#8217;t forget, “Every large system that works started as a small system that worked.”</p>

		<div id="fws_6939788d26408"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/flutter-app-development/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Flutter App Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/flutter-with-bdd/">Flutter with BDD</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Python for CI/CD</title>
		<link>https://www.asapdevelopers.com/python-for-ci-cd/</link>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 30 Aug 2021 20:15:22 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=14818</guid>

					<description><![CDATA[<p>Avoiding integration hell is a must-do but seemingly simple task when your organization starts growing and hiring new developers. When working alone, writing code on your own and making it...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/python-for-ci-cd/">Python for CI/CD</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[




<p>Avoiding integration hell is a must-do but seemingly simple task when your organization starts growing and hiring new developers. When working alone, writing code on your own and making it work might seem enough. However, working with a team of professional software developers adds the challenge of coordinating many people working on the same code. Unless you want to spend hours, or even days, fixing the code so that it can finally integrate, making sure everyone is in sync, and guaranteeing nothing is broken, you should use Python for CI/CD.</p>





<p><a href="https://www.redhat.com/en/topics/devops/what-is-ci-cd">According to RedHat</a>, “<em>CI/CD is a method to frequently deliver apps to customers by introducing automation into the stages of app development. The main concepts attributed to Python for CI/CD are continuous integration, continuous delivery, and continuous deployment.</em>”</p>



<figure class="wp-block-image"><img decoding="async" class="aligncenter" src="https://lh3.googleusercontent.com/sVM4foC-fNoCrOYEXogHIFYOe6j3cgXKu1KP8bFAvrS40VMFXTMT85FxlsNUa1Q40Ug7zHDHXFi-i5YuLj2Okbtb2dEQtjSvXl-DOl7CjLPUg7-av5CvTUJUjWMVIshwHWPKM-je=s0" alt="" /></figure>



<p>&nbsp;</p>



<p>Now that we know what we’re talking about, let’s see how it all works.</p>



<h2>How to build a CI/CD pipeline with Python </h2>



<figure class="wp-block-image"></figure>



<p><img decoding="async" loading="lazy" class="aligncenter wp-image-7800" src="https://www.asapdevelopers.com/wp-content/uploads/2017/08/Python_logo_and_wordmark.svg_-e1502721820678-1-300x89.png" alt="Python for CI/CD" width="364" height="108" srcset="https://www.asapdevelopers.com/wp-content/uploads/2017/08/Python_logo_and_wordmark.svg_-e1502721820678-1-300x89.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2017/08/Python_logo_and_wordmark.svg_-e1502721820678-1-768x228.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2017/08/Python_logo_and_wordmark.svg_-e1502721820678-1-1024x304.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2017/08/Python_logo_and_wordmark.svg_-e1502721820678-1-610x181.png 610w, https://www.asapdevelopers.com/wp-content/uploads/2017/08/Python_logo_and_wordmark.svg_-e1502721820678-1.png 2000w" sizes="(max-width: 364px) 100vw, 364px" /></p>
<p>We will be building a small CI/CD pipeline in 7 steps as you’ll see below. Let’s get started!</p>



<ol>
<li>
<h3>Write a Python program </h3>
</li>
</ol>



<p>First, we need a small software that will be deployed to the cloud. We will build a movie name generator, but it could also be a <a href="https://www.asapdevelopers.com/python-recommendation-systems/">movie recommendation system</a></p>



<p>To do this, first create a new directory (let’s call it <strong>&#8220;python-cicd&#8221;</strong>). </p>



<p>Inside this directory, create another directory called “generator” and, in this directory, save two files: </p>



<ul>
<li>An empty file called <strong>&#8220;__init__.py&#8221;</strong></li>
<li>And this script file called <strong>&#8220;generator.py&#8221;</strong></li>
</ul>
<p><script src="https://gist.github.com/JoaquinAcuna97/a51b16c8ff35a99890426373ee51cfa5.js"></script> <b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/a51b16c8ff35a99890426373ee51cfa5"><span style="font-weight: 400;">script</span></a></p>

<p>You should be able to run this Python script from the command line inside the “generator” directory we mentioned above; try it and check the movie results.</p>
<!-- /wp:paragraph -->
<p><code>

python-cicd$ python generator/generator.py<br />
Honor With Men'S Legacy<br />
python-cicd$ python generator/generator.py<br />
Construction Against Directors<br />

</code></p>
<!-- wp:paragraph -->

<!-- wp:paragraph -->
<p>Looks good! Now go ahead and add your own words to make more original movie titles. </p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true,"start":2} -->
<ol start="2">
<li>
<h3>Automate testing</h3>
</li>
</ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Many programmers choose to test the code they are writing manually by calling the piece of code they are developing, then printing the result to the console and, finally, visually scanning the output for correctness. This works for simple tasks but poses some problems:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>• When the output becomes too large, it gets harder to spot errors.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>• When the programmer gets tired, it is easy to miss subtly incorrect output.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>• When the implemented feature becomes larger, we tend to miss bugs we might have introduced in parts that were “tested” earlier.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>• Because the informal test scripts tend to be only useful for the programmer who wrote them, this means it is of no use to other developers.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph --><!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>These issues are the reason unit testing was invented. Through unit testing, you write sample calls to pieces of code and compare the return value to the expected value.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This comparison is generally done in a way that gives little or no output when the test passes and very obvious output otherwise. You can use a test harness to run tests from several test scripts and report just the errors and a statistical summary of the passed tests.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>We need some additional tools to run the unit tests we are going to write. These are available as Python for CI/CD packages. To install them, you should use a tool called virtualenv.</p>
<!-- /wp:paragraph -->
<p><code>

python-cicd$  virtualenv venv<br />
Honor With Men'S Legacy<br />
python-cicd$ source venv/bin/activate<br />
(venv) python-cicd$<br />

</code></p>
<!-- wp:paragraph -->
<p>Next, create a new file called “requirements.txt” that lists the pytest dependency:</p>
<!-- /wp:paragraph -->
<p><code>

pytest==6.2.4<br />

</code></p>
<p>To download the dependencies listed in the requirements file, you’ll need to execute the “pip” command:</p>
<p><code>

(venv) python-cicd$  pip install -r requirements.txt<br />

</code></p>
<p>Create a new folder called “<strong>test”</strong> and put two files inside: </p>
<ul>
<li>An empty file called “<strong>__init__.py”</strong></li>
<li>And this script file called<strong> “test_generator.py”</strong></li>
</ul>
<p><script src="https://gist.github.com/JoaquinAcuna97/90648a00bdddd18a2bf5516af4e0e0a5.js"></script></p>
<p><b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/90648a00bdddd18a2bf5516af4e0e0a5"><span style="font-weight: 400;">script</span></a></p>
<p>Then, run the test file.</p>
<p><code>

(venv) python-cicd$  python -m pytest -v test/test_generator.py<br />

</code></p>
<p>You should see them passing.</p>
<figure class="wp-block-image"><img decoding="async" src="https://lh4.googleusercontent.com/wFNDhYaMR-HasKPSlXTicLdbu1XOkM4LJZzXTw_aMO9yFMUvpVAmMkTgXS8x8s0wGDjRo7HIEYllYsdI1_69DyYOzWS6E_tWv0EF-N4iwgN-G8cDCP-wjdrZtQEDm8W7VFvpSSYC=s0" alt="" /></figure>
<ol start="3">
<li>
<h3>Push your code to GitHub</h3>
</li>
</ol>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-14842" src="https://www.asapdevelopers.com/wp-content/uploads/2021/08/github-300x114.png" alt="github - Python for CI/CD" width="376" height="143" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/08/github-300x114.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/08/github.png 515w" sizes="(max-width: 376px) 100vw, 376px" /></p>
<p>We chose GitHub for this article, but you can use virtually any Git provider. Let’s start by logging into GitHub (you should get an account first if you don’t have one already) and then create a new public repository called “python-cicd”.</p>
<p>Inside your project directory, create a new file called “.gitignore” containing the following:</p>
<p><code>

venv<br />
__pycache__<br />
test/__pycache__/<br />
generator/__pycache__/<br />

</code></p>
<p>This will prevent Git from adding the virtualenv or any IDE file that can cause us problems later to our repo. Now you should initialize Git locally and push your code to GitHub:</p>
<p><code>

[python-cicd] $ git init<br />
[python-cicd] $ git add *<br />
[python-cicd] $ git commit -m "Initial commit"<br />
[python-cicd] $ git remote add origin<br />
git@github.com:/python-cicd.git<br />
[python-cicd] $ git push -u origin master<br />

</code></p>
<!-- wp:list {"ordered":true,"start":4} -->
<ol start="4">
<li>
<h3>Setup GitHub Actions CI to continuously run your automated tests</h3>
</li>
</ol>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-14841" src="https://www.asapdevelopers.com/wp-content/uploads/2021/08/github-actions-300x62.png" alt="github actions - Python for CI/CD" width="498" height="103" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/08/github-actions-300x62.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/08/github-actions-768x159.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/08/github-actions.png 830w" sizes="(max-width: 498px) 100vw, 498px" /></p>
<p>Go to your GitHub repository, and create the new workflow in the actions tab.</p>
<figure class="wp-block-image"><img decoding="async" src="https://lh3.googleusercontent.com/gpOTgnfGp2HJWpzQU8QSlPaOQIbLcTQEP-DkaRHEypvW_SLqs3U01hzA9fuAo9HfNpIadscwoQ4M-Dn12-3DXoR4spcMcdvZU1R-AwOsmh9b7PdzNbpV6juiKK75Wk23FJjRgMu8=s0" alt="" /></figure>
<p>This should commit a YAML file into your repository. In the .github/workflows folder, your YAML file must be similar to this: </p>
<p><script src="https://gist.github.com/JoaquinAcuna97/2ccc18b5c83fd033dbdbd7fa10c4dda8.js"></script> <b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/2ccc18b5c83fd033dbdbd7fa10c4dda8"><span style="font-weight: 400;">script</span></a></p>
<p>Remember to change the Python version to the one you are using in your project.</p>
<p>Then, try it out by making any changes to your code and pushing them; it should start a build process on the actions tabs that looks something like this: </p>
<figure class="wp-block-image"><img decoding="async" src="https://lh5.googleusercontent.com/JYqNZvGRjYQMEPPEUSUHAme6AbGrd97yb5H7_WTCgbOf3ZF7wri65XQkLAPlDZ5uUtuG60ssl7TOptKD0mE9Pw6DthAqgpJhe6keumOFeylghSHBYj75jZJbQe7EhDu304zCfJbR=s0" alt="" /></figure>
<p>Congratulations! You have successfully built your very first continuous integration pipeline</p>
<!-- wp:list {"ordered":true,"start":5} -->
<ol start="5">
<li>
<h3>Setup Wily to continuously check your code quality</h3>
</li>
</ol>
<p>Wily is a python tool that helps you keep track of the maintainability of your project, in order to write <a href="https://www.asapdevelopers.com/python-code-complexity/">simpler and more maintainable Code</a>.</p>
<p><!-- /wp:paragraph -->

<!-- wp:image --></p>
<p><img decoding="async" loading="lazy" class=" wp-image-14840 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/08/wily-300x155.png" alt="wily" width="422" height="218" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/08/wily-300x155.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/08/wily-768x398.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/08/wily.png 871w" sizes="(max-width: 422px) 100vw, 422px" /></p>
<p>In each build, we will show the evolution of your maintainability score and other metrics such as lines of code or cyclomatic complexity. </p>
<p>First, we need to install Wily. </p>
<p><code>

(venv)[python-cicd] $ pip install wily<br />

</code></p>
<p>Add Wily to your requirements.txt.</p>
<p><code>

(venv)[python-cicd] $ pip freeze &gt; requirements.txt<br />

</code></p>
<p>Then, we will add Wily to the GitHub actions pipeline by editing our YAML file. Add a new step to our pipeline file, called “Wily”, to the end of your file. </p>
<p><script src="https://gist.github.com/JoaquinAcuna97/144467c92b63ea32cc4dacfff35fd33c.js"></script></p>
<p><b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/144467c92b63ea32cc4dacfff35fd33c"><span style="font-weight: 400;">script</span></a></p>
<p>Push your changes and check the GitHub actions execution; you should see something similar to this output:</p>
<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/7KZV2--xWAB_0NERzZFrsP578k8MMt85st1N02gZFLEJexj-QGE09VzWKfujFsJrfew3PgRNdaRDZTYjaQQvRkMObJXuTHfhoVcEPvmkUwJbYhfjaWXxcT0kYAL9EG9-zv8TLqfM=s0" alt="" /></figure>
<ol start="6">
<li>
<h3>Turn the Python program into a web app</h3>
</li>
</ol>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-14839" src="https://www.asapdevelopers.com/wp-content/uploads/2021/08/flask-300x124.png" alt="flask web development - Python for CI/CD" width="406" height="168" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/08/flask-300x124.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/08/flask.png 721w" sizes="(max-width: 406px) 100vw, 406px" /></p>
<p>Great work! We already have a CI pipeline that checks for functionality and quality.</p>
<p>Since we will deploy the software to Heroku as a web app, we first need to write a little Python Flask wrapper around our movie generator to make the program respond to HTTP requests and output HTML.</p>
<p>Add the code below in a file called “app.py” in the root of your project directory:</p>
<p><script src="https://gist.github.com/JoaquinAcuna97/559fddf5a8e8a3e80b78af0dcab2a2a5.js"></script></p>
<p><b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/559fddf5a8e8a3e80b78af0dcab2a2a5"><span style="font-weight: 400;">script</span></a></p>
<!-- wp:paragraph -->
<p>Install Flask.</p>
<p><code>

(venv)[python-cicd] $ pip install flask<br />

</code></p>
<p>Add Flask to your requirements.txt. </p>
<p><code>

(venv)[python-cicd] $ pip freeze &gt; requirements.txt<br />

</code></p>
<p>You can now run the Flask application locally.</p>
<p><code>

(venv)[python-cicd] $ python app.py<br />
 * Serving Flask app 'app' (lazy loading)<br />
 * Environment: production<br />
   WARNING: This is a development server. Do not use it in a production deployment.<br />
  Use a production WSGI server instead.<br />
 * Debug mode: off<br />
* Running on all addresses.<br />
 WARNING: This is a development server. Do not use it in a production deployment.<br />
 * Running on http://192.168.1.6:5000/ (Press CTRL+C to quit)<br />

</code></p>
<p>Open the local host location and you should see the app running smoothly. </p>
<figure class="wp-block-image"><img decoding="async" class="aligncenter" src="https://lh3.googleusercontent.com/C2f0NWJYxi5w1rzYK7_81UoT5dWpFlbOCY9vISqL71ZxvV_YbiFjR98gTwSzVVm3XEXnkzvNyFoGUjSH9WHQ5lZRs73o56kNnfnY1mvts9C3nyLqYrQbbEsnQnzF9G6WqLb6AY85=s0" alt="" /></figure>
<p>Refresh it a few times, and check out the movie title ideas.</p>
<p>Push your changes and see Wily’s magic in action. </p>
<!-- wp:list {"ordered":true,"start":7} -->
<ol start="7">
<li>
<h3>Deploy the web app to Heroku</h3>
</li>
</ol>
<figure class="wp-block-image"><img decoding="async" loading="lazy" class="aligncenter" src="https://lh3.googleusercontent.com/kYcAyv-9RMzphzuLd2MsOXxpP9kMcR2ZYpnrB3PBNEQjT-3RKNt4a7p24TMSyyBS6UPkHIAKN-tZ9c5s8e5bl-oe7oIjWTe7Hj4az7gmw3DF1KlRMhcALZQGWOb3rPoiOI_w9aIX=s0" alt="Heroku-  Python for CI/CD." width="425" height="119" /></figure>
<p>Heroku is a cloud platform used to host small and scalable web applications. It offers a free plan so go to https://signup.heroku.com and sign up if you haven’t already done so.</p>
<p>Once you are in Heroku, sync your GitHub repository to the Heroku CLI, so, whenever you push new changes to your code in GitHub, Heroku will build and deploy your app automatically.</p>
<p>Start by creating a new app in Heroku and, in the deployment method option, choose “connect to GitHub.” <img decoding="async" loading="lazy" src="https://lh5.googleusercontent.com/2kCBQ4HuJUWg7fxRoyU5sEcxVCLXpUNT5raV8AqpRtpW8UQ1aOjMd5Z5_krwpzyJOn9a9ur374yHWt0bZXwPi5xJaUlAafXu-X-vTaQmqEXi0BXUByaqq00j3pa1uybESVXhDDod=s0" width="624" height="63" /></p>
<p>You may have to log into GitHub if you haven’t already, and select the repo for the project. </p>
<figure class="wp-block-image"><img decoding="async" loading="lazy" class="aligncenter" src="https://lh6.googleusercontent.com/OhtEbrm0mi1f_FIfG-f48XxhOukXaQ-yskDQNMssKlzSKrNSvl6aKGXG2FpRIKjeCBqcSG9KKJi0ZdRlZvdzjUog12vTbZ6f5BxUPNEZQC_YM9Bkm2zNeSE7E0dzv3I5JEha9qAl=s0" alt="gunicorn - Python for CI/CD." width="428" height="126" /></figure>
<p>Heroku serves Python apps with Gunicorn &#8220;Green Unicorn&#8221;, which is a Python web server that is simply implemented, light on server resources, fairly fast, and broadly compatible with a number of web frameworks.<br />First, we need to install it.</p>
<p><code>

(venv)[python-cicd] $ pip install gunicorn<br />

</code></p>
<p>Add Gunicorn to your requirements.txt.</p>
<p><code>

(venv)[python-cicd] $ pip freeze &gt; requirements.txt<br />

</code></p>
<p>In the root folder of your project, create a <strong>“Procfile”</strong> and write the following code:</p>
<p><code>

web: gunicorn wsgi:app<br />

</code></p>
<p>Then, create a <strong>“runtime.txt”</strong> file and include the Python version you are using; in our case, it’s version 3.6.14.</p>
<p><code>

python-3.6.14<br />

</code></p>
<p>Create a <strong>“wsgi.py”</strong> file and insert the following code.</p>
<p><code>

from app import app as application<br />
app = application<br />
if __name__ == "__main__":<br />
app.run()<br />

</code></p>
<p>Commit your changes and push them to Heroku. </p>
<p><code>

git push heroku master<br />

</code></p>
<p>If everything went well, you should see the movie generator rocking on the cloud! </p>
<figure class="wp-block-image"><img decoding="async" loading="lazy" class="wp-image-14849 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/08/movies-generator-300x57.png" alt="" width="669" height="127" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/08/movies-generator-300x57.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/08/movies-generator-768x145.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/08/movies-generator.png 840w" sizes="(max-width: 669px) 100vw, 669px" /></figure>
<p>Congrats! Now, with every change to your code, you will automatically run tests, check maintainability and deploy to Heroku! If you are facing any issues during deployment using Python for CI/CD, feel free to contact us, or check Heroku’s <a href="https://devcenter.heroku.com/categories/python-support">official Python page</a>.</p>
<p><!-- /wp:image -->

<!-- wp:paragraph --></p>

		<div id="fws_6939788d27c34"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/python-development-company/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Python Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div><p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/python-for-ci-cd/">Python for CI/CD</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Best Flutter apps under 5kB of Dart code</title>
		<link>https://www.asapdevelopers.com/best-flutter-apps-under-5kb-of-dart-code/</link>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 14 Jun 2021 21:14:00 +0000</pubDate>
				<category><![CDATA[Flutter]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=14585</guid>

					<description><![CDATA[<p>Flutter is a game-changer not only in cross-platform mobile development but also in web development. Flutter’s stable web release is here to stay, bringing production-quality support for web apps. In...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/best-flutter-apps-under-5kb-of-dart-code/">Best Flutter apps under 5kB of Dart code</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[


<p>Flutter is a game-changer not only in cross-platform mobile development but also in web development. Flutter’s stable web release is here to stay, bringing production-quality support for web apps. In a moment, we are going to go over the best Flutter apps under 5kB of Dart code.</p>



<p>Flutter’s web support has brought about innovations and makes highly sophisticated apps with hardware-accelerated 2D and 3D graphics and flexible layout and paint APIs possible. It offers an app-centric framework that takes full advantage of everything the modern web has to offer.</p>



<p>Moreover, Flutter makes it easier to build responsive screens that adapt to different devices and appropriately fit users&#8217; screens, all in one code base.</p>



<p>The Flutter UI toolkit is specially useful on three particular app scenarios:</p>



<ul>
<li><strong>Progressive web apps (PWAs)</strong> that combine the web’s reach along with the capabilities of a desktop app.</li>
<li><strong>Single page apps (SPAs)</strong> that load once and transmit data to and from internet services.</li>
<li><strong>Existing Flutter mobile apps that are being migrated to the web</strong>, enabling shared code for both experiences.</li>
</ul>



<p><a href="https://flutterplasma.dev/">Here</a> you can check Flutter’s power on the web. </p>



<p>But, most valuable of all, is that this power comes with less weight and, therefore, with, native performance. This is a major plus since native performance leads to better user experience and we know for a fact this correlates with user retention. </p>



<h2>Flutter Create </h2>



<p><a href="https://flutter.dev/create">Flutter Create</a> is an annual contest that challenges developers to build interesting, inspiring, and beautiful apps with Flutter using 5kB or less of Dart code.</p>



<p>Just to put things into perspective,  <strong>5kB is equivalent to</strong>:</p>



<ul>
<li><strong>Less than half a second of your average music file.</strong> A MP3 file is usually encoded at 128kbps (kilobits/sec). That’s 128/8 = 16 kilobytes/second. So 5kB is 0.3125s of a typical MP3 file.</li>
</ul>



<ul>
<li><strong>Less than 0.05% of the size of the HTML specification</strong>. Less than 5% of the size of the HTML specification’s table of contents, even.</li>
</ul>





<ul>
<li><strong>The size of an 80&#215;60 original image</strong> encoded in GIF format.</li>
</ul>



<p>But, what can be built within this size restriction? Can something beautiful be so small? Check out this video and prepare to be surprised. </p>
<p>&nbsp;</p>

<p><iframe loading="lazy" title="YouTube video player" src="https://www.youtube.com/embed/WLvpROMUjYQ" width="419" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>&nbsp;</p>

<p>Isn&#8217;t it amazing? We find it impressive for sure. </p>



<h2>The winners: best Flutter apps</h2>



<p>The 2020 winners have not been announced yet and we are looking forward to seeing what the community builds!</p>



<p>Meanwhile, let’s take a look at the 2019 winners: </p>



<h3>Grand Prize Winner: Compass by Zebiao Hu</h3>



<figure class="wp-block-image"><img decoding="async" loading="lazy" class="aligncenter" src="https://lh3.googleusercontent.com/6VPc7hovBxbbNzypb8jh5A_Kvi5rVVuq-CxfqhUyckx7BErBO7WdkceU-nzdXJqHZOT6JjMSHJCywcNdbayZl0gfYQ_tbj_fRV_lQLCFrIIQv4bD6iMsjLgRjzNG7M1yMmUUleYt" alt="best flutter apps" width="375" height="667" /></figure>



<p><a href="https://github.com/zesage/flutter_compass">This Flutter app</a> uses the magnetometer, accelerometer, location sensors in order to get a user’s current direction, location, weather, temperature, humidity, etc. When you scroll up, it shows a globe that users can rotate to get real-time weather data.</p>



<h3>Visual Beauty Winner: Relax by Erin Morrissey</h3>



<p><a href="https://github.com/erinmorrissey/relax">This meditation app</a> displays rain, forests, sunsets, and oceans with their corresponding sounds. Users can choose between four nature sounds and it alternates through related images while the sounds are playing.</p>



<figure class="wp-block-image"><img decoding="async" class="aligncenter" src="https://lh3.googleusercontent.com/8HsEc8Ua1I4pFDcM0Ii2kJgRkJOUVX7REOrO7_aZ0JR3VhORwKsZK5tYSr3wiqht0PawUv1fApM3s89KPA1P_VHccI30CGKBbEnLwx-lbGiys0jxI95EBhVLYff9xMxXoPTAW3zy" alt="" /></figure>



<h3>Code Quality Winner: Pocket Piano by Rody Davis</h3>



<h2><br /><img decoding="async" loading="lazy" class="aligncenter" src="https://lh3.googleusercontent.com/aEtoWOkPPss_Q0E9VcCZlHv3WacnBTN5SqnZUgiknVvEO0Y6KzlZUxXJ0HE98ucdJouq9WJ2aOgGXLI9BfmjWwO_Nwunm1q3apdPKcIJ5LabClEd3YV2kyyKY8ho1LgR0--B5iDf" width="480" height="222" /></h2>



<p>This is a <a href="https://pocketpiano.app/#/">piano built for Web</a>, iOS and Android. Pocket Piano gives you the option to change the octave (by sliding to the left or right), as well as the key width. You can also toggle labels on the keys and play any note (or notes) by tapping. The piano also fully supports semantics for screen reader users. <a href="https://github.com/rodydavis/flutter_piano">Here is the repo</a>. </p>



<h3>Overall Execution Winner: TimeFlow by Fabian Stein</h3>



<figure class="wp-block-image"><img decoding="async" loading="lazy" class="aligncenter" src="https://lh3.googleusercontent.com/hI7OJcfABkYPcgnNSGgpt6P-VfSqQYEuH7Ut-P0wKmyyoGI-Lt17bj506MgG3ValnibW1kDsWcJcv_X2xcP2Nt0ew9ODr3U14IlKnwSj_dS4JurZWd1ZMHn6FjLQJmpXB6_bTP7B" alt="best flutter apps" width="340" height="566" /></figure>



<p><a href="https://github.com/Fabian-Stein/timeflow">Timeflow</a> is a timer that displays a sphere that shatters into pieces and slowly reassembles in one, two, or three minutes, as selected (you can see the reassembly in the video above). </p>



<h2>Other Submissions</h2>



<p>Judging is no easy task, here we’ll list our top 5 apps. You can find all submissions <a href="https://github.com/pinkeshdarji/FlutterCreateSubmissions2019">here</a>.</p>



<h3>Shooter Game</h3>



<figure class="wp-block-image"><img decoding="async" class="aligncenter" src="https://lh5.googleusercontent.com/cHH6idzpr2rBPAC14jQp95JmcAboidMASCd0K2K291DBq-nJoQEg3Jg1XVvICJpg-yW2-7qInb_ikz8xAMTZmS6S6hJ1Efd6H0ptYJq2ztV1ioNewt4S2My12h2IqgkBjdiSyeEY" alt="" /></figure>



<p>This simple <a href="https://github.com/rajajain08/flutter_game">shooter game</a> was created using Flutter and Flare with no game engine whatsoever.</p>



<h3>Elements-App</h3>



<figure class="wp-block-image"><img decoding="async" class="aligncenter" src="https://lh6.googleusercontent.com/AQ_0DafR3ke1BhY2zJj9usBFYKkJO2vY8Nto6ejfohjQ7wzDLAsiFJ0h-oIFpYJzmZmD6p3FNHQwr3frJbl5x4qUFn8rs4BI9LIXvM0ZSQ9sLShl4SmU3Q5rzABE_C4_nDA0guNK" alt="" /></figure>



<p><a href="https://github.com/brianrobles204/Elements-App">Elements</a> lets you browse the elements of the periodic table!</p>



<p>This Flutter app was developed specially for the Flutter Create 2019 contest. In addition to showing you the various elements, it also includes helpful snippets of information about each one.</p>



<p>Elements is a cross-platform app that can run both on Android and iOS.</p>



<h3>Lifenticon</h3>



<figure class="wp-block-image"><img decoding="async" loading="lazy" class="aligncenter" src="https://lh3.googleusercontent.com/j31RgXszbSt8jbE4eGt1HTHF5OHEmsQIj_S-ybIiN5021YivMG2NPj151gke0Pei_hzi_XP5SJFCYN6kQ9b6Uw8R6tk7NVkXnx3jDfNaefCdqW-6R9A-gKE28p8_3QWNb_lmTiAi" alt="best flutter apps" width="242" height="430" /></figure>



<p><a href="https://github.com/rnitta/Lifenticon">Lifention</a> is a combination of Game of Life and Identicon.</p>



<p>This app lets you assess how your name would do in Conway’s Game of Life by turning it into an Identicon—that is, a visual representation of a hash value—and using it as the seed of the system.</p>



<h3>Flutter memory game</h3>



<figure class="wp-block-image"><img decoding="async" class="aligncenter" src="https://lh4.googleusercontent.com/9FCx9ek3XgRbW0hb_9wAtd-NndORTGCb7tajNM8AzMzUA2ehFp7TvGEtxeV5Ns-nofTU4uNOr19w2d4KKq44JxrGANTBlNcrGpesJnu4xNPSchoYJBJngJ4Gu1O_H-oiuwmv9fQu" alt="" /></figure>



<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://github.com/seamusv/flutter_memory_game">Memory</a> is based on the classic card game. It starts by showing all the cards face down. Two cards are then flipped over each turn. The object of the game is, of course, to turn over pairs of matching cards.</p>

<p>&nbsp;</p>

<p>Memory has been tested on both simulated and physical Android devices as well as simulated iOS devices.</p>



<h3>FidgetDice</h3>
<p>&nbsp;</p>



<figure class="wp-block-image"></figure>

<p><img decoding="async" loading="lazy" class="wp-image-14611 size-medium aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/06/fidgetdice--150x300.gif" alt="fidget dice : best flutter apps" width="150" height="300" /></p>
<p>&nbsp;</p>

<p><a href="https://github.com/jastip/fidgetdice">FidgetDice</a> is an App that acts as a fidget-cube.</p>



<h2>Final thoughts on best Flutter apps under 5kB of Dart Code</h2>



<p>As you can see, beautiful things can be built with <a href="https://www.asapdevelopers.com/google-flutter-review-2021/">Flutter</a>, even with a restrictive size limitation. We can’t wait to see the 2020 contest results! </p>

		<div id="fws_6939788d293a2"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/flutter-app-development/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Flutter App Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/best-flutter-apps-under-5kb-of-dart-code/">Best Flutter apps under 5kB of Dart code</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Flutter e-commerce in 2021</title>
		<link>https://www.asapdevelopers.com/flutter-e-commerce-in-2021/</link>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 19 Apr 2021 20:02:03 +0000</pubDate>
				<category><![CDATA[Flutter]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=14433</guid>

					<description><![CDATA[<p>Hi there! Are you looking to build an e-commerce platform and are searching for the best technological alternative? In this article, we will assess the power of Flutter e-commerce, so...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/flutter-e-commerce-in-2021/">Flutter e-commerce in 2021</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hi there! Are you looking to build an e-commerce platform and are searching for the best technological alternative? In this article, we will assess the power of Flutter e-commerce, so you can keep both your customers and your development team happy.</p>







<h2><strong>Why Flutter e-commerce? </strong></h2>



<p>Why is it worth it to consider investing in Flutter development, even when it means your whole team has to learn an entirely new programming language called Dart? Well, everyone who is working in the tech industry knows that the learning process never stops. You are never fully satisfied with what you know, and checking out new technologies is certainly a competitive advantage, if not a business survival issue. </p>



<p>When it comes to e-commerce, Flutter is certainly innovative and it has some <a href="https://www.asapdevelopers.com/google-flutter-review/">great advantages for developers </a>which can lead to excellent results in record time. Here are some of them:</p>



<ul>
<li>
<h3><strong>FAST DEVELOPMENT</strong></h3>
</li>
</ul>



<p>Bring your app to life in milliseconds with stateful hot reload. Flutter’s rich set of fully-customizable widgets helps you build native interfaces in minutes.</p>



<ul>
<li>
<h3><strong>BEAUTIFUL UI</strong></h3>
</li>
</ul>



<p>Quickly ship features focusing on native end-user experience. Its layered architecture allows for full customization, resulting in incredibly fast rendering as well as expressive and flexible designs.</p>



<ul>
<li>
<h3><strong>NATIVE PERFORMANCE</strong></h3>
</li>
</ul>



<p>Flutter’s widgets incorporate all critical platform features such as scrolling, navigation, fonts and icons. On top of that, your code is compiled to native ARM machine code through Dart&#8217;s native compilers.</p>



<ul>
<li>
<h3><strong>WIDGET CUSTOMIZATION AND EXTENSION</strong></h3>
</li>
</ul>



<p>Google Flutter also gives you the option to customize a widget’s default behavior. To do this, you just need to create a pull request to the class you are trying to modify and add the property or the behavior you need. This will get you an extended widget and a new way to customize your app.</p>



<ul>
<li>
<h3><strong>APP TEMPLATES</strong></h3>
</li>
</ul>



<p>Flutter includes open-source templates that everyone can use freely. These templates include design implementation for hotel bookings, design courses, fitness sites, and a custom drawer and all of these can be of help to any Flutter developer.</p>
<h3>

</h3>
<ul>
<li>
<h3><strong>OPEN-SOURCE</strong></h3>
</li>
</ul>



<p>Open-source is the future. Lately, web, mobile, and cloud solutions are built predominantly on open-source infrastructure. In some cases, data and analytic solutions are actually only available as an open-source option.</p>



<ul>
<li>
<h3><strong>DEBUGGING</strong></h3>
</li>
</ul>



<p>There’s plenty of tools and features to help you debug Flutter applications. Some available tools include <a href="https://flutter.dev/docs/development/tools/devtools">DevTools</a>, <a href="https://flutter.dev/docs/development/tools/android-studio#run-app-with-breakpoints">Android Studio/IntelliJ</a>, and the <a href="https://flutter.dev/docs/development/tools/vs-code#run-app-with-breakpoints">VS Code</a> built-in source-level debugger.</p>



<ul>
<li>
<h3><strong>TESTING</strong></h3>
</li>
</ul>
<p>If you want to have the same app available on two platforms, Flutter assures less testing! The quality assurance process can be faster as there is only one codebase. This means the developers write automatic tests only once.</p>



<p>Flutter allows you to do all of the following types of testing:</p>



<ul>
<li>Unit tests to test a single function, method, or class.</li>
<li>Widget tests (in other UI frameworks referred to as “component tests”) to test a single widget.</li>
<li>Integration tests to help you test all of your app or a large part of an app.</li>
</ul>



<ul>
<li>
<h3><strong>PORTABILITY</strong> </h3>
</li>
</ul>



<p>Flutter apps are able to run on pretty much any device with a screen. There are Flutter apps available for Windows, Linux and macOS, so you can take full advantage of this tool no matter your choice of operating system. (The Flutter dev team has also <a href="https://developers.googleblog.com/2021/03/announcing-flutter-2.html">recently released Flutter 2.0,</a> which includes stable web development.)</p>



<p>&nbsp;</p>



<h2><strong>PORTABILITY</strong></h2>





<p>Yes, we are doubling down on this point as it is a huge advantage. With just one Dart codebase, you can deploy apps for Android and iOS in the mobile market, for Windows, Linux and macOS in the desktop market, and you can build mobile-first progressive web apps for the great World Wide Web. Isn&#8217;t that incredible? </p>



<figure class="wp-block-image"></figure>



<h2><img decoding="async" loading="lazy" class="wp-image-14581  aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/04/framework-1024x471.png" alt="flutter e-commerce frameworks" width="728" height="335" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/04/framework-1024x471.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2021/04/framework-300x138.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/04/framework-768x353.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/04/framework.png 1085w" sizes="(max-width: 728px) 100vw, 728px" /></h2>
<h2> FLUTTER E-COMMERCE <strong>APP TEMPLATES</strong></h2>



<p>We finally reached the core of this article: Flutter templates. These are key when it comes to the time-to-market factor, because the templates include a basic purchase flow for your e-commerce project, with professional designs and, sometimes, even more than the basic flows, saving you lots of time.</p>



<p>So, here is a list of the most beautiful e-commerce templates, built with Dart, all easily customizable and adaptable to your specific purpose</p>



<h2><a href="https://fluxstore.app/"><strong>1-FluxStore</strong></a></h2>



<h3><strong>Available features</strong></h3>



<ul>
<li>Compatible with top e-commerce frameworks: it includes full integration with <strong>WooCommerce, Magento, Opencart </strong>and <strong>Shopify</strong></li>
<li>Full e-commerce features: dynamic product variants, order tracking, refunds, checkout process, order notes, wishlists and address management.</li>
<li>Powerful user settings: the ability to enable push notifications, view wishlists, order history, rate the app on the app stores, include dark themes and a smart chat setting as well as switch languages</li>
<li>Push notifications via Firebase and message history are supported</li>
<li>Google Analytics makes it easy to track users online as well as the number of registrations via Firebase in realtime</li>
<li>Easy customization and while-labeling: supports full customization by getting the full source code package, design assets and free extra API.</li>
<li>Offline image caching: you can speed up the loading performance with the caching image offline method.</li>
<li>Messenger, WeChat, Whatsapp… and even Intercom service support.</li>
</ul>



<p><iframe loading="lazy" title="YouTube video player" src="https://www.youtube.com/embed/sYnHhnS5WnQ" width="467" height="351" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<h2> </h2>
<h2><a href="https://code.market/product/treva-shop-e-commerce-ui-kit-using-flutter/"><strong>2-Treva-Shop</strong></a></h2>



<h3><strong>E-commerce UI kit features:</strong></h3>



<ul>
<li>Clean code comments in all code</li>
<li>Support multiple languages</li>
<li>Cleanly designed</li>
<li>Use of the animation controller</li>
<li>Responsive design for any and all devices and screens</li>
<li>Easily customizable layout</li>
</ul>



<figure></figure>
<figure class="wp-block-image"></figure>



<p><iframe loading="lazy" title="YouTube video player" src="https://www.youtube.com/embed/N6xRTl_HDoc" width="467" height="351" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<h2><a href="https://code.market/product/flutter-e-commerce-template/"><strong>3-AirMart</strong></a></h2>



<h3><strong>Technical features</strong></h3>



<ul>
<li>Clean code with extracted Flutter widgets</li>
<li>Implementation of Rive animations</li>
<li>Uses the List View builder for all lists</li>
<li>Ready to back end integrations</li>
<li>Clear and smart UI/UX</li>
<li>Ready navigation and business logic</li>
<li>Fully customizable templates (colors, fonts, sizes, borders, paddings, margins, etc.).</li>
<li>Easily change colors</li>
<li>Easily connect any customize fonts</li>
<li>Easily change size and layout</li>
<li>Smooth (sliver) animations</li>
</ul>

<p><iframe loading="lazy" title="YouTube video player" src="https://www.youtube.com/embed/DullE2H3sMs" width="468" height="351" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>&nbsp;</p>

<figure class="wp-block-image"></figure>



<h2><a href="https://codecanyon.net/item/flutter-food-restaurant-food-delivery-in-flutter/27317723"><strong>4-Foodie</strong></a></h2>



<h3><strong>Food delivery features:</strong></h3>



<ul>
<li> Clean code comments in all code</li>
<li> Clean design</li>
<li> Use of the animation controller</li>
<li> Responsive design for any and all devices and screens</li>
<li> Easily customizable layout</li>
</ul>

<p><iframe loading="lazy" title="YouTube video player" src="https://www.youtube.com/embed/1bvlC_HZDtM" width="467" height="351" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>&nbsp;</p>

<h2><a href="https://github.com/robertodevs/flutter_ecommerce_template"><strong>5-Free open-source e-commerce template</strong></a></h2>



<p><strong>Features:</strong></p>



<ul>
<li>Minimalist design</li>
<li>Clean and structured code</li>
<li>Reusable components</li>
</ul>

<p><iframe loading="lazy" title="YouTube video player" src="https://www.youtube.com/embed/ZZI-mE-FUFE" width="467" height="351" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>&nbsp;</p>

<figure class="wp-block-image"></figure>



<h2>Final thoughts on Flutter e-commerce in 2021</h2>



<p>Considering all of the above, we believe Flutter is a very powerful technology that has great potential applications for e-commerce. It has the necessary tools and libraries to easily help you build your business all at once—for mobile, web and desktop—, and give more value to your customers. No matter whether you are a passionate UX/UI designer, an advanced mobile developer, or a newbie web developer, you will enjoy working with Flutter, and it will probably save you a significant amount of time. It&#8217;s certainly a game changer in the e-commerce business, and it can give your business the competitive advantage it needs.</p>
<p>&nbsp;</p>

		<div id="fws_6939788d2ab8c"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/flutter-app-development/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Flutter App Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/flutter-e-commerce-in-2021/">Flutter e-commerce in 2021</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Python Recommendation Systems</title>
		<link>https://www.asapdevelopers.com/python-recommendation-systems/</link>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 15 Mar 2021 20:50:07 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=14316</guid>

					<description><![CDATA[<p>Why python recommendation systems are important The most common and smartest way for e-commerce websites to display relevant items to their clients is to use an automated system. This system...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/python-recommendation-systems/">Python Recommendation Systems</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><span style="font-weight: 400;">Why python recommendation systems are important</span></h1>
<p><span style="font-weight: 400;">The most common and smartest way for e-commerce websites to display relevant items to their clients is to use an automated system. This system will be in charge of calculating the probability of similarity between items or user preferences. These systems are called recommendation systems, recommender systems or recommendation engines. A recommender system is one of the most well-known applications of data science and machine learning. In this article, we will go over Python Recommendation Systems.</span></p>
<p><span style="font-weight: 400;">In fact, almost every major tech company has applied them at some point. Amazon recommends you products, Spotify recommends you music, Google recommends you search results, and YouTube recommends you videos. It is such a common practice that, in 2009, Netflix offered a million dollars to anyone who could improve the accuracy of its movie recommendation system by 10%. </span></p>
<p><span style="font-weight: 400;">These systems help us with </span><a href="https://en.wikipedia.org/wiki/The_Paradox_of_Choice"><span style="font-weight: 400;">The Paradox of Choice</span></a><span style="font-weight: 400;">, a known problem that is caused by the rapid increase in the amount of data and the effects of this abundance: managing the information becomes more difficult and this can lead to information overload.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14326" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/data-chart-300x169.png" alt="python recommendation systems chart" width="740" height="416" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/data-chart-300x169.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/data-chart.png 763w" sizes="(max-width: 740px) 100vw, 740px" /></span></p>
<p><span style="font-weight: 400;">Recommender systems have great commercial importance; they have changed the way websites communicate with their users, increasing interaction to provide a richer experience by autonomously identifying recommendations for individual users based on the user’s past purchases and searches, as well as their behavior.</span></p>
<h2><span style="font-weight: 400;">What are the types of python recommendation systems? </span></h2>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Recommendation systems can be classified into 3 types:</span></p>
<h3><span style="font-weight: 400;">Simple recommenders</span></h3>
<p><span style="font-weight: 400;">This is the type of recommender we will build in this article. It offers generalized recommendations to each user, based on each element’s attributes. In a movie recommendation scenario, it will make recommendations to each user based on movie genre, movie rating or movie title. An example of a simple recommender is IMDd’s Top 250.</span></p>
<h3><span style="font-weight: 400;">Content-based recommenders</span></h3>
<p><span style="font-weight: 400;">These recommenders suggest similar items based on a specific one, taking into account each user’s preferences. This system uses item metadata and the general idea behind it is that if a person likes a particular item, they will also like a similar one. This does not involve other users, just each individual&#8217;s preferences. Based on what you like, the algorithm will pick items with similar content and recommend them.</span></p>
<p><span style="font-weight: 400;">It will never recommend products within categories the user has not bought or liked in the past. So, for example, if a user has watched or liked only action movies so far, that&#8217;s the only genre the system will recommend.</span></p>
<h3><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14327" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/developer-300x243.png" alt="python recommendation systems developer" width="444" height="360" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/developer-300x243.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/developer.png 557w" sizes="(max-width: 444px) 100vw, 444px" /></span></h3>
<h3><span style="font-weight: 400;">Collaborative filtering engines</span></h3>
<p><span style="font-weight: 400;">The collaborative filtering algorithm uses user behavior to select the items to be recommended. These systems are widely used and do not require item metadata like their content-based counterparts. There are different types of collaborating filtering techniques and we’ll look at them in detail below.</span></p>
<h3><img decoding="async" loading="lazy" class="aligncenter wp-image-14328" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/collabor-300x212.png" alt="Python recommendation systems similar" width="541" height="382" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/collabor-300x212.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/collabor.png 588w" sizes="(max-width: 541px) 100vw, 541px" /></h3>
<h3>User-User collaborative filtering</h3>
<p><span style="font-weight: 400;">This algorithm finds similarities between users grading a score in the process. Based on this score, it picks the most similar users and recommends products that they have previously liked or bought. Essentially, it generates a prediction for item </span><b>A</b><span style="font-weight: 400;"> based on how other users in the neighborhood rated it.</span></p>
<h3><strong><img decoding="async" loading="lazy" class="aligncenter wp-image-14329" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/user-300x157.png" alt="python recommendation systems - user to user" width="649" height="340" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/user-300x157.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/user-768x402.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/user.png 946w" sizes="(max-width: 649px) 100vw, 649px" /></strong></h3>
<h3><strong>Item-Item collaborative filtering</strong></h3>
<p><span style="font-weight: 400;">In this case, the algorithm computes the similarity between each pair of items. Similar items are identified based on how people have rated them in the past. For example, if Julia, Christian, and Vic have given 5 stars to </span><b>The Lord of the Rings</b><span style="font-weight: 400;"> and </span><b>Harry Potter</b><span style="font-weight: 400;">, the system identifies the items as similar. Therefore, if someone buys </span><b>The Lord of the Rings</b><span style="font-weight: 400;">, the system also recommends </span><b>Harry Potter</b><span style="font-weight: 400;"> to them.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14330" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/recommend-300x224.png" alt="Python recommendation systems - collaborative" width="560" height="418" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/recommend-300x224.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/recommend.png 760w" sizes="(max-width: 560px) 100vw, 560px" /></span></p>
<h2><span style="font-weight: 400;">Why Python Recommendation Systems? <img decoding="async" loading="lazy" class="alignnone wp-image-13874" src="https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-300x300.png" alt="" width="47" height="47" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-300x300.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-1024x1024.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-150x150.png 150w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-768x769.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-100x100.png 100w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-140x140.png 140w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-500x500.png 500w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-350x350.png 350w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-1000x1000.png 1000w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-800x800.png 800w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo.png 1512w" sizes="(max-width: 47px) 100vw, 47px" /></span></h2>
<p><span style="font-weight: 400;"> </span><span style="font-weight: 400;">You can build this system in virtually any language, but Python certainly takes the most points in this particular field. </span><a href="https://www.asapdevelopers.com/python-backend-language/"><span style="font-weight: 400;">Python offers readable code</span></a><span style="font-weight: 400;"> for complex algorithms and versatile workflows in machine learning and AI. Python allows you to put all the effort into solving a machine learning problem instead of focusing on the language itself.</span></p>
<p><span style="font-weight: 400;">Moreover, Python is easy to learn since its code is easy for people to follow, which makes it easier to build models for machine learning. </span><span style="font-weight: 400;">Python is more intuitive than other programming languages. It has many frameworks, libraries, and extensions that simplify the implementation of different functionalities. </span></p>
<p><span style="font-weight: 400;">Today, we will be using some of those libraries: </span></p>
<p><a href="http://jmlr.csail.mit.edu/papers/v12/pedregosa11a.html"><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="alignnone wp-image-14331" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/learn-300x162.png" alt="" width="211" height="114" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/learn-300x162.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/learn.png 327w" sizes="(max-width: 211px) 100vw, 211px" />Scikit-learn: Machine Learning in Python</span></a></p>
<p><span style="font-weight: 400;">Scikit-learn offers simple and efficient tools for predictive data analysis. It is accessible to all and reusable in various contexts. It is built on NumPy, SciPy, and matplotlib. Moreover, it’s open-source and commercially available under the BSD license.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="alignnone wp-image-14332" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/pandas-300x122.png" alt="" width="261" height="106" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/pandas-300x122.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/pandas-1024x415.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/pandas-768x311.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/pandas.png 1417w" sizes="(max-width: 261px) 100vw, 261px" /></span></p>
<p><span style="font-weight: 400;">Pandas is a data analysis and manipulation tool. It was built on top of the Python programming language. This tool is fast, powerful, flexible, open-source and easy-to-use.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="alignnone wp-image-14333" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/numpy-300x108.png" alt="" width="255" height="92" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/numpy-300x108.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/numpy.png 511w" sizes="(max-width: 255px) 100vw, 255px" /></span></p>
<p><span style="font-weight: 400;">NumPy is the fundamental package for scientific computing with Python. Nearly every scientist working with Python draws on the power of NumPy. With this power comes simplicity: a solution in NumPy is often clear and elegant.</span></p>
<h2><span style="font-weight: 400;">Build a simple movie with Python recommendation system </span></h2>
<p><span style="font-weight: 400;">We will be working with Jupyter Notebooks, but you can just find the code in </span><a href="https://github.com/JoaquinAcuna97/Python_movie_recommendation_system.git"><span style="font-weight: 400;">this repository</span></a><span style="font-weight: 400;">; there you’ll find this </span><a href="https://github.com/JoaquinAcuna97/Python_movie_recommendation_system/blob/main/python_movies.ipynb"><span style="font-weight: 400;">file</span></a><span style="font-weight: 400;"> and the dataset used in this example. </span></p>
<p><span style="font-weight: 400;">According to its website, “<em>Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more.</em>”</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14334 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/jupyter.png" alt="" width="344" height="141" /></span></p>
<p><span style="font-weight: 400;">First, we will import all the necessary libraries for this lab.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14335" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code1-300x68.png" alt="python recommendation systems - code1" width="745" height="169" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code1-300x68.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code1.png 736w" sizes="(max-width: 745px) 100vw, 745px" /></span></p>
<p><span style="font-weight: 400;">Then, we’ll load the dataset, which we obtained from the </span><a href="https://www.imdb.com/interfaces/"><span style="font-weight: 400;">IMDb Datasets</span></a><span style="font-weight: 400;"> of all movies uploaded in a certain period; we will use a reduced test dataset just to save computer resources.</span><span style="font-weight: 400;"><br />
</span><span style="font-weight: 400;"><br />
</span><span style="font-weight: 400;">title.basics.tsv.gz &#8211; Contains the following information for titles, as can be see in </span><a href="https://www.imdb.com/interfaces/"><span style="font-weight: 400;">IMDb’s website</span></a><span style="font-weight: 400;">:</span></p>
<ul>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">tconst (string) &#8211; alphanumeric unique identifier of the title.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">titleType (string) – the type/format of the title (e.g. movie, short, tvseries, tvepisode, video, etc.).</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">primaryTitle (string) – the most popular title/the title used by the filmmakers on promotional materials at the point of release.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">originalTitle (string) &#8211; original title, in the original language.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">isAdult (boolean) &#8211; 0: non-adult title; 1: adult title.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">startYear (YYYY) – represents the release year of a title. In the case of TV Series, it is the series release year.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">endYear (YYYY) – TV Series end year. ‘\N’ for all other title types.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">runtimeMinutes – primary runtime of the title, in minutes.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">genres (string array) – includes up to three genres associated with the title.</span></li>
</ul>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14336" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code2-300x81.png" alt="python recommendation systems - code2" width="803" height="217" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code2-300x81.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code2-1024x276.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code2-768x207.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code2.png 1129w" sizes="(max-width: 803px) 100vw, 803px" /></span></p>
<p><span style="font-weight: 400;">Then, we’ll split the dataset into train and test. We will be using only 13k movies instead of all the data records, and we won’t shuffle the data so we know which movies will be in our test data.</span></p>
<p><span style="font-weight: 400;">We are also creating a new Movie_id for our test dataset which will help us later on.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14342" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code3-300x51.png" alt="python recommendation systems - code3" width="629" height="107" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code3-300x51.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code3.png 764w" sizes="(max-width: 629px) 100vw, 629px" /></span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14343 size-full" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code4.png" alt="python recommendation systems - code4" width="191" height="69" /></span></p>
<p><span style="font-weight: 400;">We’ll select the most important columns in our dataset, that is, the ones that we will use to make a movie prediction.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14344" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code5-300x202.png" alt="python recommendation systems - code5" width="670" height="451" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code5-300x202.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code5-768x518.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code5-600x403.png 600w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code5-400x269.png 400w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code5.png 842w" sizes="(max-width: 670px) 100vw, 670px" /></span></p>
<p><span style="font-weight: 400;">We’ll check if there is any missing data in the most important column in our dataset; if that is the case, we will clean the data by removing all null values.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-14345" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code6-300x72.png" alt="python recommendation systems - code6" width="692" height="166" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code6-300x72.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code6.png 666w" sizes="(max-width: 692px) 100vw, 692px" /></span></p>
<p><span style="font-weight: 400;">Then, we’ll define a function that will create a new column, combining all the important column values into one string for each record in our dataset.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14346 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code7-300x90.png" alt="" width="697" height="209" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code7-300x90.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code7.png 766w" sizes="(max-width: 697px) 100vw, 697px" /></span></p>
<p><span style="font-weight: 400;">We’ll create the new column for our dataset.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14347 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code8-300x158.png" alt="" width="967" height="509" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code8-300x158.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code8-1024x540.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code8-768x405.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code8.png 1268w" sizes="(max-width: 967px) 100vw, 967px" /></span></p>
<p><span style="font-weight: 400;">We will create a new variable named cm that will contain a matrix of token counts for each important_features value.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14350 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code9-300x27.png" alt="" width="634" height="57" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code9-300x27.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code9-768x68.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code9.png 777w" sizes="(max-width: 634px) 100vw, 634px" /></span></p>
<p><span style="font-weight: 400;">Then, we’ll create a new variable named cs; this will store a matrix of the similarities between each important_features record for each movie, meaning it will include how similar each pair of movies in our dataset is.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14351 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code10-300x136.png" alt="" width="653" height="295" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code10-300x136.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code10-768x348.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code10.png 811w" sizes="(max-width: 653px) 100vw, 653px" /></span></p>
<p><span style="font-weight: 400;">This is a number between 0 and 1, we can see that the diagonal is 1 because each movie is 100% similar to itself.</span></p>
<p><span style="font-weight: 400;">We can check the size of this matrix, which will be Numbers of Movies * Numbers of Movies.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14352 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code11-300x61.png" alt="" width="541" height="110" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code11-300x61.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code11.png 498w" sizes="(max-width: 541px) 100vw, 541px" /></span></p>
<p><span style="font-weight: 400;">So, time to start the recommendation part. We will have a movie that the user has seen and we will recommend a similar movie to that one. In our example, the movie that the user has seen will be ‘</span><b>Art of Falling in Love</b><span style="font-weight: 400;">’, ID </span><b>‘12870’ </b></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14353 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code12-300x79.png" alt="" width="558" height="147" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code12-300x79.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code12.png 749w" sizes="(max-width: 558px) 100vw, 558px" /></span></p>
<p><span style="font-weight: 400;">*Notice that it has to be an existent movie in the dataset and that, if you change it, you’ll have to change the test*</span></p>
<p><span style="font-weight: 400;">Now, we will create a list of all the similarity score values for all the movies compared to the movie we’ve chosen. (Meaning get a column or a row in the cs matrix).</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14354 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code13-300x133.png" alt="" width="614" height="272" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code13-300x133.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code13-1024x454.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code13-768x341.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code13.png 1278w" sizes="(max-width: 614px) 100vw, 614px" /></span></p>
<p><span style="font-weight: 400;">Once we get it, we’ll sort it from most to least similar.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14355 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code14-300x151.png" alt="" width="645" height="325" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code14-300x151.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code14.png 837w" sizes="(max-width: 645px) 100vw, 645px" /></span></p>
<p><span style="font-weight: 400;">And we’ll show the top 10.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14356 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code15-300x145.png" alt="" width="575" height="278" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code15-300x145.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code15-1024x495.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code15-768x371.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code15.png 1032w" sizes="(max-width: 575px) 100vw, 575px" /></span></p>
<p><span style="font-weight: 400;">Great Work! </span></p>
<p><span style="font-weight: 400;">Looks like it&#8217;s working for romantic movies, but, to test it properly, we should test another genre. To do this, we’ll create a function we can call.</span></p>
<p><span style="font-weight: 400;">We actually wrote 3 functions; let&#8217;s have a look: </span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14357 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code16-300x242.png" alt="" width="614" height="495" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code16-300x242.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code16-768x619.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code16.png 881w" sizes="(max-width: 614px) 100vw, 614px" /></span></p>
<p><span style="font-weight: 400;">We are basically doing the same thing, but generalized for any movie so we can test our program, and called print a few times to make it more readable.</span></p>
<p><span style="font-weight: 400;">Let&#8217;s check how it works. </span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14358 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code17-300x81.png" alt="" width="541" height="146" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code17-300x81.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code17.png 510w" sizes="(max-width: 541px) 100vw, 541px" /></span></p>
<p><span style="font-weight: 400;">Ok, the exception looks good! </span></p>
<p><span style="font-weight: 400;">Let’s see a real result now.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14359 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code18-300x155.png" alt="" width="615" height="318" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code18-300x155.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code18-768x396.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code18.png 779w" sizes="(max-width: 615px) 100vw, 615px" /></span></p>
<p><span style="font-weight: 400;">Great! All of them are Alien/Galaxy related, looks good enough.</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14360 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code19-300x169.png" alt="" width="596" height="336" srcset="https://www.asapdevelopers.com/wp-content/uploads/2021/03/code19-300x169.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2021/03/code19.png 717w" sizes="(max-width: 596px) 100vw, 596px" /></span></p>
<p><span style="font-weight: 400;">I&#8217;m not sure all these movies are entirely similar, but this can be due to our dataset, or even our training selection. In any case, our simple recommendation system has passed the test for sure! </span></p>
<p><strong>Congratulations! You should be proud of yourself! </strong></p>
<p><span style="font-weight: 400;">What do you think? Can this be improved by collaborative filtering? </span><span style="font-weight: 400;">Would you take up the challenge? </span></p>
<h2><span style="font-weight: 400;">Final thoughts on Python Recommendation Systems</span></h2>
<p><span style="font-weight: 400;">The machine learning world can be overwhelming, but as you can see, it’s not rocket science! Anyone can build a basic system that works, and it can certainly save you time and money in your e-commerce business. Imagine recommending 1000 movies on our own! You would need an entire team to sort through the data, but with automation, it falls into the probability and statistics world, and it can be coded.</span></p>
<p><span style="font-weight: 400;">So we encourage you to delve deeper into this world, and hope this information helps you!</span></p>
<div id="fws_6939788d2cd60"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Mobile App Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/python-recommendation-systems/">Python Recommendation Systems</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Golang vs Python</title>
		<link>https://www.asapdevelopers.com/golang-vs-python/</link>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 28 Dec 2020 19:54:25 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=14061</guid>

					<description><![CDATA[<p>Go vs Python At some point, almost all development teams have to choose the best language to use for their software. That is why, in this article, we&#8217;ll be comparing...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/golang-vs-python/">Golang vs Python</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Go vs Python</h2>
<p><span style="font-weight: 400;">At some point, almost all development teams have to choose the best language to use for their software. That is why, in this article, we&#8217;ll be comparing <strong>Golang vs Python</strong> based on different attrasaibutes to help you decide which language is best suited for you and your team. More specifically, these are the attributes we&#8217;ll be looking at:</span></p>
<ul>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Performance</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Scalability</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Applications</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Learning curve</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Rapid prototyping</span></li>
</ul>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="alignnone size-medium wp-image-14073" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-go-300x300.png" alt="golang vs python" width="300" height="300" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-go-300x300.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-go-150x150.png 150w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-go-100x100.png 100w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-go-140x140.png 140w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-go-500x500.png 500w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-go-350x350.png 350w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-go.png 708w" sizes="(max-width: 300px) 100vw, 300px" /><img decoding="async" loading="lazy" class="alignnone size-medium wp-image-14074" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/vs-300x300.png" alt="goland vs python" width="300" height="300" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/vs-300x300.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/vs-150x150.png 150w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/vs-100x100.png 100w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/vs-140x140.png 140w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/vs-500x500.png 500w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/vs-350x350.png 350w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/vs.png 756w" sizes="(max-width: 300px) 100vw, 300px" /><img decoding="async" loading="lazy" class="alignnone size-medium wp-image-14075" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-300x300.png" alt="golang vs python" width="300" height="300" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-300x300.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-1021x1024.png 1021w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-150x150.png 150w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-768x770.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-100x100.png 100w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-140x140.png 140w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-500x500.png 500w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-350x350.png 350w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-1000x1000.png 1000w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python-800x800.png 800w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-python.png 1209w" sizes="(max-width: 300px) 100vw, 300px" /></span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">We&#8217;ve chosen <a href="https://golang.org/">Golang</a> vs <a href="https://www.python.org/">Python</a> as these two programming languages are often compared in the business community because they are not only good for creating web applications but also help automate business-related tasks.</span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14077 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/trends-300x254.png" alt="trends golang vs python" width="446" height="378" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/trends-300x254.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/trends-768x651.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/trends.png 868w" sizes="(max-width: 446px) 100vw, 446px" /></span></p>
<p><span style="font-weight: 400;">Before we get around to comparing Golang and Python, however, let us start by introducing you to these languages.</span></p>
<h2><b>Speaking of Golang (Go)</b></h2>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14078 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/go-300x193.png" alt="golang vs python" width="361" height="232" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/go-300x193.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/go.png 726w" sizes="(max-width: 361px) 100vw, 361px" /></span></p>
<p><span style="font-weight: 400;">Developed by Google back in 2009, Go was a solution to a problem. Its aim was to create a language that took away all the baggage and excesses found in languages such as C++. This gave it a performance and speed boost that makes working with it a delight. Plus, most developers picking up Go for the first time will not be left adrift since its familiar elements and ease of use lend a helping hand.</span></p>
<p><span style="font-weight: 400;">This language supports concurrent programming and also allows you to run multiple processes simultaneously.</span></p>
<h2><b>Let’s see an example….</b></h2>
<p><span style="font-weight: 400;">Imagine you run an </span><b>e-commerce</b><span style="font-weight: 400;"> store that takes orders from customers, checks inventory and charges for orders. In this case, each functionality is relatively small so, if you have a website built with Go, you can expect improved maintainability for relatively small services and an application that is easier to test and deploy effectively.</span></p>
<h2><b>A Python’s tale</b></h2>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class=" wp-image-14079 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/python-software-300x74.png" alt="python software" width="426" height="105" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/python-software-300x74.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/python-software-768x189.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/python-software.png 789w" sizes="(max-width: 426px) 100vw, 426px" /></span></p>
<p><span style="font-weight: 400;">Some developers think that Python&#8217;s where it all starts and ends. It has gained a cult-like following because it is an excellent programming language. The internet is filled with wonders that were created using Python.</span></p>
<p><span style="font-weight: 400;">Python is capable of unleashing its full potential when used in web development, machine learning and fintech. Moreover, thanks to its scalability, it is also popular among startups. </span></p>
<p><span style="font-weight: 400;">However, when looking for a tech partner who’ll help you launch your Python project, make sure they are working with Python 3 as the previous version of the language became obsolete in early 2020.</span></p>
<h2><b>Language simplicity means faster backend development </b></h2>
<p><span style="font-weight: 400;">To give you a practical example, if you were to code the same functionality using Java, it would take three to five times longer than with Python. The equation is simple here: fewer lines of code mean faster development and easier maintenance.</span></p>
<h2><b>Golang vs Python: Performance</b></h2>
<p><span style="font-weight: 400;">There are a lot of practical tests for API response time and, on this front, </span><b>Golang </b><span style="font-weight: 400;">is</span> <span style="font-weight: 400;">the absolute winner.  Python is a great language, but its performance isn&#8217;t the best for use cases such as serialization/deserialization, ranking and aggregation. There are cases with NoSQL databases such as Cassandra where it will take less time for the engine to retrieve data than for Python to turn it into objects.</span></p>
<h2><b>Golang vs Python: Scalability</b></h2>
<p><span style="font-weight: 400;">Building a truly scalable application is an art. If a system does not scale, it can be a problem for any business. </span></p>
<p><span style="font-weight: 400;">So, Google developers created Golang to help solve problems that are at Google’s scale. This involved thousands of programmers working on a large server software hosted on thousands of clusters. Therefore, Golang has support for concurrent process channeling.</span></p>
<p><span style="font-weight: 400;">Python has a really hard time with concurrency, but can implement parallelism through threads. </span></p>
<p><span style="font-weight: 400;">However, when it&#8217;s all said and done, Golang takes this one as well.</span></p>
<h2><b>Golang vs Python: Applications</b></h2>
<p><span style="font-weight: 400;">There isn’t a clear winner for this category. On one hand, Python is widely used in the field of data analytics, artificial intelligence, deep learning and web development.</span></p>
<p><span style="font-weight: 400;">This is thanks to the amazing libraries </span><b>Python</b><span style="font-weight: 400;"> offers which make developers’ lives easier. </span></p>
<p><span style="font-weight: 400;"><a href="https://pandas.pydata.org/"><img decoding="async" loading="lazy" class="alignnone wp-image-14084" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/pandas-300x188.png" alt="pandas" width="187" height="117" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/pandas-300x188.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/pandas.png 557w" sizes="(max-width: 187px) 100vw, 187px" /></a><a href="https://numpy.org/"><img decoding="async" loading="lazy" class="alignnone wp-image-14085" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/numpy-300x120.png" alt="NumPy" width="233" height="93" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/numpy-300x120.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/numpy-768x308.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/numpy-900x362.png 900w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/numpy.png 903w" sizes="(max-width: 233px) 100vw, 233px" /></a><a href="https://www.scipy.org/"><img decoding="async" loading="lazy" class="alignnone wp-image-14086" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/scipy-300x120.png" alt="scypy" width="200" height="80" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/scipy-300x120.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/scipy-768x306.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/scipy.png 793w" sizes="(max-width: 200px) 100vw, 200px" /></a><a href="https://matplotlib.org/"><img decoding="async" loading="lazy" class="alignnone wp-image-14087" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/matplo-300x72.png" alt="matplotlib" width="271" height="65" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/matplo-300x72.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/matplo-1024x246.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/matplo-768x185.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/matplo.png 1417w" sizes="(max-width: 271px) 100vw, 271px" /></a></span></p>
<p><span style="font-weight: 400;"><a href="https://scrapy.org/"><img decoding="async" loading="lazy" class="alignnone wp-image-14088" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/scrapy-300x121.png" alt="scrapy" width="240" height="97" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/scrapy-300x121.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/scrapy-1024x412.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/scrapy-768x309.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/scrapy.png 1417w" sizes="(max-width: 240px) 100vw, 240px" /></a><a href="https://flask.palletsprojects.com/en/1.1.x/"><img decoding="async" loading="lazy" class="alignnone wp-image-14089" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/flask-300x225.png" alt="flask" width="171" height="128" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/flask-300x225.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/flask-768x577.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/flask.png 945w" sizes="(max-width: 171px) 100vw, 171px" /></a><a href="https://pytorch.org/"><img decoding="async" loading="lazy" class="alignnone wp-image-14090" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/pytorch-300x95.png" alt="pytorch" width="268" height="85" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/pytorch-300x95.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/pytorch.png 394w" sizes="(max-width: 268px) 100vw, 268px" /></a></span></p>
<p><span style="font-weight: 400;">Golang, on the other hand, is mostly used for systems programming. Due to its concurrency support, it also has been used in cloud computing or clutter computing. </span><span style="font-weight: 400;">When it comes to good libraries, it also has a few interesting ones.</span></p>
<p><span style="font-weight: 400;"><a href="https://gokit.io/"><img decoding="async" loading="lazy" class="alignnone wp-image-14091" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-300x300.png" alt="logo" width="132" height="132" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-300x300.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-150x150.png 150w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-100x100.png 100w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-140x140.png 140w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo-350x350.png 350w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/logo.png 472w" sizes="(max-width: 132px) 100vw, 132px" /></a><a href="https://gorm.io/"><img decoding="async" loading="lazy" class="alignnone size-full wp-image-14092" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/gorm.png" alt="gorm" width="122" height="69" /></a><a href="https://github.com/tsenart/vegeta"><img decoding="async" loading="lazy" class="alignnone wp-image-14093" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/image-1-211x300.png" alt="image" width="98" height="140" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/image-1-211x300.png 211w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/image-1.png 708w" sizes="(max-width: 98px) 100vw, 98px" /></a><a href="https://github.com/sahilm/fuzzy"><img decoding="async" loading="lazy" class="alignnone wp-image-14094" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/box.png" alt="go box" width="187" height="162" /></a></span></p>
<p><span style="font-weight: 400;">But, given that Python can be used in more diverse fields, and the number of amazing libraries available for it, let&#8217;s give it this point.</span></p>
<h2><b>Golang vs Python: Learning curve</b></h2>
<p><span style="font-weight: 400;">If you’re new to coding, you may be looking at different aspects of your programming language than someone who wants to write an advanced physics simulator for wormhole experimentation. For example, you may want to learn a small language, one that does not imply learning complex syntax, or a flexible language that lets you express yourself more naturally. </span></p>
<p><span style="font-weight: 400;">Go is a small language, it doesn’t have many different ways to do the same thing and there aren’t many features built into the language to cover every possible thing you might want to do. In contrast, Python has more features: classes, lambdas, tuples, iterators and many more. </span></p>
<p><span style="font-weight: 400;">But, even though it has many more features, Python still feels natural. Just take a look at the following snippets. This first one is written in Python: </span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="alignnone wp-image-14071" src="https://www.asapdevelopers.com/wp-content/uploads/2020/12/image-300x111.png" alt="code golang vs python" width="476" height="176" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/12/image-300x111.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/12/image.png 431w" sizes="(max-width: 476px) 100vw, 476px" /></span></p>
<p><span style="font-weight: 400;">As you can see, it&#8217;s pretty straightforward. Next, let&#8217;s take a look at this other function using Go:</span></p>
<p><code>func Filter(vs []string, f func(string) bool) []string {<br />
vsf := make([]string, 0)<br />
for _, v := range vs {<br />
if f(v) {<br />
vsf = append(vsf, v)<br />
}<br />
}<br />
return vsf<br />
}</code></p>
<p><span style="font-weight: 400;">Go may be simple, but that’s not the same as easy. If this language is new to you, it can be hard to figure out what a line of code is meant to do. </span><span style="font-weight: 400;">If you&#8217;re taking your first steps in programming, Python will grant you an easier and more pleasant experience.</span></p>
<h2><b>Golang vs Python: Rapid prototyping</b></h2>
<p><span style="font-weight: 400;">Often in software development, a project&#8217;s requirements are not detailed in advance. Instead, a team may just want to get something up and running that proves the concept and gives results in a simple prototype they can show users, to get feedback and iterate over the product. </span></p>
<p><span style="font-weight: 400;">Python is excellent for this as it allows developers to get their thoughts down quickly in a form that looks almost like English, and results in a program that will probably run. Python’s dynamic typing is very forgiving as you don&#8217;t have to worry about knowing exactly what something is. </span></p>
<p><span style="font-weight: 400;">In contrast, Go is strict. It’s statically typed which means the compiler insists on verifying every file you pass to a function before executing it. This can make the programming experience feel a bit like doing paperwork just for a proof of concept. </span></p>
<h2><b>Final thoughts</b></h2>
<p><span style="font-weight: 400;"><a href="https://www.asapdevelopers.com/what-are-golang-advantages/">Golang</a> vs <a href="https://www.asapdevelopers.com/python-backend-language/">Python</a>, both deserve serious consideration. If at all possible, you should aim to have at least some level of experience in both as it will help you in any tech career, or it might even be enjoyable as a hobby.</span></p>
<p><span style="font-weight: 400;">Both have benefits, depending on what your goal is. There is still a lot more that remains to be seen regarding Go’s applicability and its potential to reach the same levels of Python in terms of industry adoption. As of now, Python continues to be the winner in terms of languages used across different industries and it is likely to continue holding this title in the near future.</span></p>
<div id="fws_6939788d2e957"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/python-development-company/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Python Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/golang-vs-python/">Golang vs Python</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Flutter Login app with Python Backend</title>
		<link>https://www.asapdevelopers.com/flutter-login-app-with-python-backend/</link>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 16 Nov 2020 17:02:40 +0000</pubDate>
				<category><![CDATA[Flutter]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=13857</guid>

					<description><![CDATA[<p>Build a Flutter Login app with Python Backend In today’s world, businesses need to make critical choices when it comes to selecting mobile technologies and they also need to test...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/flutter-login-app-with-python-backend/">Flutter Login app with Python Backend</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Build a Flutter Login app with Python Backend</h2>
<p><span style="font-weight: 400;">In today’s world, businesses need to make critical choices when it comes to selecting mobile technologies and they also need to test and assess these technologies daily. Organizations that are unable to produce easy-to-use products and services are at risk of falling behind their competition.</span></p>
<p><span style="font-weight: 400;">Over the last few years, various mobile frameworks, such as React Native, Xamarin and AngularJS, have been developed. These make it simpler to create digital experiences. More recently, a new player has entered the game: Google Flutter.</span></p>
<p><span style="font-weight: 400;">Then, when it comes to the backend, there is Python. This language makes the learning process easier and its readability means communication is smoother for programmers working on the same project. This also makes it easier for a different programmer working on later additions to understand and work with the original code.</span></p>
<p><span style="font-weight: 400;">In this article, we’ll show you how to connect a Python Django backend with a Flutter frontend using GraphQL.</span></p>
<p><span style="font-weight: 400;">Before we get started, let’s take a look at why we choose to use these tools.</span></p>
<h2><b>Why we use Flutter</b></h2>
<p><img decoding="async" loading="lazy" class="size-medium wp-image-13646 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2020/10/FLUTTER-300x146.png" alt="Flutter Logo" width="300" height="146" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/10/FLUTTER-300x146.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/FLUTTER-1024x500.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/FLUTTER-768x375.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/FLUTTER.png 1092w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p><a href="https://www.asapdevelopers.com/flutter-app-development/"><span style="font-weight: 400;">Flutter</span></a><span style="font-weight: 400;"> is a Google UI toolkit for building native apps for </span><span style="font-weight: 400;">Android</span><span style="font-weight: 400;">, </span><span style="font-weight: 400;">iOS</span><span style="font-weight: 400;">, PC and the</span> <span style="font-weight: 400;">web from a single codebase in record time. Flutter uses Dart as its programming language, a modern alternative to Javascript developed by Google. This OOP language is optimized for UI, fast on all platforms and similar to JavaScript with elements of Java. Flutter helps you develop faster, includes countless widgets, is open-source and portable, and has a great set of testing and debugging tools to optimize your app.</span></p>
<h2><b>Why we use GraphQ</b></h2>
<p><span style="font-weight: 400;">According to its </span><a href="https://graphql.org/"><span style="font-weight: 400;">website</span></a><span style="font-weight: 400;">, “GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.”</span></p>
<p><span style="font-weight: 400;">There are many advantages to using GraphQL. To start with, it creates a uniform API across an entire application without being limited by a specific storage engine. Moreover, GraphQL APIs leverage your existing data and GraphQL engines are available in many languages. Finally, GraphQL calls the functions you provide for each field in the type system with optimal concurrency.</span></p>
<h2><b>Why we use Python         </b></h2>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="aligncenter wp-image-13874" src="https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-300x300.png" alt="Python Logo" width="144" height="144" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-300x300.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-1024x1024.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-150x150.png 150w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-768x769.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-100x100.png 100w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-140x140.png 140w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-500x500.png 500w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-350x350.png 350w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-1000x1000.png 1000w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo-800x800.png 800w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/python-logo.png 1512w" sizes="(max-width: 144px) 100vw, 144px" /></span></p>
<p><span style="font-weight: 400;">There has</span><a href="https://www.asapdevelopers.com/python-backend-language/#:~:text=Python%20is%20great%20for%20machine%20learning&amp;text=Since%20the%20language%20is%20simple,associated%20with%20complex%20programming%20languages."> <span style="font-weight: 400;">long been a debate</span></a><span style="font-weight: 400;"> on which is the best backend language. Is it Swift? Or Java? Maybe C++? Well, although our programmers have an extensive toolkit that prepares them to tackle the most challenging problems, we do have a favorite. Python increases productivity, is platform-independent and easy to read, is great for machine learning, and has countless resources and a large community behind it.</span></p>
<h2><b>Why we use Django      </b></h2>
<p><span style="font-weight: 400;">Django is an open-source Python web framework that has been gaining a lot of popularity lately. It has been used extensively by companies such as Mozilla, Spotify and NASA, as well as</span> <a href="https://www.asapdevelopers.com/django-reasons-why/"><span style="font-weight: 400;">within our team</span></a><span style="font-weight: 400;">. Django is not only fast, secure and versatile: it’s also great for SEO, highly-scalable and portable.</span></p>
<p><span style="font-weight: 400;">Now, let’s get into our app. Here are the steps you should follow:</span></p>
<h2><b>1. Start a new Django Project</b></h2>
<p><span style="font-weight: 400;">Create the virtual env &amp; Activate it </span></p>
<p><span style="font-weight: 400;"><code>mkvirtualenv graphql-auth</code></span></p>
<p><span style="font-weight: 400;">Create the Django Project</span></p>
<p><code>pip install django<br />
django-admin startproject auth<br />
cd auth</code></p>
<p><span style="font-weight: 400;">Create the custom user model</span></p>
<p><span style="font-weight: 400;"><code>python manage.py startapp users</code></span></p>
<p><span style="font-weight: 400;">Then, create the custom user model: </span></p>
<p><script src="https://gist.github.com/joaquinacuna/302a884547e376b49f4427f4f3430478.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/302a884547e376b49f4427f4f3430478"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Add it to the settings</span></p>
<p><script src="https://gist.github.com/joaquinacuna/65a3138a4925f80bad35fea9317026f5.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/65a3138a4925f80bad35fea9317026f5"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Finally, migrate</span></p>
<p><code>python manage.py makemigrations<br />
python manage.py migrate</code></p>
<h2><b>2. Setup Graphene and GraphQL JWT</b></h2>
<p><span style="font-weight: 400;">Install Graphene</span></p>
<p><span style="font-weight: 400;"><code>pip install graphene-django django-graphql-jwt==0.3.0</code></span></p>
<p><span style="font-weight: 400;">Add the url</span></p>
<p><script src="https://gist.github.com/joaquinacuna/ae4f366767d3fe2af28a080693315160.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/ae4f366767d3fe2af28a080693315160"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Edit your settings</span></p>
<p><script src="https://gist.github.com/joaquinacuna/b2ec5e6d173fd3bba3363705e5a6bba7.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/b2ec5e6d173fd3bba3363705e5a6bba7"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Install Django-GraphQL-Auth</span></p>
<p><span style="font-weight: 400;"><code>pip install django-graphql-auth</code></span></p>
<p><script src="https://gist.github.com/joaquinacuna/f1372e39867870fa38cf0d2fe3218d93.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/f1372e39867870fa38cf0d2fe3218d93"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Run it:</span><span style="font-weight: 400;"> </span></p>
<p><span style="font-weight: 400;"><code>python manage.py migrate</code></span></p>
<h3><span style="font-weight: 400;">Setup Email Backend</span></h3>
<p><span style="font-weight: 400;">The default configuration is to send an activation email when registering users; you can set this to</span> <span style="font-weight: 400;">False</span> <span style="font-weight: 400;">on your</span> <a href="https://django-graphql-auth.readthedocs.io/en/latest/settings/"><span style="font-weight: 400;">settings</span></a><span style="font-weight: 400;">, </span><span style="font-weight: 400;">but you still need an email backend for resetting passwords.</span></p>
<p><span style="font-weight: 400;">The quickest solution for development is to set up a</span> <a href="https://docs.djangoproject.com/en/3.0/topics/email/#console-backend"><span style="font-weight: 400;">console email backend</span></a><span style="font-weight: 400;">. To do this, </span><span style="font-weight: 400;">simply add the following to your</span> <span style="font-weight: 400;">settings.py</span><span style="font-weight: 400;">.</span></p>
<p><span style="font-weight: 400;"><code>EMAIL_BACKEND ='django.core.mail.backends.console.EmailBackend'</code></span></p>
<h3><span style="font-weight: 400;">Query: </span><span style="font-weight: 400;">Create the schema</span></h3>
<p><span style="font-weight: 400;">Create a file called </span><span style="font-weight: 400;">schema.py</span><span style="font-weight: 400;"> next to your </span><span style="font-weight: 400;">settings.py</span><span style="font-weight: 400;"> with the following lines:</span></p>
<p><script src="https://gist.github.com/joaquinacuna/4ecdc34b9f1612a11b60fbbefbafd651.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/4ecdc34b9f1612a11b60fbbefbafd651"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">And add </span><a href="https://django-filter.readthedocs.io/en/master/index.html"><span style="font-weight: 400;">Django-Filter</span></a><span style="font-weight: 400;"> to the installed apps.</span></p>
<p><span style="font-weight: 400;"><code>pip install django-filter</code></span></p>
<p><span style="font-weight: 400;"># auth.settings.py</span></p>
<p><script src="https://gist.github.com/JoaquinAcuna97/68af4d45d8ef801414d7d51943a04c22.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/68af4d45d8ef801414d7d51943a04c22"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<h3><span style="font-weight: 400;">Making your first query</span></h3>
<p><span style="font-weight: 400;">Start the dev server:</span></p>
<p><span style="font-weight: 400;"><code>python manage.py runserver</code></span></p>
<p><span style="font-weight: 400;">Open your browser:</span></p>
<p><span style="font-weight: 400;"><code>http://127.0.0.1:8000/graphql</code></span></p>
<p><span style="font-weight: 400;">On your</span> <span style="font-weight: 400;">GRAPHQL_JWT[</span><span style="font-weight: 400;">&#8220;JWT_ALLOW_ANY_CLASSES&#8221;</span><span style="font-weight: 400;">]</span><span style="font-weight: 400;"> setting, add the following:</span></p>
<p><script src="https://gist.github.com/JoaquinAcuna97/4840556932335c78d96fa9d848eccdc4.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/4840556932335c78d96fa9d848eccdc4"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Let&#8217;s try to register a new user:</span></p>
<p><script src="https://gist.github.com/JoaquinAcuna97/8852de351ed6e9bb60174565533d3742.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/8852de351ed6e9bb60174565533d3742"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Something went wrong! Now you know the response format that you can expect of all mutations</span></p>
<p><span style="font-weight: 400;">Let&#8217;s try again, this time, with a super-secret password:</span></p>
<p><script src="https://gist.github.com/JoaquinAcuna97/1c9e96eae29dcbab5f8d0bef31a11c96.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/1c9e96eae29dcbab5f8d0bef31a11c96"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Check if the new user is really on the database:</span></p>
<p><script src="https://gist.github.com/JoaquinAcuna97/feb48664748c1f1cf2c6dfca92fe76e4.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/feb48664748c1f1cf2c6dfca92fe76e4"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Congratulations! You have successfully built your very first authentication system with GraphQL! Now, let&#8217;s create a beautiful frontend for it!</span></p>
<h2><b>3. Create the Flutter login app</b></h2>
<p><code>flutter create auth_frontend<br />
cd auth_frontend<br />
flutter run -d chrome</code></p>
<p><span style="font-weight: 400;">The first time you use it, you’ll see a simple app where you can press a button to increase a counter. </span><span style="font-weight: 400;"><br />
</span><span style="font-weight: 400;">For this tutorial, we have prepared a login example:</span></p>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-13869 size-medium" src="https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image-292x300.png" alt="flutter-login-example" width="292" height="300" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image-292x300.png 292w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image-768x788.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image.png 935w" sizes="(max-width: 292px) 100vw, 292px" /></p>
<p><span style="font-weight: 400;">So far, we have just made the following changes to our main.dart: </span></p>
<p><script src="https://gist.github.com/joaquinacuna/3fb451aa790bdedadf43bec386bc4dce.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/3fb451aa790bdedadf43bec386bc4dce"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">As you can see, a method is called when you press “register”, or “login”. Those are the functions we will implement with a simple backend call.</span></p>
<p>&nbsp;</p>
<h2><b>4. SetUp GraphQL in Flutter login</b></h2>
<p><span style="font-weight: 400;">GraphQL has many benefits, both for the client (devices will need fewer requests and, therefore, reduce data usage) and the programmer (requests are arguable, they have the same structure as the request).</span></p>
<h3><span style="font-weight: 400;">Installation</span></h3>
<p><span style="font-weight: 400;">First, add the following packages to your project&#8217;s dependencies: </span><em><span style="font-weight: 400;">pubspec.yaml</span></em></p>
<p><code>dependencies:<br />
graphql_flutter: ^3.0.0</code></p>
<p><span style="font-weight: 400;">Then, create a graphQL configuration file where you will set up the backend URL, and create the </span><span style="font-weight: 400;">GraphQLClient </span><span style="font-weight: 400;">object.</span></p>
<p><script src="https://gist.github.com/joaquinacuna/17820f4ae3eed2c4c3774de9bbcf7036.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/17820f4ae3eed2c4c3774de9bbcf7036"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">You will need another file to place your GraphQL queries:</span></p>
<p><script src="https://gist.github.com/joaquinacuna/bae2d3979b7ab26c6757df0ae5f3be30.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/bae2d3979b7ab26c6757df0ae5f3be30"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Then, modify your main.dart file to talk to the backend in Register.</span></p>
<p><span style="font-weight: 400;">First, import the necessary packages:</span></p>
<p><script src="https://gist.github.com/joaquinacuna/23926f914546489633ff0413e0ee4883.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/23926f914546489633ff0413e0ee4883"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Then, create the configuration objects in main: </span></p>
<p><script src="https://gist.github.com/joaquinacuna/130bcffdeccf369b8274139a3f37d167.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/130bcffdeccf369b8274139a3f37d167"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">In the _LoginpageState class, add the following:</span></p>
<p><script src="https://gist.github.com/joaquinacuna/ebb048262ea349500960a89f47fa72ca.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/ebb048262ea349500960a89f47fa72ca"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Then, make the </span><em><span style="font-weight: 400;">_createAccountPressed</span></em><span style="font-weight: 400;"> method async and add this code:</span></p>
<p><script src="https://gist.github.com/joaquinacuna/e264c810f63148fcf8cae80578d1fd51.js"></script><br />
<b>Link:</b> <a href="https://gist.github.com/joaquinacuna/e264c810f63148fcf8cae80578d1fd51"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Now, be sure your backend is running as it should, and try to register with a new account in your frontend server. You may see this beautiful error: </span></p>
<p><img decoding="async" loading="lazy" class=" wp-image-13871 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-error-image-300x42.png" alt="" width="489" height="68" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-error-image-300x42.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-error-image.png 634w" sizes="(max-width: 489px) 100vw, 489px" /></p>
<p><span style="font-weight: 400;">Blocked by CORS policy. </span><span style="font-weight: 400;">This happens because your backend does not accept requests from Flutter. There are many fixes for this, and it will depend on which environment you are deploying. For production, you should whitelist your frontend URL in the Django settings. But, for now, we will fix this in</span><span style="font-weight: 400;"> settings.py</span><span style="font-weight: 400;"> by allowing all CORS: </span></p>
<p><span style="font-weight: 400;"><code>pip install django-cors-headers</code></span></p>
<p><script src="https://gist.github.com/JoaquinAcuna97/8624de3ca6fc776994beb0390285bc4b"></script><br />
<b>Link:</b> <a href="https://gist.github.com/JoaquinAcuna97/8624de3ca6fc776994beb0390285bc4b"><span style="font-weight: 400;">script</span></a></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">Finally, try to register a new user again and, if you enter a valid email, you should see a success message in the console!</span></p>
<p><span style="font-weight: 400;"><img decoding="async" loading="lazy" class="wp-image-13870 aligncenter" src="https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image2-268x300.png" alt="flutter-login-app" width="458" height="513" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image2-268x300.png 268w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image2-915x1024.png 915w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image2-768x859.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/11/flutter-login-image2.png 1118w" sizes="(max-width: 458px) 100vw, 458px" /></span></p>
<p><span style="font-weight: 400;">Congratulations! You have built a complete web app, with both a frontend and backend! </span><span style="font-weight: 400;">Go ahead and build something amazing! </span></p>
<p><span style="font-weight: 400;">And, here is the entire project for you to download: </span><a href="https://github.com/JoaquinAcuna97/Flutter-Django-Login"><span style="font-weight: 400;">https://github.com/JoaquinAcuna97/Flutter-Django-Login</span></a><span style="font-weight: 400;"> </span></p>
<h2><b>Final thoughts on Flutter login</b></h2>
<p><span style="font-weight: 400;">Adding a widget with Flutter is really simple thanks to the </span><a href="https://flutter.dev/docs/development/ui/widgets"><span style="font-weight: 400;">official docs</span></a><span style="font-weight: 400;"> and you can find many widgets to add to your app. These include Appbars, icons, images, inputs, and animations, among many others. This, combined with the possibility to connect any backend services, including the potential of Django, is something that can bring a lot of value to your products, and keep your whole dev team happy! </span></p>
<div id="fws_6939788d3023f"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/flutter-app-development/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Flutter Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/flutter-login-app-with-python-backend/">Flutter Login app with Python Backend</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Golang Advantages</title>
		<link>https://www.asapdevelopers.com/what-are-golang-advantages/</link>
		
		<dc:creator><![CDATA[Joaquin Acuña]]></dc:creator>
		<pubDate>Mon, 02 Nov 2020 15:28:05 +0000</pubDate>
				<category><![CDATA[Programming Language]]></category>
		<guid isPermaLink="false">https://www.asapdevelopers.com/?p=13728</guid>

					<description><![CDATA[<p>Golang advantages When it comes to developing an app, there are quite a few programming languages and tools to choose from. Developers have long been debating which is the best...</p>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/what-are-golang-advantages/">Golang Advantages</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2 style="text-align: left;" align="center">Golang advantages</h2>
<p style="text-align: left;" align="center">When it comes to developing an app, there are quite a few programming languages and tools to choose from. Developers have long been debating which is the best one, but the truth is, most of the time, it depends on the project you have in mind. In this article, we&#8217;ll take a look at Golang advantages (an open-source alternative), and why it might be the right fit for your project. We&#8217;ll give you an overview of this technology and go over its most significant features to help you decide whether you should look for Golang development services.</p>
<h2>What is Golang?</h2>
<p><img decoding="async" loading="lazy" class="aligncenter wp-image-13729" src="https://www.asapdevelopers.com/wp-content/uploads/2020/10/Go-Language-Logo-300x113.png" alt="Golang's advantages" width="434" height="163" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/10/Go-Language-Logo-300x113.png 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/Go-Language-Logo-1024x385.png 1024w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/Go-Language-Logo-768x288.png 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/Go-Language-Logo-1536x577.png 1536w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/Go-Language-Logo.png 1920w" sizes="(max-width: 434px) 100vw, 434px" /></p>
<p align="justify">Golang (or Go) is an open-source, compiled programming language developed in 2009 by Google with the help of many community collaborators. Golang has had many releases since then and is currently on version 1.15.2. In addition to Google, other big companies that use this coding language include Apple and Facebook.</p>
<p align="justify">The language came to be as an alternative to Java and C++ for app developers, providing a consistent language with a focus on code readability and clear documentation, among many other features. Golang is known for its simplicity, reliability and efficient code compilation when it comes to developing software.</p>
<h2>Golang advantages:</h2>
<ol>
<li>
<h3>Minimalist and easy to learn</h3>
</li>
</ol>
<p align="justify">Golang’s <a href="https://golang.org/ref/spec">specification</a> is merely 50 pages long (Java’s, for example, is 750 pages long) and it’s full of examples. The language is quite easy to read and easy to learn from just this specification (and even more so if you are already well-versed in Java or C). Moreover, its clean syntax means the language is also easy to maintain. Some of the features that make Go so simple include a minimal interface, no implicit conversions, and packages with clear code separation.</p>
<p align="justify"><img decoding="async" loading="lazy" class="aligncenter wp-image-13730" src="https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-300x148.jpg" alt="golang's advanyages" width="452" height="223" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-300x148.jpg 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-1024x507.jpg 1024w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-768x380.jpg 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-1536x760.jpg 1536w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-2048x1013.jpg 2048w" sizes="(max-width: 452px) 100vw, 452px" /></p>
<ol start="2">
<li>
<h3>Fast</h3>
</li>
</ol>
<p align="justify">The fact that Go is a compiled language means the code you write is directly translated into the relevant format for the processor instead of compiling into byte-code first like other languages do. With no middle-man, Golang is not only faster but also more reliable.</p>
<ol start="3">
<li>
<h3>Transparent</h3>
</li>
</ol>
<p align="justify">Go’s syntax is meant to be transparent. It has only one standard code format created automatically by the <a href="https://blog.golang.org/gofmt">fmt tool</a>. The language makes it easy for you to always know what your code is doing and estimate resources. Languages like Python are as readable as Go, but not quite as transparent.</p>
<ol start="4">
<li>
<h3>Large community = Extensive tools</h3>
</li>
</ol>
<p align="justify">As with most popular programming languages, Golang has a large and supportive community. The language has its own <a href="https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins">GitHub repository</a>, which includes a number of editors and plugins, and there are also <a href="https://golang.org/help/">many other resources</a> available, including a Slack channel, a blog, a sub-Reddit and a forum. And if that isn&#8217;t enough, there are countless Golang programmers out there open to share their knowledge.</p>
<p align="justify"><img decoding="async" loading="lazy" class="aligncenter wp-image-13731" src="https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-2-300x191.jpg" alt="golang's advantages code 2" width="452" height="288" srcset="https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-2-300x191.jpg 300w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-2-1024x652.jpg 1024w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-2-768x489.jpg 768w, https://www.asapdevelopers.com/wp-content/uploads/2020/10/golang-code-2.jpg 1200w" sizes="(max-width: 452px) 100vw, 452px" /></p>
<ol start="5">
<li>
<h3>Large talent pool</h3>
</li>
</ol>
<p align="justify">The fact Golang has such a large community also means there are countless developers offering Golang development services. As the <a href="https://hired.com/state-of-software-engineers">most in-demand language in the world</a>, you are sure to have your pick of developers if you’re looking to start a project using Go.</p>
<ol start="6">
<li>
<h3>Always compatible</h3>
</li>
</ol>
<p align="justify">Golang offers excellent backward compatibility so, if you develop an app with its current version, you should not have problems with new versions in the future. Go’s compatibility means switching versions of the language at any time should be hassle-free.</p>
<ol start="7">
<li>
<h3>Scalable</h3>
</li>
</ol>
<p align="justify">Golang&#8217;s advantages includes <a href="https://tour.golang.org/concurrency/1">Goroutines</a>—functions that run simultaneously and independently—, which take little memory space and make it scalable when dealing with several concurrent processes. You can actually run millions of Goroutines without crashing your system, making for a leaner software.</p>
<ol start="8">
<li>
<h3>Built-in testing</h3>
</li>
</ol>
<p align="justify">Go includes a built-in testing tool, which, just like everything else regarding this language, was created with simplicity and efficiency in mind. It can be used for various types of testing and profiling, and you can even run tests in parallel, among many other features.</p>
<h2><em>Final thoughts on Golang advantages</em></h2>
<p align="justify">As you can see, Go has many perks that make pursuing Golang development services very appealing. If you want more information, you can look at Go’s website to find <a href="https://golang.org/doc/">extensive documentation and tutorials</a>.</p>
<h2>Asap developers</h2>
<p>asap has been developing web and mobile applications for <a href="https://www.asapdevelopers.com/web-mobile-app-san-francisco/">San Francisco Bay Area companies</a> since 2008. With a team of almost 30 hard-working members, we’re big enough to tackle almost any project and, at the same time, agile enough to respond to the changing needs of our clients. We are passionate about technology and are constantly integrating new tools into our portfolio, including Golang development services. We see our clients as strategic partners, so we offer a comprehensive service that is focused on their success.</p>
<div id="fws_6939788d30ff1"  data-column-margin="default" data-midnight="dark"  data-bg-mobile-hidden="" class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding"  data-t-w-inherits="default" data-border-radius="none" data-shadow="none" data-border-animation="" data-border-animation-delay="" data-border-width="none" data-border-style="solid" data-border-color="" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<a class="nectar-button large regular accent-color has-icon  wpb_animate_when_almost_visible wpb_bounce bounce regular-button"  style="margin-top: 40px; color: #ffffff; "  href="https://www.asapdevelopers.com/web-mobile-app-san-francisco/" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Mobile App Development Company</span><i style="color: #ffffff;"  class="icon-button-arrow"></i></a>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a rel="nofollow" href="https://www.asapdevelopers.com/what-are-golang-advantages/">Golang Advantages</a> appeared first on <a rel="nofollow" href="https://www.asapdevelopers.com">asap developers</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
