Python vs PHP: Why are there so few (free) shared hosting offers?

Real Python · Beginner ·🛠️ AI Tools & Apps ·8y ago

Key Takeaways

The video discusses the differences in hosting options for Python and PHP, highlighting the advantages of using platform-as-a-service providers like Heroku, Microsoft Azure, and Google Cloud Engine for Python applications.

Full Transcript

hey guys I got this Python hosting question in my inbox and in this video I want to share some of my thoughts so here's the question why are there so few Python shared free hosting offers compared to PHP this is a really interesting question because I never really thought of it that way you know by by comparison I never really felt there was less hosting or shared hosting offers for Python compared to PHP and in every occurred to me I think if you specifically look for shared hosting or you know the kind of hosting or just FTP up a bunch of files and then you have your web application running that way then I think this is an accurate observation though right like this kind of hosting setup it exists much more for PHP and not so much for Python I think there's actually a ton of free Python hosting out there it just follows a different methodology than what most PHP hosts offer so so let me explain what I'm what I'm saying here right typically when you host a Python application what I personally do and what I see most other people do is that you would just host it on for example a platform as-a-service kind of offering like Heroku or the Microsoft Azure cloud or the Google cloud engine or something like that where you can just you know bundle up your application hosted in the cloud somewhere and it'll run if it's a Python web application the the hosting model where you get FTP credentials and you upload a file and it just runs through CGI on a server and you have some kind of web app website running there like it's often done with PHP that isn't really that popular in the Python world and I could totally go on a rant here and say some very bad things about PHP and maybe how it has like a less professional developer audience but I'm not gonna do that I mean fundamentally we all just want to get stuff done and we use whatever means whatever means and whatever tools we have at hand right whether that's PHP or Python so I don't want to be all smug about it but on the other hand I think there's a certain truth to that so you know takes a little bit more skill and more experience to use these platform as a service providers but they actually offer you a ton of advantages right by comparison if you need to upload your your Python file or PHP file just through an FTP server then that doesn't really give you scalable deployments and it doesn't really help you you know maintain that code base and and deploy it in any kind of reproducible fashion with something like Heroku you can just deploy straight from your git repository you can rollback deploys you can do these deploys atomically and you can do them seamlessly so that the new version of your app comes up as the old version goes down and there's kind of a seamless deploy process and and you can do it's very hard to do that with the kind of FTP upload run a CGI script kind of hosting so well - to answer this question or maybe to give some some advice on how to do your Python web application hosting well I think you have to just pick up these skills you know figure out how to package up your application so you can deploy to Heroku and then do that it's actually a great thing for you and you don't want to do the classical you know upload an FTP file to some server and run that on shared hosting I've been my mind that is a bad development or bad deployment practice and if you can get away from that then that's actually a great thing and if you few the if you view the world from that perspective or the hosting world from that perspective you'll see that there's a ton of options for Python hosting out there and the reason for that is that usually these hosting options they're not advertised as Python hosting specifically it's just a cloud provider a platform as a service where you can take your programs and run them on there whatever the programming language and Python is just a very popular target in that respect all right if this video was helpful dand click the like and subscribe button and maybe post your own question in the comment below and I'll try and tackle it in a future video

Original Description

https://dbader.org/python-tricks ► Free tips for writing more Pythonic code "Why are there so few Python shared (free) hosting offers compared to PHP?" -- Interesting question I got from a web developer who's also a dbader.org newsletter reader. In this video I'll share some of my thoughts on the matter. Whether you're a PHP developer looking to learn Python, or a Python developer looking at PHP hosting options with envy I'll explain what's going on in the hosting world and how this perceived difference in the number of hosting options comes down to differences in advertising and the preferences of PHP vs Python developers. Where do you host your Python web applications? Leave a comment below and let me know! FREE COURSE – "5 Thoughts on Mastering Python" https://dbader.org/python-mastery SUBSCRIBE TO THIS CHANNEL: https://dbader.org/youtube * * * ► Python Developer MUGS, T-SHIRTS & MORE: https://nerdlettering.com ► PythonistaCafe – A peer-to-peer learning community for Python developers: https://www.pythonistacafe.com FREE Python Coding Tutorials & News: » Python Tutorials: https://dbader.org » Python News on Twitter: https://twitter.com/@dbader_org » Weekly Tips for Pythonistas: https://dbader.org/newsletter » Subscribe to this channel: https://dbader.org/youtube
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Real Python · Real Python · 0 of 60

