Flask Response Object – Related HTTP Header Information

Flask Response Object - Related HTTP Header Information

1. Related HTTP Header Information HTTP headers are used to control the interaction rules between the client and the server (such as cross-origin, caching, content type, etc.). Below are commonly used header properties and methods in the Response object: 1. access_control_allow_credentials Type: Boolean Function: Indicates whether cross-origin requests are allowed to carry credentials (such as … Read more

Setting Up an HTTP Server on Termux: Lightweight, Process Management, Logging, and Reverse Proxy Optimization

Setting up a production-grade HTTP server on Termux requires consideration of stability, performance, security, and resource usage. Below is a complete solution for building a web server using Python 3.12.12, incorporating a lightweight WSGI server, process management, logging, and reverse proxy optimization: Solution Architecture [Client] → [Caddy (Reverse Proxy/SSL)] → [Gunicorn (WSGI Server)] → [Flask/FastAPI … Read more

Essential Libraries for Python Beginners: Boost Your Efficiency with These 3 Amazing Libraries

Are you a beginner in <span>Python</span> struggling with data processing, web development, or charting? Don’t worry! The ecosystem of third-party libraries in Python has already prepared solutions for you. Today, I will recommend 3 treasure-level practical libraries that can handle everything from data cleaning to <span>Web</span> development and data visualization in one go! They are … Read more

Practical Python Programming · Useful Tools and Libraries — Flask Routing and Templates

The two core features of Flask: • Routing: Mapping URLs to Python functions • Template: Jinja2 template system for rendering HTML pages You will learn how to build web pages, pass values, template inheritance, static files, and other core knowledge. Part One: Flask Routing 1. What is Routing? Routing defines which function should handle a … Read more

Introduction to the Flask Framework (Advanced Python)

Learning Website: flask-github-net-cn (non-mp.weixin.qq.com domains cannot be inserted, the short link needs to be changed to a dot) English Website: flask-palletsprojects-com/en/stable Create an Environment > mkdir myproject > cd myproject > py -3 -m venv .venv Activate the Environment > .venv\Scripts\activate Install Flask $ pip install Flask A Minimal Application from flask import Flask app … Read more

Complete Guide to Python SSTI Vulnerabilities

1. What is SSTI? SSTI (Server Side Template Injection) is a web security vulnerability where an attacker injects malicious code into a template engine, causing the server to execute unintended operations. Template engines are used in web development to separate user interface from business data, enhancing code reusability and development efficiency. The server uses the … Read more

Understanding HTTP/HTTPS: Key Concepts and Practical Applications

Understanding HTTP/HTTPS: Key Concepts and Practical Applications

In the current era of rapid development in digital intelligence technology, HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure) are the core protocols of network communication, forming the foundation for all web applications, API interfaces, and cloud services. Understanding their network principles and mastering core application techniques are not only essential skills for … Read more

100 Classic Python Programming Cases with Source Code

100 Classic Python Programming Cases with Source Code

The Python programming language, with its simple syntax and powerful libraries, has become a tool for beginners and developers to quickly realize their ideas. This article compiles a set of 100 classic cases covering core Python knowledge points and typical application scenarios, helping readers enhance their programming skills through practice. The following sections will select … Read more

Practice Makes Perfect: 247 Python Practical Cases!

Practice Makes Perfect: 247 Python Practical Cases!

As we all know, learning Python can often be tedious when reading books or slow when watching videos, and the learning cases found online can be quite disorganized… Practice makes perfect! Today, I have gathered a collection of Python practical cases from beginner to advanced, totaling 247 cases and 185 pages of content. Content includes: … Read more

Master Python in One Month: A Comprehensive Guide

Master Python in One Month: A Comprehensive Guide

Follow 👆 the official account and reply with "python" to receive a zero-based tutorial! Source from the internet, please delete if infringed. Selected from Medium There is no doubt that Python is one of the most popular programming languages today. For many beginners who have never been involved in computer programming, mastering Python seems like … Read more