Loading…
Topic
Flask
5 posts about Flask. Every summary links to the original.
- 5 posts
- 3 companies
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
How to Confirm Phone Number Ownership with Lookup Identity Match in Python
The tutorial shows how to use Twilio Lookup Identity Match in Python to confirm that signup information is associated with a phone number and reduce signup fraud. It builds a Flask application that accepts an E.164-formatted number, first name, and last name, then calls the Lookup API with fields="identity_match" and the supplied identity attributes. The response exposes statuses including exact_match, high_partial_match, no_match, and no_data_available; the example accepts a result only when the number is valid and both names are exact or high partial matches. The implementation covers project setup with Flask, twilio, and python-dotenv, environment-based credentials, an intl-tel-input form, and frontend handling for success and failure messages. It also notes that Identity Match can use combinations of name, address, national ID, or date of birth, and points to other Lookup packages such as Line Type Intelligence and SIM swap detection.
How to Approve Real Users and Block Fake Accounts at Sign Up with Lookup and Verify in Python
This Python tutorial builds a signup flow that screens phone numbers for fake accounts while aiming to keep legitimate onboarding smooth. It combines Twilio Lookup’s Line Type Intelligence, optional Line Status, and Identity Match checks before using Twilio Verify to send an OTP and confirm possession of the number. The provided Flask example collects a phone number and first and last names, rejects landlines, nonfixed VoIP, toll-free numbers, and pagers, and accepts Identity Match only when both name fields are exact_match or high_partial_match. The post shows how to configure the project, run it locally, inspect outcomes such as LINE_TYPE_BLOCKED or identity-match failure, and consider pricing because the four API calls have different costs.
Build a Video Chat Application with Python, JavaScript and Twilio Programmable Video
This tutorial builds a browser-based video chat application using Python, Flask, vanilla JavaScript, HTML, CSS, and Twilio Programmable Video. It adds text chat through Twilio Conversations and screen sharing, allowing participation on modern desktop and mobile browsers without installed software. The implementation covers Twilio account and API-key setup, environment variables, a Python virtual environment, client-side event handlers, and ngrok, which exposes the local Flask server through an HTTPS public URL for testing on other devices. The refreshed project targets Flask 3.x, twilio-python 9.x, Twilio Video JS 2.35.x, and Twilio Conversations classic JS 2.x, and the completed flow supports live calls, screen sharing, and text chat. Participants must use unique names because Twilio identifies them by token identity.
Local Speed, Smooth Deploys: Heroku Adds Support for uv
Heroku now natively supports uv, a Rust-written Python package manager presented as a faster alternative to pip for dependency resolution, installation, and virtual-environment management. The post connects this support to recurring problems in modern Python projects, including slow installs, complex dependency trees, version pinning, and tooling that may struggle to keep pace with current standards. It walks through installing uv, running uv init, adding Flask and Gunicorn with uv add, and deploying a basic Flask application using a Procfile, pyproject.toml, uv.lock, and .python-version. Heroku detects the Python app, installs dependencies from these project files, and starts it with gunicorn main:app after a Git push. The stated outcome is faster local development, more consistent environments, reduced onboarding time, fewer flaky builds, and improved pipeline performance, while uv remains relatively new.
Deploying LangChain to Fly.io
Deploying a minimal LangChain application to Fly.io, using Flask, requires a small Python project that accepts a place and asks an OpenAI-backed model for three places to eat there. The example uses LangChain’s OpenAI wrapper, PromptTemplate, temperature 0.9, and a default Berlin value, while Flask routes requests at / or / and renders the model’s split response in HTML. Local setup includes a virtual environment, pinned Flask, gunicorn, langchain, openai, and python-dotenv dependencies, with OPENAI_API_KEY stored in a local .env file; production uses gunicorn rather than Flask’s development server. Fly launch configures the app name, organization, and deployment region, and fly deploy builds and publishes an image before provisioning machines. The article concludes that more complex, user-dependent requests require LangChain agents and tools, such as Google Places API, because language models lack real-time data and internet browsing.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.