Server Side Programming Articles

Page 392 of 2109

How to use Boto3 to paginate through security configuration present in AWS Glue

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 281 Views

In this article, we will see how to paginate through security configuration present in AWS Glue using Boto3. AWS Glue security configurations define encryption settings for data at rest and in transit. Problem Statement Use boto3 library in Python to paginate through security configurations from AWS Glue Data Catalog that are created in your account. Understanding Pagination Parameters The pagination function accepts three optional parameters ? max_items − Total number of records to return. If available records exceed this limit, a NextToken is provided for resuming pagination. page_size ...

Read More

How to use Boto3 to paginate through all jobs present in AWS Glue

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 747 Views

In this article, we will see how to paginate through all jobs present in AWS Glue using the boto3 library in Python. Problem Statement Use boto3 library in Python to paginate through jobs from AWS Glue Data Catalog that is created in your account. Understanding Pagination Parameters Before implementing the solution, let's understand the key pagination parameters ? max_items − Total number of records to return. If available records exceed this limit, a NextToken is provided for resuming pagination. page_size − Number of items per page during pagination. starting_token − Token from previous response ...

Read More

How to use Boto3 to paginate through the job runs of a job present in AWS Glue

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 575 Views

In this article, we will see how to paginate through all the job runs of a job present in AWS Glue using the boto3 library. This is useful when dealing with jobs that have many runs and you need to retrieve them efficiently in smaller chunks. Understanding Pagination Parameters The pagination function accepts several optional parameters along with the required JobName: max_items − Total number of records to return. If more records are available, a NextToken will be provided for continuation. page_size − Number of records per page. ...

Read More

Remove Tuples from the List having every element as None in Python

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 466 Views

When working with lists of tuples, you may need to remove tuples where every element is None. This is different from removing tuples that contain any None values. Python provides several approaches to filter out tuples containing only None elements. Using List Comprehension with all() The most efficient approach uses list comprehension with the all() function to check if every element in a tuple is None − my_list = [(2, None, 12), (None, None, None), (23, 64), (121, 13), (None, ), (None, 45, 6)] print("The list is :") print(my_list) my_result = [sub for sub ...

Read More

How to use Boto3 to to paginate through all databases present in AWS Glue

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 621 Views

In this article, we will see how to paginate through all databases present in AWS Glue using the boto3 library in Python. Problem Statement Use boto3 library in Python to paginate through all databases from AWS Glue Data Catalog that is created in your account. Pagination Parameters The pagination function uses three important parameters: max_items − denotes the total number of records to return. If the number of available records is greater than max_items, then a NextToken will be provided in the response to resume pagination. page_size − denotes the size of each page. ...

Read More

Trim tuples by N elements in Python

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 280 Views

When working with lists of tuples, you might need to remove a specific number of elements from the beginning or end. Python provides several approaches to trim tuples by N elements. Using del Operator The del operator removes elements at a specific index ? my_list = [(1, 2, 11), (99, 76, 34, 89), (3.08, 11.56), ("Hi", "Will"), ("Rob", "Ron")] n = 2 print("Original list:") print(my_list) print(f"Removing element at index {n}") del my_list[n] print("List after deletion:") print(my_list) Original list: [(1, 2, 11), (99, 76, 34, 89), (3.08, 11.56), ('Hi', 'Will'), ('Rob', ...

Read More

How to use Boto3 to paginate through all crawlers present in AWS Glue

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 483 Views

In this article, we will explore how to use Boto3 to paginate through all AWS Glue crawlers in your account efficiently. Overview AWS Glue crawlers can be numerous in large accounts. Using pagination allows you to retrieve crawler information in manageable chunks, preventing timeouts and memory issues. Parameters The pagination function accepts three key parameters − max_items − Total number of records to return. If more records exist, a NextToken is provided for continuation. page_size − Number of crawlers per page/batch. starting_token − Token from previous response to continue pagination from a specific point. ...

Read More

Change command Method for Tkinter Button in Python

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 5K+ Views

The Button widget in Tkinter is crucial for handling events and performing operations in GUI applications. Sometimes you need to change what a button does after it's been created and displayed. To change a button's command method after initialization, use the configure() method. This allows you to reassign the button's functionality dynamically during program execution. Syntax button.configure(command=new_function) Example Here's a complete example showing how to change a button's command method ? # Import tkinter library from tkinter import * # Create an instance of tkinter frame win = Tk() ...

Read More

Find number of times every day occurs in a Year in Python

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 706 Views

When working with calendar calculations, you might need to find how many times each day of the week occurs in a given month. This is useful for scheduling, payroll calculations, or planning recurring events. Understanding the Problem In any month, most days occur either 4 or 5 times. For a month with n days starting on a specific day, we need to calculate the frequency of each weekday. Algorithm Approach The solution works by: Starting with a base count of 4 for each day (since 4 × 7 = 28 days) Adding the extra ...

Read More

How to use Boto3 to update the details of a workflow in AWS Glue Catalog

Ashish Anand
Ashish Anand
Updated on 25-Mar-2026 368 Views

In this article, we will see how to update the details of a workflow in AWS Glue Catalog using the boto3 library in Python. What is AWS Glue Workflow? An AWS Glue workflow is a visual representation of a multi-job ETL process. You can use workflows to design complex ETL operations that involve multiple crawlers, jobs, and triggers. The update_workflow function allows you to modify workflow properties like description and default run properties. Problem Statement Use boto3 library in Python to update details of a workflow that is created in your AWS Glue account. Required ...

Read More
Showing 3911–3920 of 21,090 articles
« Prev 1 390 391 392 393 394 2109 Next »
Advertisements