Sharing files from SharePoint to Azure Blob Storage using Python

Let’s see how we can share files between two cloud storage solutions - SharePoint and Azure Blob Storage using Python. We will be simply copying all the files from a sharepoint site to an Azure Blob Storage container. Sharepoint sites will have a drive associated with it and we can access the files in the drive using the Graph API. We will be using the requests library to interact with the Graph API. ...

Python - Multithreaded web crawler

I recently had written a web crawler in Python for crawling through a database website. It was a very interesting experience. I needed to crawl through 6850+ pages and extract data from each page, which required some conditions to be met. I used Python for this task, and it was very easy to write a web crawler in Python. First approach I wanted to make sure it works with a single page ( with 50 links ) properly. I needed the following ...

Python - Testing

Python unittest library is a built-in library that provides a way to write and run tests for your Python code. It is a part of the Python standard library and is widely used for writing unit tests in Python. pytest is another popular choice for testing in Python due to its simplicity and extensibility. Writing Tests unittest provides a set of classes and methods that can be used to write tests. The unittest.TestCase class is used to define test cases, and the assert methods are used to verify the expected behavior of the code under test. ...

Python - Overview

Python is an interpreted, high-level, and general-purpose programming language known for its readability and concise syntax. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. Python’s extensive standard library, dynamic typing, and dynamic binding options make it highly attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components. Few things I like about Python are Readability and Syntax: Python’s syntax is simple and clean. Extensive Standard Library: Python comes with a large standard library that includes modules for various tasks, such as connecting to web servers, reading JSON, and more. Few things I dislike about Python are ...

Running Async Tasks in Django using Celery

Django is one of the best web frameworks to build some thing fast which comes with a lot of features. Even if it doesn’t appeal in terms of raw performance, it is one of the fastest frameworks in terms of development iteration. Celery is a distributed task queue that helps us to run tasks asynchronously. It is widely used in Django applications to run background tasks such as sending emails, processing images, etc. ...