Category : html

this is the python code i used in the lambda function to get the list of IAM users import boto3 import json client = boto3.client(‘iam’) users = client.list_users() def lambda_handler(event,context): users_list = [] for user in users[‘Users’]: user_dict = {"UserName": user[‘UserName’], "UserId": user[‘UserId’], "Arn": user[‘Arn’], "CreateDate": user[‘CreateDate’]} users_list.append(user_dict) return json.dumps(users_list, default=str) and i created the ..

Read more

with this code I am rendering dictionary from flask backend using jinja template. if dictionary contains 30 items then they will be rendered one by one in a single column. but i want to render first 10 items in column 1, next 10 in column 2 and next 10 in column 3 i.e each column ..

Read more

I have been trying for the last 45 minutes to figure out how to get my favicon on my flask page. Here is my current code: from flask import Flask, render_template, send_from_directory, url_for import os app = Flask(__name__) @app.route("/") def home(): return render_template("index.html") @app.route("/store") def store(): return render_template("store.html") @app.route("/games") def games(): return render_template("games.html") @app.route("/americanstudios") def ..

Read more

I’m trying to remove rows from a table in HTML using python. What I am doing now is reading the table using Pandas (pd.read_html), remove the rows I don’t want (using an if statement and drop), and then I would like to add the table back to the html code. Stuck on the last part ..

Read more