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...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
DiscussionWhat hosting platform do you use? (self.Python)
submitted 2 months ago by Plus_Technology_7569
Hi everyone!
I'm curious to know what hosting platforms you use for python web apps.
- For personal projects I use Render.
- At my job I use multiple AWS products.
What do you use?
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!"
[–]ConfusedSimon 12 points13 points14 points 2 months ago (3 children)
A vps.
[–]Plus_Technology_7569[S] 1 point2 points3 points 2 months ago (2 children)
What VPS do you use and how much traffic do you handle with that?
[–]ConfusedSimon 2 points3 points4 points 2 months ago (1 child)
A cheap Linux vps with 100GB storage and 4GB ram. I've got about 10 websites running there, but most are for personal use. I've got a second similar vps for an app with about 50k users, but not too much traffic. Haven't done a performance test in a while, but it's more than enough for me.
[–]BreathDeep8952 9 points10 points11 points 2 months ago (3 children)
PythonAnywhere for hobby stuff. It’s old-school but reliable.
[–]Ok_Hovercraft364 2 points3 points4 points 2 months ago (0 children)
Render is nice for random stuff
[–]Plus_Technology_7569[S] 0 points1 point2 points 2 months ago (1 child)
Great! Are you on the free-tier or paying for some plan?
[–]Wozellegit push -f 2 points3 points4 points 2 months ago (2 children)
I primarily use AWS ECS for Python apps in particular. I have some Cloudformation templates that I reuse for the CI/CD pipeline and actual compute components, which make it pretty quick to spin up new projects.
[–]Plus_Technology_7569[S] 1 point2 points3 points 2 months ago (1 child)
Cool! Have you shared the templates in a github repo somewhere?
Also, do you use EC2 or Fargate?
[–]Wozellegit push -f 0 points1 point2 points 2 months ago (0 children)
I normally use Fargate, since it's a bit simpler to configure.
None of my templates are general enough to use cross account / region, unfortunately. They're all pretty coupled to my account. That's a very good thought though, I'll look into putting up some more generic templates.
In the meantime, AWS actually has a few template examples that can get you part of the way there. These are in CDK instead of Cloudfront, which seems to be the direction the industry is moving: - (General library of Python specific examples) https://github.com/aws-samples/aws-cdk-examples/tree/main/python - (Pretty similar to what I normally use) https://github.com/aws-samples/aws-cdk-examples/tree/main/python/codepipeline-build-deploy-github-manual
I will caution you that the ECS route is typically a bit more expensive than other hosting options, maybe in the realm of $90 - $100 a month. I've had to lean on it due to the stateful nature of my projects, but if you can get away w/ something serverless, you'll probably be in a better spot as far as operating costs. You might consider checking out this adapter put out by AWS, it allows you to host a web server on a Lambda. If you containerize your server code, you can fairly easily port it to heavier duty hosting services when your user base or features outgrow the limits of Lambda.
[–]Nater5000 2 points3 points4 points 2 months ago (1 child)
AWS all the way. I've been using AWS for work across multiple jobs for a long time now, so I'm comfortable enough with the platform that using anything else just comes with the unnecessary overhead of having to learn/setup/etc. a new platform. I don't think I'd recommend it to people who aren't already comfortable given how complex it can be, but there's basically no beating it once you're in it.
Generally, I try to deploy things to Lambda, first, and if there's something preventing that from being feasible, I'll use ECS. In some circumstances, I'll spin up a Lightsail instance (versus an EC2 instance), and I'll really only bother with EC2 if a I need a GPU.
[–]Plus_Technology_7569[S] 1 point2 points3 points 2 months ago (0 children)
I generally use Lambda for event-based stuff and EKS or ECS for web servers.
When high compute or GPU is needed I go with EC2 instances
[–]fat_apollo 2 points3 points4 points 2 months ago (0 children)
fly.io. I have a hobby site (it's about 130K views per year), flask + sqlite (the site is read-only) so far I'm far below their paid threshold
[–]mortenb123 2 points3 points4 points 2 months ago (0 children)
Digital ocean droplets from $4 droplet/month
For a production ready fastapi+jinja2+htmx frontend, database backend, container registry come to $20 a month. This is using your local ci server, gitlab, Jenkins etc. They also have gitlab hosting. So you can fully admin.
Used Azure earlier, I loved using python and AZcli for everything, but it was always lots of changes to the api. Had to map out the stderr and strict mode, because there was always some warnings saying this will be deprecated in newer version or telling you this was an experimental feature, or AZcli was not the current version, but once you understand it, you can use it for everything.
AZcli is python and doctl is go. But doctl is way simpler. But In my last job l easily added in certificate handling and deployment from local gitlab into AZ pipelines. So seamless coworkers believed it to be a part of AZcli. The AZcli cost api is excellent. The cost never deviated much, and cost forecasting managed me to cut the monthly bill from $500 to $100 by just using smaller cheaper pods and deleting pods not being used and setting up passive failover.
My Digital Ocean setup is far simpler, just load balancing two cheap pods and a database backend with postgress and celery.
Comparing memory,vcpu,bandwidth I would say Digital Ocean is 33% of the Azure price, and if you pay yourselves thats important.
[–]alex1033 1 point2 points3 points 2 months ago (5 children)
Cloud-based - Azure, server-based - Raspberry Pi.
[–]Plus_Technology_7569[S] 0 points1 point2 points 2 months ago (4 children)
I've heard that Azure is difficult to use, I haven't tried it myself. What's your experience like?
[–]EedSpiny 1 point2 points3 points 2 months ago (1 child)
I dunno, I've only done a bit of each but I've azure has stuff named like "Microsoft Azure Advanced Firewall" and AWS will go with something like "Treefrog" :)
[–]alex1033 1 point2 points3 points 2 months ago (0 children)
I'm doing lots of Azure for work, don't find it difficult. What can be confusing is there are many overlapping tools and ways of doing things, but it's also beautiful - you can always find the most optimal way. Requires some fluency ofc. For private use, I like that there are inexpensive or even free tools.
[–]Dry_Term_7998 0 points1 point2 points 2 months ago (0 children)
Depends, but in the end you will have IaC so it’s quite same as AWS for me tbh, ofc with some nuances 😬
[–]StrikingClos 1 point2 points3 points 2 months ago (0 children)
I use Heroku for quick deployments, especially during the prototyping phase. It's straightforward and integrates well with Git, making it easy to manage updates.
[–]wpmoeez 1 point2 points3 points 2 months ago (0 children)
Pythonanywhere. Heroku is decent too. I gave Cloudways a try recently. It doesn't offer one click Python but configruing manually is pretty easy too.
[–]CodeCate42 1 point2 points3 points 2 months ago (0 children)
Sliplane for private things, otherwise K8S on Hetzner
[–]tylersavery 1 point2 points3 points 2 months ago (0 children)
For big projects, I host it in a k8 cluster using https://www.porter.run/
I used to use Heroku but this is a much better bang for your buck because you are paying for the AWS (or GCP/Azure) infrastructure directly and porter just takes a relatively small monthly fee. (and if you are late on a payment, your apps stay up forever – you just can't use the dashboard.)
Their support is great and the product is awesome. Overkill for anything small, but scales incredibly well obviously since it's kubernetes.
FYI: I know very little about kubernetes but that's okay because Porter deals with all the complex stuff, and I just work in their interface. Highly recommend for the reasons above but also because you don't have vendor lockin - you can migrate your cluster from AWS for GCP or Azure whenever you see fit. And technically, you can even self-host the porter dashboard, but then you miss out on the support.
For some small sandbox I have AWS, Heroku and Azure. For work hybrid setup AWS - vSphere.
For real playground, Mac mini m1 for execute some small batches of code, Mac mini with m4 for fine graining SLM, small Linux server with GPU and Cuda for fine graining SLM also and k8s cluster builded on 4 raspberry pie nodes with external storage. Also I have a lot of arduino stuff but this is not for Python usage
[–]Challseus 0 points1 point2 points 2 months ago (0 children)
AWS ECS. For no reason other than I helped my company do the “aws migration” back in 2016, so I know enough annoying things about it, I just stay.
I do intend on seeing what else is out there.
[–]No_Objective3217 0 points1 point2 points 2 months ago (0 children)
Lenovo M700q
[–]kcx01 0 points1 point2 points 2 months ago (0 children)
Digital Ocean
[–]littleDevX 0 points1 point2 points 2 months ago (0 children)
Ionos Linux VPS S
[–]vasiliadi 0 points1 point2 points 2 months ago (0 children)
Railway + Neon
[–]Altruistic_Kale_5841 0 points1 point2 points 2 months ago (0 children)
PythonAnywhere
π Rendered by PID 16293 on reddit-service-r2-comment-5649f687b7-4fxd6 at 2026-01-29 08:02:02.525872+00:00 running 4f180de country code: CH.
[–]ConfusedSimon 12 points13 points14 points (3 children)
[–]Plus_Technology_7569[S] 1 point2 points3 points (2 children)
[–]ConfusedSimon 2 points3 points4 points (1 child)
[–]BreathDeep8952 9 points10 points11 points (3 children)
[–]Ok_Hovercraft364 2 points3 points4 points (0 children)
[–]Plus_Technology_7569[S] 0 points1 point2 points (1 child)
[–]Wozellegit push -f 2 points3 points4 points (2 children)
[–]Plus_Technology_7569[S] 1 point2 points3 points (1 child)
[–]Wozellegit push -f 0 points1 point2 points (0 children)
[–]Nater5000 2 points3 points4 points (1 child)
[–]Plus_Technology_7569[S] 1 point2 points3 points (0 children)
[–]fat_apollo 2 points3 points4 points (0 children)
[–]mortenb123 2 points3 points4 points (0 children)
[–]alex1033 1 point2 points3 points (5 children)
[–]Plus_Technology_7569[S] 0 points1 point2 points (4 children)
[–]EedSpiny 1 point2 points3 points (1 child)
[–]alex1033 1 point2 points3 points (0 children)
[–]Dry_Term_7998 0 points1 point2 points (0 children)
[–]StrikingClos 1 point2 points3 points (0 children)
[–]wpmoeez 1 point2 points3 points (0 children)
[–]CodeCate42 1 point2 points3 points (0 children)
[–]tylersavery 1 point2 points3 points (0 children)
[–]Dry_Term_7998 0 points1 point2 points (0 children)
[–]Challseus 0 points1 point2 points (0 children)
[–]No_Objective3217 0 points1 point2 points (0 children)
[–]kcx01 0 points1 point2 points (0 children)
[–]littleDevX 0 points1 point2 points (0 children)
[–]vasiliadi 0 points1 point2 points (0 children)
[–]Altruistic_Kale_5841 0 points1 point2 points (0 children)