← Previous Next →
1 A better Python REPL – bpython vs python interpreter
A better Python REPL – bpython vs python interpreter
Real Python
2 Introducing large-type.com – A Utility Website
Introducing large-type.com – A Utility Website
Real Python
3 Reading Hacker News Without Wasting Tons of Time
Reading Hacker News Without Wasting Tons of Time
Real Python
4 Forward References and Python 3 Type Hints
Forward References and Python 3 Type Hints
Real Python
5 Using Sublime Text as your Git Editor
Using Sublime Text as your Git Editor
Real Python
6 Python Code Linting and Auto-Complete for Sublime Text
Python Code Linting and Auto-Complete for Sublime Text
Real Python
7 Make your Python Code More Readable with Custom Exceptions
Make your Python Code More Readable with Custom Exceptions
Real Python
8 Write Better Tests with Sublime Text's Split Layout Feature
Write Better Tests with Sublime Text's Split Layout Feature
Real Python
9 How to Use Sublime Text from the Command Line
How to Use Sublime Text from the Command Line
Real Python
10 Rename Variables with Multiple Selection in Sublime Text
Rename Variables with Multiple Selection in Sublime Text
Real Python
11 Sublime Text Settings for Writing PEP 8 Python
Sublime Text Settings for Writing PEP 8 Python
Real Python
12 Write Cleaner Python with Sublime Text's Indent Guides
Write Cleaner Python with Sublime Text's Indent Guides
Real Python
13 Sublime Text Whitespace Settings for Python Development
Sublime Text Whitespace Settings for Python Development
Real Python
14 Function Argument Unpacking in Python
Function Argument Unpacking in Python
Real Python
15 Python Code Review: Debugging and Refactoring "Conway's Game of Life" +  Automated Tests
Python Code Review: Debugging and Refactoring "Conway's Game of Life" + Automated Tests
Real Python
16 Using "get()" to Return a Default Value from a Python Dict
Using "get()" to Return a Default Value from a Python Dict
Real Python
17 A Python Shorthand for Swapping Two Variables
A Python Shorthand for Swapping Two Variables
Real Python
18 Python Code Review: Refactoring a Web Scraper, PEP 8 Style Guide Compliance, requirements.txt
Python Code Review: Refactoring a Web Scraper, PEP 8 Style Guide Compliance, requirements.txt
Real Python
19 Click & Jump to Test Failures from the Command Line (iTerm2)
Click & Jump to Test Failures from the Command Line (iTerm2)
Real Python
20 Setting up Sublime Text for Python Developers
Setting up Sublime Text for Python Developers
Real Python
21 Sublime Text + Python Guide Overview
Sublime Text + Python Guide Overview
Real Python
22 Python Code Review: Adding Pytest Tests to an Existing Python Web Scraper
Python Code Review: Adding Pytest Tests to an Existing Python Web Scraper
Real Python
23 Type-Checking Python Programs With Type Hints and mypy
Type-Checking Python Programs With Type Hints and mypy
Real Python
24 A Shorthand for Merging Dictionaries in Python 3.5+
A Shorthand for Merging Dictionaries in Python 3.5+
Real Python
25 Python Code Review Flask Web Security Tutorial + Virtualenvs, requirements.txt
Python Code Review Flask Web Security Tutorial + Virtualenvs, requirements.txt
Real Python
26 My Python Code Looks Ugly and Confusing – Help!
My Python Code Looks Ugly and Confusing – Help!
Real Python
27 Setting Up a Programmer Portfolio/Developer Blog – How To Get Started
Setting Up a Programmer Portfolio/Developer Blog – How To Get Started
Real Python
28 Do I Need a GitHub/GitLab/Bitbucket Profile as a Developer?
Do I Need a GitHub/GitLab/Bitbucket Profile as a Developer?
Real Python
29 Programmer Portfolio – Example and Walkthrough
Programmer Portfolio – Example and Walkthrough
Real Python
30 How to Get Your 1st Speaking Gig at a Tech Conference
How to Get Your 1st Speaking Gig at a Tech Conference
Real Python
31 How to Build Your Public Speaking Skills as a Developer
How to Build Your Public Speaking Skills as a Developer
Real Python
32 The Object-oriented Version of "Spaghetti Code" is "Lasagna Code" ?!
The Object-oriented Version of "Spaghetti Code" is "Lasagna Code" ?!
Real Python
33 Setting up Sublime Text for Python Developers – Lesson #1
Setting up Sublime Text for Python Developers – Lesson #1
Real Python
34 Cool New Features in Python 3.6
Cool New Features in Python 3.6
Real Python
35 "is" vs "==" in Python – What's the Difference? (And When to Use Each)
"is" vs "==" in Python – What's the Difference? (And When to Use Each)
Real Python
36 Emulating switch/case Statements in Python with Dictionaries
Emulating switch/case Statements in Python with Dictionaries
Real Python
37 Python Function Argument Unpacking Tutorial (* and ** Operators)
Python Function Argument Unpacking Tutorial (* and ** Operators)
Real Python
38 What Code Should I Put On My GitHub/GitLab/BitBucket Profile?
What Code Should I Put On My GitHub/GitLab/BitBucket Profile?
Real Python
39 A Crazy Python Dictionary Expression ?!
A Crazy Python Dictionary Expression ?!
Real Python
40 String Conversion in Python: When to Use __repr__ vs __str__
String Conversion in Python: When to Use __repr__ vs __str__
Real Python
41 Method Types in Python OOP: @classmethod, @staticmethod, and Instance Methods
Method Types in Python OOP: @classmethod, @staticmethod, and Instance Methods
Real Python
42 Optional Arguments in Python With *args and **kwargs
Optional Arguments in Python With *args and **kwargs
Real Python
43 Python Context Managers and the "with" Statement (__enter__ & __exit__)
Python Context Managers and the "with" Statement (__enter__ & __exit__)
Real Python
44 Installing Python Packages with pip and virtualenv / venv
Installing Python Packages with pip and virtualenv / venv
Real Python
45 "For Each" Loops in Python with enumerate() and range()
"For Each" Loops in Python with enumerate() and range()
Real Python
46 Python Code Review: LibreOffice Automation and the Python Standard Library
Python Code Review: LibreOffice Automation and the Python Standard Library
Real Python
47 Managing Python Dependencies With Pip and Virtual Environments – Lesson #1
Managing Python Dependencies With Pip and Virtual Environments – Lesson #1
Real Python
48 Python Tutorial: List Comprehensions Step-By-Step
Python Tutorial: List Comprehensions Step-By-Step
Real Python
49 Leveraging Python's Implicit "return None" Statements
Leveraging Python's Implicit "return None" Statements
Real Python
50 What's the meaning of underscores (_ & __) in Python variable names?
What's the meaning of underscores (_ & __) in Python variable names?
Real Python
51 Python Data Structures: Sets, Frozensets, and Multisets (Bags)
Python Data Structures: Sets, Frozensets, and Multisets (Bags)
Real Python
52 Writing automated tests for Python command-line apps and scripts
Writing automated tests for Python command-line apps and scripts
Real Python
53 How to find great Python packages on PyPI, the Python Package Repository
How to find great Python packages on PyPI, the Python Package Repository
Real Python
54 Immutable vs Mutable Objects in Python
Immutable vs Mutable Objects in Python
Real Python
55 PyPI vs Warehouse, the Next-Generation Python Package Repository
PyPI vs Warehouse, the Next-Generation Python Package Repository
Real Python
56 pep8.org — The Prettiest Way to View the PEP 8 Python Style Guide
pep8.org — The Prettiest Way to View the PEP 8 Python Style Guide
Real Python
57 My Experience at PyCon 2017 in Portland
My Experience at PyCon 2017 in Portland
Real Python
58 Pylint Tutorial – How to Write Clean Python
Pylint Tutorial – How to Write Clean Python
Real Python
59 "Reverse a List in Python" Tutorial: Three Methods & How-to Demos
"Reverse a List in Python" Tutorial: Three Methods & How-to Demos
Real Python
60 Python Refactoring: "while True" Infinite Loops & The "input" Function
Python Refactoring: "while True" Infinite Loops & The "input" Function
Real Python

