• Build Your First Solidity Dapp With Web3.js and MetaMask

    Actually, I had planned another topic in Solidity Series for web3.js but then the post could go off tangent hence I am discussing the basics of web3.js and how to interact with a smart contract. I am going to use the same contract I had created here. Basically, it is the web3.js version of the last post. Unlike other posts about web3.js based frontends that use NodeJs and React, I am not going to use any such thing because it is not required to create the front-end of a decentralized app. You do not even need NodeJS at all. You can use your existing skillsets like PHP/Laravel, Django, Rails, etc…

  • 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…

  • Getting started with Protobuffer and Python

    In this post, I am going to talk about Proto Buffers and how you can use them in Python for passing messages across networks.  Protocol Buffers or Porobuf in short, are used for data serialization and deserialization. Before I discuss Protobuf, I would like to discuss data serialization and serialization first. Data Serialization and De-serialization According to Wikipedia Serialization is the process of translating a data structure or object state into a format that can be stored (for example, in a file or memory data buffer) or transmitted (for example, over a computer network) and reconstructed later (possibly in a different computer environment) In simple words, you convert simplex and complex data structures and objects into byte…

  • Python Elasticsearch

    Getting started with Elasticsearch 7 in Python

    I had written about Elasticsearch almost 3 years ago in June 2018. During this time a new Elasticsearch version launched which has some new features and changes. I’d be repeating some concepts again in this post so one does not have to go to the old post to learn about it. So, let’s begin! What is ElasticSearch? ElasticSearch (ES) is a distributed and highly available open-source search engine that is built on top of Apache Lucene. It’s open-source which is built in Java thus available for many platforms. You store unstructured data in JSON format which also makes it a NoSQL database. So, unlike other NoSQL databases, ES also provides…

  • 10 Ways to Save Costs on AWS

    If your organization runs workloads on Amazon Web Services (AWS), AWS is probably a significant part of your IT expenditure. Cutting costs is always a priority, so I put together a list of handy ways you can reduce waste and optimize your usage of AWS to significantly reduce costs.  1. AWS Trusted Advisor AWS Trusted Advisor is a tool that works online to provide you with real-time recommendations. The tool analyzes your AWS environment and then offers best practices you can implement to better utilize your resources. The Advisor offers guidance in five categories, including cost optimization, performance, fault tolerance, service limits, and security. It is up to you whether…

  • HTML

    Using Sitemap to write efficient web scrapers
    A step by step guide writing web scrapers without using extra resources.

    This post is the part of Scraping Series. Usually, when you start developing a scraper to scrape loads of records, your first step is usually to go to the page where all listings are available. You go to the page by page, fetch individual URLs, store in DB or in a file and then start parsing. Nothing wrong with it. The only issue is the wastage of resources. Say there are 100 records in a certain category. Each page has 10 records. Ideally, you will write a scraper that will go page by page and fetch all links. Then you will switch to the next category and repeat the process.…

  • Getting started with GraphQL in Python with FastAPI and Graphene
    Learn how to create your first Python based GraphQL application

    This post is part of the FastAPI series. This is another post related to FastAPI(indirectly) in which I am going to discuss how to use GraphQL based APIs to access and manipulate data. I already have discussed how you can make Rest API in the FastAPI framework in the previous post. We will be learning some basics of GraphQL and how graphene helps us to use Python for writing a GraphQL based application. So, let’s get started! What is GraphQL From the official website: 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…

  • Getting started with FastAPI and MySQL
    Learn how to create Db driven Rest APIs in FastAPI

    This post is part of the FastAPI series. In the first post, I introduced you to FastAPI and how you can create high-performance Python-based applications in it. In this post, we are going to work on Rest APIs that interact with a MySQL DB. We will also be looking at how we can organize routers and models in multiple files to make them maintainable and easier to read. FastAPI does not strict you to use a certain database framework. You may use SQLAlchemy or any other you want. I’d prefer to use peewee since it’s more expressible and easier to use. Installing Peewee and MySQL Drivers Before start using MySQL…

  • Create your first REST API in FastAPI
    A step by step guide creating high performance APIs in Python

    This post is part of the FastAPI series. In this post, I am going to introduce FastAPI: A Python-based framework to create Rest APIs. I will briefly introduce you to some basic features of this framework and then we will create a simple set of APIs for a contact management system. Knowledge of Python is very necessary to use this framework. Before we discuss the FastAPI framework, let’s talk a bit about REST itself. From Wikipedia: Representational state transfer (REST) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services,…