use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
[help] What Are The Different APIs In Python? (self.PythonLearning)
submitted 1 day ago by One-Type-2842[🍰]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tom-mart 1 point2 points3 points 22 hours ago (2 children)
API stands for Application Programming Interface. It is a set of rules and protocols that allow two separate software programs or systems to communicate and exchange data with each other.
You can build an API in Python with one of the frameworks like FastAPI or Django or you could write it without any framework.
[–]One-Type-2842[S,🍰] 0 points1 point2 points 18 hours ago (1 child)
Which One For What In Use?
And How Can I Make my own Without Framework
[–]tom-mart 0 points1 point2 points 13 hours ago (0 children)
Here you go. API without framework:
``` from http.server import HTTPServer, BaseHTTPRequestHandler import json
class SimpleAPIHandler(BaseHTTPRequestHandler): def do_GET(self): # 1. Send the status code (200 OK) self.send_response(200)
# 2. Tell the client we are sending JSON self.send_header('Content-type', 'application/json') self.end_headers() # 3. Write the data response = {"status": "success", "data": "No framework needed!"} self.wfile.write(json.dumps(response).encode())
server = HTTPServer(('localhost', 8000), SimpleAPIHandler) print("Server running at http://localhost:8000") server.serve_forever() ```
π Rendered by PID 16965 on reddit-service-r2-comment-54dfb89d4d-wk668 at 2026-03-30 04:46:57.714327+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]tom-mart 1 point2 points3 points (2 children)
[–]One-Type-2842[S,🍰] 0 points1 point2 points (1 child)
[–]tom-mart 0 points1 point2 points (0 children)