}

Articles tagged "python"

Page 7 of 13

15 min readIntermediate

SQLAlchemy Bulk Insert 2026: The Fastest Methods Compared (40x to 240x Speedup)

SQLAlchemy bulk insert performance guide 2026. ORM add_all vs bulk_save_objects vs Core execute_many (40x) vs PostgreSQL COPY via psycopg2 (240x). Real benchmarks with 100K rows. Async support included.

4 min readIntermediate

Elastic search with python

In this tutorial, we are going to use python and elastic search. We are going to cover from scratch how to use elastic search using python. The tutorial could be read by python and elastic search beginners.

2 min read

How to create ldap users using a python script

In this tutorial, we are going to create a script to create many users on ldap. The input of the script will be a csv file with a list of users. You can later modify the script for your needs, like adding click library to create individual users.

1 min readBeginner

python3 create new empty file

With python3 the best way to touch a file is by using the Path class from pathlib. Once you have an instance of Path (from pathlib import Path) you can use the touch method(): Path('empty_file').touch()

5 min read

How to use python to access google Spreadsheets

In this tutorial, we are going to use gspread python library to access Google Spreadsheets. We are going to see how to set up credentials on your google account and then how to use the python library to access the spreadsheet. As an example, we will provide a script the calculates the total portfolio value and saves it on the spreadsheet to have a historical data

1 min readIntermediate

Install pip Dependency from GitHub in setup.py

Steps to install a python dependency from git in the setup.py using dependency_links. Make sure the user is using this format: git+https://github.com/user/repo.git#egg=project_name . Check here for more details.

1 min readBeginner

Python function to generate secure random password

In this short tutorial, we will explain how to write a function to generate a secure random password generator. the function will accept size and chars as parameters. We use SystemRandom since it's more secure and provides more entropy.

1 min readIntermediate

Pip: No Matching Distribution for Twisted/Pillow

When you try to install Twisted you could get the error: "No matching distribution found for Twisted". One couse could be that you python is missing some extension, like bz2. You will need to change your pytohn interpreter or recompile it.

4 min readIntermediate

Python Cryptography: No module setuptools_ext

When you install cryptography with the command `pip install cryptography --upgrade`, the following error is raised: ImportError: No module named setuptools_ext. Try to upgrade cffi with: pip install -U cffi. Check here for all steps to solve this issue.

1 min readIntermediate

Scrapy: libxml/xmlversion.h Not Found

If you have the error Python cryptography: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 while installing python cryptography, try the following SOLUTION: sudo apt-get install python3 python-dev python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python-pip. Check here for full details