Upload Files Directly to AWS S3 Private Bucket

Posted on November 05, 201812 min read — in aws

Amazon S3 is one of the most used cloud object storage built to store and retrieve any amount of data from anywhere – websites and mobile apps, corporate applications, and data from IoT sensors or devices. Most of the time, files are uploaded to S3 from server-side using SDK. In this process, at…

Python Version Management: pyenv

Posted on August 28, 20186 min read — in development

pyenv lets us to easily switch between multiple versions of Python. It allows to change the global Python version on a per-user basis, provides support for per-project Python versions. Also, it allows overriding the Python version with an environment variable. Installation Clone pyenv repo in your…

Celery Integration with Flask and Redis

Posted on May 30, 20189 min read — in development

Flask is one of the most popular micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. In this article, I…

Install Redis in Ubuntu

Posted on May 29, 20189 min read — in development

Redis is an open source, in-memory data structure store, used as a database, cache and message broker. It is known for its flexibility, performance, and wide language support. That is why it is commonly used as a message broker for celery. Here, I will show how to install Redis on an Ubuntu…

A Quick Guide to Django Logging

Posted on May 24, 20189 min read — in development

In a production environment where our Django application is running as a service, often it becomes difficult to debug any errors without the console log. Of course, there are many solutions out there to tackle this problem like looking into nginx log, creating custom methods to get error logs or…

Custom User Model and Authentication in Django

Posted on April 14, 201818 min read — in development

Django comes with authentication system out-of-the-box. But it may not be good enough for most common cases. For example, Django uses the username/email/password pattern for both signup and login. However, these days it is more common to simply use email/password. So, we need to have a custom user…

Firebase Cloud Messaging for Web using JavaScript

Posted on February 21, 201824 min read — in development

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets us reliably deliver messages at no cost. Using FCM, we can send notification messages that are displayed to the user, or send data messages and determine completely what happens in the application code. It distributes…

Firebase Realtime Database using Python SDK

Posted on February 17, 201821 min read — in development

Firebase Realtime Database is a NoSQL cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. Using Firebase Admin SDK, we can read and write Realtime Database data with full admin privileges, or limited privileges. In my recent project, I had the…

Django Periodic Task using Celery and RabbitMQ | Part 2

Posted on February 11, 201818 min read — in development

Sometimes, we need to execute tasks to run at a specific time every so often - i.e., getting data from an API at regular interval. Celery can be used for running these types of periodic tasks too. Celery uses Celery beat to schedule periodic tasks. It runs tasks at regular intervals, that are…

Django Asynchronous Task using Celery and RabbitMQ | Part 1

Posted on January 27, 201821 min read — in development

Celery is a powerful asynchronous task/job queue based on distributed message passing which is written in Python. It is used for running tasks in the background for both real-time operations as well as scheduled tasks. It's easy to use and works great with Django. So, users don't have to wait…