The video explains why there are fewer shared hosting options for Python compared to PHP and highlights the benefits of using platform-as-a-service providers for Python applications. It also provides guidance on how to deploy Python applications to cloud platforms.

Key Takeaways
  1. Research platform-as-a-service providers like Heroku, Microsoft Azure, and Google Cloud Engine
  2. Learn how to package Python applications for deployment
  3. Deploy Python applications to cloud platforms
  4. Use scalable deployment strategies
  5. Utilize reproducible deployment techniques
💡 Using platform-as-a-service providers offers more advantages than traditional shared hosting, including scalable and reproducible deployments.

Related Reads

📰
The Modern Browser Testing Stack: AI, CI, Human Review, and the Cost of Maintenance
Learn how to build a modern browser testing stack using AI, CI, and human review to reduce maintenance costs
Dev.to · Simon Gerber
📰
Build an AI Error Explainer in Python
Learn to build an AI-powered error explainer in Python to turn stack traces into actionable debugging JSON
Dev.to AI
📰
I Built 4 Interactive Engineering Tools You Can Run in Your Browser
Learn how to build interactive engineering tools that run in your browser, making complex concepts more engaging and accessible
Dev.to · Dhananjay kumar Seth
📰
Teaching Smarter with AI: How Teachers Can Save Time, Create Better Lessons, and Personalize…
Learn how AI can help teachers save time, create better lessons, and personalize learning for their students
Medium · AI
Up next
Anyword's Performance Boost AI Integration
Anyword
Watch →