
Daniel Okafor
Python and Django integrations for sthan.io
Daniel writes the Python track of the sthan.io blog: how to call the address APIs from plain Python, from Flask, and from Django, with code you can paste into a real project.
Each article takes one job (verify an address, split it into fields, or suggest it while someone types) and walks it from the first request to the code that decides what your app does with the answer.
- 8 articles
- 85 minutes of reading
- Python 3.8+ and Django 3.2+
- Latest: Oct 16, 2026
What Daniel covers
Pick the job and the framework. Every filled cell is one article.
| Job | Plain Python / Flask | Django |
|---|---|---|
| Check an address is deliverable | Verify US addresses in Python requests client, Flask submit handler, a rule for every DPV outcome | Verify US addresses in Django service module, a view that accepts, warns or blocks |
| Split an address into fields | Parse US addresses in Python a map from every component to a database column | Parse US addresses in Django service, view, and a backfill management command |
| Suggest addresses as people type | Address autocomplete with Python SthanClient class and a Flask integration | Address autocomplete in Django server-side proxy view and a debounced input |
| All the APIs in one guide | Integrate address APIs in Python requests and aiohttp async, error handling, production setup | No article yet |
Where to start
A reading order for someone adding address checks to a Python app for the first time.
-
Start here for the basics every other article assumes: getting a key, the shape of a request, handling errors and rate limits, and keeping credentials out of your code.
-
Then pick the job you came forBad addresses at checkout: Verify in Python, then Verify in Django if that is your stack. A messy address column: Parse in Python, then the Django version for the backfill command. Slow address forms: Autocomplete with Python (Flask), or Autocomplete in Django.
-
Going to productionCome back to the async section of the integration guide when you need to check many addresses at once.
Questions these articles answer
Each question links to the answer inside the article.
Getting started
- How do I verify a US address in Python? Verify in Python
- How do I verify a US address in Django? Verify in Django
- How do I parse a US address in Python? Parse in Python
- How do I add address autocomplete to a Python Flask app? Autocomplete with Python
- Can I use this with Django or FastAPI instead of Flask? Autocomplete with Python
- What Python version is required? Python integration guide
Reading the answer
- What is the difference between Confirmed, ConfirmedPrimaryOnly, NotDeliverable and Unknown? Verify in Python
- Which match mode should I use? Verify in Python
- Does the API return the apartment or unit number separately? Verify in Python
- What components does the address parser return? Parse in Python
- What is the difference between parsing and verifying an address? Parse in Python
Building it properly
- Should I call the API from the browser or the server? Verify in Python
- How do I securely store API credentials in Python? Python integration guide
- How do I handle rate limiting when calling address APIs from Python? Python integration guide
- How do I use async/await for better performance with address APIs? Python integration guide
- How do I handle special characters in addresses? Python integration guide
Volume and cost
- Can I verify addresses in bulk using Python? Python integration guide
- Can I backfill an existing Django table with parsed components? Parse in Django
- How much does the address verification API cost? Verify in Python
- What is the response time for autocomplete requests? Autocomplete with Python
What the code assumes
- Python
- 3.8 or newer (the integration guide also shows 3.10 features)
- Django
- 3.2 or newer (stated in the verification article)
- HTTP libraries
- requests in every article, aiohttp for async in the integration guide
- Web frameworks
- Flask, Django, and notes for FastAPI and Django REST Framework
- Your key
- Read from settings or an environment variable, never from the browser
Related on sthan.io
All articles by Daniel
How to Find Duplicate Customer Addresses
Find duplicate customer addresses by standardizing first. A 50-row test scores exact, normalized, fuzzy and standardized matching, with a Python script.
How to Add Address Autocomplete in Django
Add US address autocomplete to your Django app. Free API, a server-side proxy view, settings config, and a debounced front-end input.
How to Verify US Addresses in Python
Confirm deliverability before you ship. Free API, a requests-based client, a Flask submit handler, and a clear rule for every DPV outcome.
How to Verify US Addresses in Django
Confirm deliverability at form submit. Free API, a requests-based service module, and a view that branches on DPV - accept, warn, or block.
How to Parse US Addresses in Python
Turn freeform address strings into clean, column-ready fields. Free API, a requests-based client, and a map from every component to your database.
How to Parse US Addresses in Django
Split freeform addresses into structured components. Free API, a requests service, a view, and a backfill management command.
How to Add Address Autocomplete with Python
Add US address autocomplete to your Python app in minutes. Free API, production-ready SthanClient class, and Flask integration.
How to Integrate Address APIs in Python: Verification, Autocomplete & Geocoding
Complete Python guide with requests, aiohttp async examples, error handling, and production best practices for address APIs.