• Creating an e-commerce bot to buy online items with ScrapingBee and Python

    I wrote about ScrapingBee a couple of years ago where I gave a brief intro about the service. ScrapingBee is a cloud-based scraping service that provides both headless and lightweight typical HTTP request-based scraping services. Recently I discovered that they are providing some cool features which other online services are not providing as such. What are those features? I thought to explore and explain them with a real use case. I used Python language to automate the Daraz group’s shopping website, a famous e-commerce website service in Asian countries like Pakistan, Nepal, Bangladesh, and Sri Lanka.  I am automating DarazPK since I am in Pakistan. You can view the demo…

  • Getting started with Rocksdb and Python

    In this post, I am going to discuss RocksDB. RocksDB is an embeddable persistent key-value store system developed by Facebook. It was originally forked from LevelDB which was created by Google. According to Wikipedia: RocksDB is a high performance embedded database for key-value data. It is a fork of Google’s LevelDB optimized to exploit many CPU cores, and make efficient use of fast storage, such as solid-state drives (SSD), for input/output (I/O) bound workloads. It is based on a log-structured merge-tree (LSM tree) data structure. It is written in C++ and provides official language bindings for C++, C, and Java; alongside many third-party language bindings. RocksDB has particularly been optimized…

  • Introduction to technical Analysis in Python using TA-Lib

    In this tutorial, I am going to discuss TA-Lib, a technical analysis library for Python apps. Before I move on and discuss how you can do technical analysis in Python, allow me to discuss what technical analysis is and how it helps to take a decision whether you buy an asset, sell or hold it. What is Technical Analysis From Investopedia: Technical analysis is a trading discipline employed to evaluate investments and identify trading opportunities by analyzing statistical trends gathered from trading activity, such as price movement and volume. In short, it is the study of past and current data and trying to figure out what’s going to be in…

  • Getting started with Celery and Python

    In this post, I am going to talk about Celery, what it is, and how it is used. What is Celery From the official website: Celery is a simple, flexible, and reliable distributed system to process vast amounts of messages, while providing operations with the tools required to maintain such a system. Wikipedia says: Celery is an open source asynchronous task queue or job queue which is based on distributed message passing. While it supports scheduling, its focus is on operations in real time. In short, Celery is good to take care of asynchronous or long-running tasks that could be delayed and do not require real-time interaction. It can also…

  • Develop Ali Express Scraper in Python with Scraper API

    This is another post in ScrapeTheFamous, in which I will be parsing some famous websites and will discuss my development process. The posts will be using Scraper API for parsing purposes which makes me free from all worries about blocking and rendering dynamic sites since Scraper API takes care of everything. In this post, we are going to scrape AliExpress. AliExpress is a Chinese B2C portal to buy stuff. The script I am going to make consists of two parts, or I say, two functions: fetch and parse. The fetch will accept a category and return all links of individual items and parse will parse an individual entry and returns a few data points in…

  • Develop Google scraper in Python with Scraper API

    This is another post in ScrapeTheFamous, in which I will be parsing some famous websites and will discuss my development process. The posts will be using Scraper API for parsing purposes which makes me free from all worries about blocking and rendering dynamic sites since Scraper API takes care of everything. So this post is about scraping Google search results, the script will accept a keyword and would return results across multiple pages. The data will be stored in a text file in JSON format. The code that is parsing the result is pretty straightforward and given below: def google_scraper(query, start=0): records = [] try: URL_TO_SCRAPE = "http://www.google.com/search?q=" + query.replace(' ', '+') +…

  • Getting started with CCXT Crypto Exchange Library and Python

    I already used CCXT Library in my Airflow-related post here. In this post, I am specifically going to discuss the library and how you can use it to pull different kinds of data from exchanges or trading automation. The demo can be seen here. What is CCXT CryptoCurrency eXchange Trading Library aka CCXT is a JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs. It connects with more than 100 exchanges. One of the best features of this library is that it is exchange agonistic, that is, whether you use Binance or FTX, the signature of routines are…

  • Visualizing Python modules and dependencies with Neo4j

    I am taking a short break from the Blockchain Programming series and writing this post because I found it pretty interesting. The other day I found a tweet(which unfortunately I forgot to bookmark and can’t find it anymore) about visualizing python modules in Neo4J. Guido, the Python creator had responded to that tweet. That tweet got stuck in my mind and I thought it a great excuse to explore Neo4j. I had been thinking of exploring some Graph Databases other than Neo4j. For some weird reason, I had been ignoring Neo4j for a long time, most probably because of the Java thing which I do not like at all. I…

  • Develop and deploy your first Ethereum Smart Contract with Python
    Learn how to write a basic smart contract in Solidity and then integrate it with Python app by using Web3.py

    This post going to be a bit longer as I am going to cover multiple concepts. I will be covering the following things: Smart Contracts and how do they work in Ethereum blockchain. The basics of Solidity Programming language and how to use online and existing IDEs to write and test them. Using Truffle and Ganache for Ethereum development environment setup. Web3.py helps to integrate Smart Contract with Python applications. What is a Smart Contract According to Investopedia: A smart contract is a self-executing contract with the terms of the agreement between buyer and seller being directly written into lines of code. The code and the agreements contained therein exist…

  • Create a crypto Telegram bot in Python using Yahoo Finance API
    A step-by-step guide creating a Telegram bot in Python.

    So I was exploring Telegram APIs for a project someone asked me to work on it. The script was actually a cron job that would be sending messages on daily basis. While working on it I found that you could come up with your own commands that can pull data from some remote API and display the results to Telegram users. I found this an opportunity for my next blog post which I am writing here 🙂 Telegram is very much similar to WhatsApp for communication and it is quite popular among Crypto lovers. Many Crypto traders use both Telegram and Discord to send crypto and stock signals to their…