API (Application Programming Interface) is a set of rules and protocols that allows one software application to interact with another.
Example:
A weather app uses a weather API to get temperature data from a server.
How an API Works
-A client application sends a request to an API.
-The API receives the request and sends it to the server.
-The server processes the request.
-The API returns the response to the client.
Purpose of Using OSM APIs
APIs from OpenStreetMap allow your Python web application to:
- Display maps
- Search locations
- Get coordinates
- Find nearby places
- Add or retrieve map data
Main OSM APIs Used
Nominatim API:
Used for Geocoding.
Functions:
Convert address → latitude & longitude
Convert coordinates → address
Overpass API:
Used to query OSM map data.
Functions:
Find hospitals
Find schools
Find restaurants near a location
Example: Get nearby hospitals on the map.
OSM Tile API:
Used to display map tiles.
Libraries used:
Leaflet
OpenLayers
You can build the project directly on your laptop/PC.
Tools:
Visual Studio Code
PyCharm
Technologies used:
Python
Flask
HTML, CSS, JavaScript
Leaflet for maps
Technologies Used in Python Web Apps
Frontend:
HTML
CSS
JavaScript
Backend:
Flask
Django
Database:
MySQL
PostgreSQL
Platforms:
- Local Development Platforms: These are installed on your computer for coding and testing. • Visual Studio Code Most popular code editor Supports Python extensions Easy to run Flask or Django apps • PyCharm Python-focused IDE Good for large Python projects
- Online Coding Platforms: You can create Python web apps without installing software. • Replit Run Python web apps online Good for beginners • GitHub Codespaces Cloud development environment Works with repositories on GitHub
- Web Hosting Platforms : Used to deploy and run your web application online. • Render Easy deployment for Python apps • Heroku Popular platform for Flask and Django apps • PythonAnywhere Specifically designed for Python web applications
PWA
A Progressive Web Application (PWA) is a web app built with web technologies that can work offline, send notifications, and be installed on a device like a mobile app.
Technologies Used in PWA
- HTML
- CSS
- JavaScript
- Service Workers
- Web App Manifest
- These technologies make the web app behave like a mobile application.
Features of PWA
-Works offline or with poor internet
-Can be installed on mobile or desktop
-Fast loading
-Push notifications support
-Responsive design (works on all devices)
Top comments (0)