PythonEasy
Search
Home
Tutorial
MCQ Quiz
How To
How to do in python ?
51+ code snippets which helps you in your projects
This is an excellent resource for the Programmer with basic python knowledge who is ready to move beyond tutorials and start building projects
Need more help on your project ?
Request
Execution
Run java program from Python and capture output
Call a shell script from Python code
Convert a .py file to .exe or convert Python programs to standalone executables
Record time taken by my program
Make a time delay in Python or Wait for a time span
Networking
Get domain\username for logged in user
Get hostname from IP address in Python
Get IP from domain name in Python or get IP from hostname in Python
Connect SSH and run command in Python (using paramiko)
Security
Create a random string that is 8 bytes long in Python
Create a unique file name in Python
Generate a 12-digit random number in Python
Generate an ID string with upper case letters and digits
Encode my password to avoid human readability - encode string using base64
DateTime
Convert string to python datetime object
Add hours to current time in python
Display current time in readable format
Convert datetime field from model into UTC time zone
Get current location time (timezone) in windows
Convert a datetime object to seconds
Convert datetime to date
Print today's date in different formats - convert datetime to string
File Operations
Dynamically build a JSON object with Python
Create a temporary directory and get the path or file name in Python
Convert JSON data into a Python object or parse a JSON file in Python
Create an empty file or Implement touch using Python
Prettyprint a JSON file
make a Python class JSON serializable
Parse XML in Python
Move files from one directory to another in Python
List all files of a directory
Read csv using pandas
Extract zip file in Python
Extract directory name or file location from filepath
Extract filename from a file path
Read and extract tar.gz file in Python
Read a csv file in python
Database
Read the data from the oracle database and then write to Excel
Create, insert, update and delete in PostgreSQL Database in python (using psycopg2)
Create, insert, delete data in SQLIte Database in python (using sqlite3)
Connect to MySQL database and fetch data in python (using MySQLdb)
Internet
Make a curl request with username/password
Convert curl command to Python code
Get default browser name on Windows using Python
Urlencode a querystring in Python
Download a file over HTTP from a website using Python
Create WSGI web application in python
Send a HTTP POST and PUT request in python
Send a HTTP GET request with parameters and JSON parsing in Python (using requests)
Send a HTTP GET request and JSON parsing in Python (using requests)
Send an e-mail from your Gmail account using Python
Write a line to us
Your Email
Title
Description
Send
Login
Sign Up
Login
Forgot password?
OR
Sign in with Facebook
Sign in with Google
Email
Password
First Name (Optional)
Last Name (Optional)
Submit