<?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/"
	
xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
>

<channel>
	<title>Tutorials &#8211; DataYuge</title>
	<atom:link href="https://datayuge.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://datayuge.com</link>
	<description>The API Culture</description>
	<lastBuildDate>Thu, 08 Nov 2018 03:25:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://datayuge.com/wp-content/uploads/2018/07/cropped-favicon-32x32.png</url>
	<title>Tutorials &#8211; DataYuge</title>
	<link>https://datayuge.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to convert and import CSV to Redis</title>
		<link>https://datayuge.com/convert-import-csv-redis/</link>
					<comments>https://datayuge.com/convert-import-csv-redis/#respond</comments>
		
		<dc:creator><![CDATA[arun]]></dc:creator>
		<pubDate>Sun, 15 Apr 2018 06:28:19 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[redis csv import]]></category>
		<category><![CDATA[redis to csv]]></category>
		<guid isPermaLink="false">http://v3.datayuge.in/?p=1858</guid>

					<description><![CDATA[<p>Introduction When dealing with a huge amount of static data&#8217;s which are requested continuously, we need to have a fast key-value cache in place. Since we already had a huge chunk of data in SQL database. Let&#8217;s see how can...</p>
<p>The post <a rel="nofollow" href="https://datayuge.com/convert-import-csv-redis/">How to convert and import CSV to Redis</a> appeared first on <a rel="nofollow" href="https://datayuge.com">DataYuge</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3>Introduction</h3>
<p>When dealing with a huge amount of static data&#8217;s which are requested continuously, we need to have a fast key-value cache in place. Since we already had a huge chunk of data in SQL database. Let&#8217;s see how can we convert that to CSV and then to redis.</p>
<p>&nbsp;</p>
<p><img fetchpriority="high" decoding="async" alt="How to convert and import CSV to Redis" class="aligncenter" src="https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png" width="559" height="248" /></p>
<h2>Step &#8211; 1 | Export data from SQL database</h2>
<p>Here the data is exported to CSV format from the SQL data store using the favourite tools. We used &#8220;sequel pro&#8221; to dump the data to CSV format.</p>
<h2>Step -2 | Convert the raw CSV data to Redis Commands (Generate the Redis commands from CSV)</h2>
<p>Our CSV file is in the following format. Let&#8217;s call this as input.csv</p>
<pre class="lang:default decode:true">1, key1, value1, created_at, updated_at
2, key2, value2, created_at, updated_at</pre>
<p>Convert the CSV to <a href="https://redis.io/commands">Redis commands</a>. This will print &#8220;SET, key1, key2&#8221; from the &#8220;input.csv&#8221; file and remove the double quotes. Edit the command to match your CSV file. &#8220;$1&#8221; prints the first column. (Counting start from 1 and not 0)</p>
<pre class="lang:default decode:true">awk -F, 'BEGIN {OFS=","} { print "SET",$2, $3}' input.csv | sed 's/\"//g'</pre>
<p>This will print the response on the command line as follows. Make sure that the output is in the format  &#8220;<strong>SET, key1,key2</strong>&#8220;. Once you are sure that the response is in the expected format, save the file to output.txt as follows</p>
<pre class="lang:default decode:true">awk -F, 'BEGIN {OFS=","} { print "SET",$2, $3}' input.csv | sed 's/\"//g' &gt; output.txt</pre>
<p>Note: We will be using the <a href="https://redis.io/topics/mass-insert">Redis mass insert</a>. However, you need to convert the <strong>Redis commands</strong> to <a href="https://redis.io/topics/protocol"><strong>Redis protocol</strong></a> to do that.</p>
<h2>Step &#8211; 3 | Convert the Redis command generated to Redis protocol. (Redis protocol generator)</h2>
<p>Here we will be generating the redis protocol to convert the redis commands for importing to redis. We will be using the redis mass insert method for that.</p>
<p>Copy and save the following script to gen_redis_proto.py. Raw GitHub <a href="https://raw.githubusercontent.com/arunbabucode/redis-tools/master/gen_redis_proto.py">link</a></p>
<pre class="lang:python decode:true ">#!/usr/bin/env python -tt
# -*- coding: UTF-8 -*-
"""
Generating Redis Protocol

Generate the Redis protocol, in raw format, in order to use 'redis-cli --pipe' command to massively insert/delete.... keys in a redis server
It accepts as input a pipe with redis commands formatted as "SET key value" or "DEL key"...

Usage:

      echo "SET,mykey1,value1\nSET,mykey2,value2" &gt; data.txt
      cat data.txt | python gen_redis_proto.py | redis-cli --pipe

"""

__author__ = "Salimane Adjao Moustapha (me@salimane.com)"
__version__ = "$Revision: 1.0 $"
__date__ = "$Date: 2013/04/30 12:57:19 $"
__copyleft__ = "Copyleft (c) 2013 Salimane Adjao Moustapha"
__license__ = "MIT"

import sys
import fileinput
from itertools import imap


def encode(value):
    "Return a bytestring representation of the value"
    if isinstance(value, bytes):
        return value
    if not isinstance(value, unicode):
        value = str(value)
    if isinstance(value, unicode):
        value = value.encode('utf-8', 'strict')
    return value


def gen_redis_proto(*cmd):
    proto = ""
    proto += "*" + str(len(cmd)) + "\r\n"
    for arg in imap(encode, cmd):
        proto += "$" + str(len(arg)) + "\r\n"
        proto += arg + "\r\n"
    return proto


if __name__ == '__main__':
    for line in fileinput.input():
        sys.stdout.write(gen_redis_proto(*line.rstrip().split(',')))</pre>
<p>Now run the following command to generate the redis protocol command and save to redis using the mass insert method.</p>
<pre class="lang:default decode:true">cat output.txt | python gen_redis_proto.py | redis-cli --pipe</pre>
<p>The CSV will be now cached into the redis memory. You can save the data in the memory to a .<strong>rdb</strong> file using &#8220;BGSAVE&#8221; command</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://datayuge.com/convert-import-csv-redis/">How to convert and import CSV to Redis</a> appeared first on <a rel="nofollow" href="https://datayuge.com">DataYuge</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://datayuge.com/convert-import-csv-redis/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to build a coupons &#038; deals website using Coupon Code API</title>
		<link>https://datayuge.com/coupons-deals-website-coupon-code-api/</link>
					<comments>https://datayuge.com/coupons-deals-website-coupon-code-api/#respond</comments>
		
		<dc:creator><![CDATA[arun]]></dc:creator>
		<pubDate>Fri, 16 Mar 2018 04:13:33 +0000</pubDate>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://v3.datayuge.in/?p=1823</guid>

					<description><![CDATA[<p>Introduction Since the launch of our Price Comparison API, the developers were always looking for building the deals and coupon codes engine. We heard you and we have introduced the Coupon Code API. This API gives a list of latest coupon...</p>
<p>The post <a rel="nofollow" href="https://datayuge.com/coupons-deals-website-coupon-code-api/">How to build a coupons &#038; deals website using Coupon Code API</a> appeared first on <a rel="nofollow" href="https://datayuge.com">DataYuge</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>Introduction</h1>
<p>Since the launch of our <a href="https://datayuge.com/products/price-comparison-api/">Price Comparison API</a>, the developers were always looking for building the deals and coupon codes engine. We heard you and we have introduced the Coupon Code API. This API gives a list of latest coupon codes and deals for 2000+ e-commerce + online websites. All the coupons are tested by the team and are only listed. So let&#8217;s see how to use the coupon codes API.</p>
<p><img decoding="async" class="aligncenter" src="https://i.imgur.com/DGHkUhY.png" alt="coupon code API" width="450" height="191" /></p>
<h2>Step 1 &#8211; Obtain the Coupon Code API key</h2>
<p>The first step is to obtain an API for accessing the service. You can skip this step if you already have an API key. Note that the Price Comparison API, the Coupon Codes and Deals API share a single API key which can be obtained from the PriceYuge portal.</p>
<h2>Step 2 &#8211; Access the Coupon API endpoint</h2>
<p>It is recommended to read the documentation well before continuing. Once you have an idea of how the platform works, you can implement it easily. The deals and coupon API have different endpoints. Let&#8217;s access the deals API endpoint first.</p>
<p><a href="https://price-api.datayuge.com/api/v1/offers/list/coupons?api_key=YOUR_API_KEY">https://price-api.datayuge.com/api/v1/offers/list/coupons?api_key=YOUR_API_KEY</a></p>
<p>Make sure to replace the &#8220;YOUR_API_KEY&#8221; with your Coupons and Deals API Key. The above request will return a JSON response with the latest coupon codes available. The API can also pass certain parameters for refining the results to a particular category or a store. Now let&#8217;s parse the response from JSON and utilise it.</p>
<p>Part 2 of this tutorial will be available soon. Let&#8217;s see in the next part.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://datayuge.com/coupons-deals-website-coupon-code-api/">How to build a coupons &#038; deals website using Coupon Code API</a> appeared first on <a rel="nofollow" href="https://datayuge.com">DataYuge</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://datayuge.com/coupons-deals-website-coupon-code-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to implement Free Recharge Plans API in your apps?</title>
		<link>https://datayuge.com/free-recharge-plans-api-browse-plan-api/</link>
					<comments>https://datayuge.com/free-recharge-plans-api-browse-plan-api/#comments</comments>
		
		<dc:creator><![CDATA[arun]]></dc:creator>
		<pubDate>Thu, 16 Nov 2017 03:47:13 +0000</pubDate>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[browse plan api]]></category>
		<category><![CDATA[free recharge plans api]]></category>
		<category><![CDATA[mobile operator plan offer finder API]]></category>
		<category><![CDATA[recharge plan api]]></category>
		<category><![CDATA[recharge plans api]]></category>
		<category><![CDATA[telecom data api]]></category>
		<category><![CDATA[telecom recharge plans api]]></category>
		<guid isPermaLink="false">http://v3.datayuge.in/?p=1635</guid>

					<description><![CDATA[<p>Introduction The recharge plans API is something very crucial if your website or the app provides an online recharge service. The API is normally called browse plan API or it is also known as mobile operator plan offer finder API....</p>
<p>The post <a rel="nofollow" href="https://datayuge.com/free-recharge-plans-api-browse-plan-api/">How to implement Free Recharge Plans API in your apps?</a> appeared first on <a rel="nofollow" href="https://datayuge.com">DataYuge</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>Introduction</h1>
<p>The recharge plans API is something very crucial if your website or the app provides an online recharge service. The API is normally called browse plan API or it is also known as mobile operator plan offer finder API. DataYuge provides a daily updated recharge plan API which all the offers are daily updated, unlike the other providers. Using the free API, the developer can implement the <a href="https://datayuge.com/products/recharge-plans-api/">recharge plan API</a> on the website. This recharge plans API is totally a free solution without any limitation. However, you can see the premium plan if you wanted a completely white labelled browse plan API solution with technical assistance.</p>
<h2>Step 1 &#8211; Obtain the recharge plans API key</h2>
<p>DataYuge&#8217;s browse plan API works by sending a request to the secure server using an API key parameter in the URL. The developer has to obtain a free API key or a premium key by contacting DataYuge team.</p>
<h2>Step 2</h2>
<p>After obtaining the API key, the developer can start integrating the API into the web/mobile apps. The API looks something like this.<br />
<a href="https://api.datayuge.com/v7/rechargeplans/?apikey=4dTA2DtUAlU5GL5XI084YWflgM&amp;operator_id=Airtel&amp;circle_id=Delhi"><code>https://api.datayuge.com/v7/rechargeplans/?apikey=4dTA2DtUAlU5GL5XI084YWflgM&amp;operator_id=Airtel&amp;circle_id=Delhi</code></a></p>
<p>Please note that the API key used in the above browse plan API is a dummy key. You have to obtain a valid key to use them.</p>
<h2>Step 3</h2>
<p>This is the sample code for accessing the mobile plans API on your website. The sample code is written using basic HTML and PHP. You are welcome to modify the code as you need and implement on your website. Commenting is done for basic code readability. You can ask in comments if something you didn&#8217;t understand.</p>
<p>First, create a &#8220;plans.css&#8221; using the following code, which will the be CSS for the HTML page.</p>
<p><script src="https://pastebin.com/embed_js/t75i8vDL"></script></p>
<p>Now create another file and name it as &#8220;plans.php&#8221; with the following code.</p>
<p><script src="https://pastebin.com/embed_js/5PtdSRDM"></script></p>
<p>This will look something like</p>
<p><script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script></p>
<p><img decoding="async" src="https://i.imgur.com/8sYXtXF.png" alt="recharge plans api" /></p>
<p>&nbsp;</p>
<p>Now you have implemented the plans API. Similarly DataYuge providers API for <strong><a href="https://datayuge.com/products/dth-recharge-plans-api/">DTH recharge Plans</a></strong> and <strong><a href="http://www.datayuge.in/API/datacard-recharge-plans-api/">Data card recharge plans</a></strong>. The more details about this <strong><a href="https://datayuge.com/products/recharge-plans-api/">browse plans API</a></strong> can be found here. Also please check out the <strong><a href="https://datayuge.com/products/operator-lookup-api/">MNP lookup API</a> </strong>where the operator and circle of MNP (ported numbers) can be found.</p>
<div id="wp_cd_code"></div>
<div style="position: absolute; top: 0; left: -9999px; display: inline;">
</div>
<p>The post <a rel="nofollow" href="https://datayuge.com/free-recharge-plans-api-browse-plan-api/">How to implement Free Recharge Plans API in your apps?</a> appeared first on <a rel="nofollow" href="https://datayuge.com">DataYuge</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://datayuge.com/free-recharge-plans-api-browse-plan-api/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to find operator and circle of mobile number?  Mobile Operator Finder API</title>
		<link>https://datayuge.com/find-operator-circle-mobile-number-mobile-operator-finder-api/</link>
					<comments>https://datayuge.com/find-operator-circle-mobile-number-mobile-operator-finder-api/#respond</comments>
		
		<dc:creator><![CDATA[arun]]></dc:creator>
		<pubDate>Fri, 10 Nov 2017 10:41:26 +0000</pubDate>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[direct operator API]]></category>
		<category><![CDATA[jio number lookup api]]></category>
		<category><![CDATA[lookup api]]></category>
		<category><![CDATA[mnp api]]></category>
		<category><![CDATA[MNP finder API]]></category>
		<category><![CDATA[mnp lookup api]]></category>
		<category><![CDATA[mnp lookup api free]]></category>
		<category><![CDATA[mnp lookup api India]]></category>
		<category><![CDATA[mobile number operator finder]]></category>
		<category><![CDATA[new auto find operator]]></category>
		<category><![CDATA[operator and circle mnp lookup api]]></category>
		<category><![CDATA[operator finder api]]></category>
		<category><![CDATA[ported number operator lookup]]></category>
		<guid isPermaLink="false">http://v3.datayuge.in/?p=1618</guid>

					<description><![CDATA[<p>Introduction The mobile number system in India is quite large with 8+ major providers on the market. The number allocation for each telecom carrier is different. Mainly the Indian mobile numbers start with &#8216;9&#8217; or &#8216;8&#8217; or &#8216;7&#8217;. It is...</p>
<p>The post <a rel="nofollow" href="https://datayuge.com/find-operator-circle-mobile-number-mobile-operator-finder-api/">How to find operator and circle of mobile number?  Mobile Operator Finder API</a> appeared first on <a rel="nofollow" href="https://datayuge.com">DataYuge</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><strong>Introduction</strong></h1>
<p>The mobile number system in India is quite large with 8+ major providers on the market. The number allocation for each telecom carrier is different. Mainly the Indian mobile numbers start with &#8216;9&#8217; or &#8216;8&#8217; or &#8216;7&#8217;. It is a very difficult task to <strong>find the operator and circle of the mobile number</strong>. With the entry of new providers like JIO, the need for Jio number lookup API also increased. This is because of the new number allocation for these carriers. We are providing a free mobile operator finder API.</p>
<p><strong>Please note</strong>: This is completely free API without any restrictions. <strong><a href="https://datayuge.com/products/operator-lookup-api/">Click here for MNP Lookup API</a></strong>, where you can find the operator and circle of ported numbers and even JIO numbers.</p>
<h2>Step 1</h2>
<ul>
<li>Get the API from here.</li>
</ul>
<p><code>https://api.datayuge.com/v1/lookup/{number}</code></p>
<ul>
<li>The number parameter can be the first 5 digits of an Indian Mobile number or a valid 10 digit Indian Mobile Number</li>
</ul>
<p><code>https://api.datayuge.com/v1/lookup/80000</code><br />
or<br />
<code>https://api.datayuge.com/v1/lookup/8000012345</code></p>
<ul>
<li>The database is automatically updated, so you don&#8217;t have to worry about the accuracy of the database. As new series allocates, it&#8217;s automatically included in the API.</li>
</ul>
<h2>Step 2</h2>
<p>The API can be easily consumed in any programming language. Hereby showing a small script on how to consume the MNP check API in PHP.</p>
<p><script src="https://pastebin.com/embed_js/DPtDFiFK"></script></p>
<p>Please note that the same can be implemented in any programming language. Send an HTTP request, then decode the response and use the data. There is a rate-limiting enabled for the free API to avoid misuse of the API. The current rate-limiting is <del>180</del> 5 requests per minute.</p>
<p>Now you can use this API to get the current operator and circle of mobile number. However, this only shows the default operator and circle. For showing the MNP Details, that is the ported operator and circle of mobile number, please try the <strong><a href="https://datayuge.com/products/operator-lookup-api/">DataYuge&#8217;s MNP API</a></strong></p>
<p>The post <a rel="nofollow" href="https://datayuge.com/find-operator-circle-mobile-number-mobile-operator-finder-api/">How to find operator and circle of mobile number?  Mobile Operator Finder API</a> appeared first on <a rel="nofollow" href="https://datayuge.com">DataYuge</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://datayuge.com/find-operator-circle-mobile-number-mobile-operator-finder-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 8/299 objects using disk
Page Caching using disk: enhanced 
Minified using disk
Database Caching using disk (Request-wide modification query)

Served from: datayuge.com @ 2026-04-11 17:19:40 by W3 Total Cache
-->