this post was submitted on 28 Aug 2023
27 points (100.0% liked)
Python
6356 readers
2 users here now
Welcome to the Python community on the programming.dev Lemmy instance!
📅 Events
Past
November 2023
- PyCon Ireland 2023, 11-12th
- PyData Tel Aviv 2023 14th
October 2023
- PyConES Canarias 2023, 6-8th
- DjangoCon US 2023, 16-20th (!django 💬)
July 2023
- PyDelhi Meetup, 2nd
- PyCon Israel, 4-5th
- DFW Pythoneers, 6th
- Django Girls Abraka, 6-7th
- SciPy 2023 10-16th, Austin
- IndyPy, 11th
- Leipzig Python User Group, 11th
- Austin Python, 12th
- EuroPython 2023, 17-23rd
- Austin Python: Evening of Coding, 18th
- PyHEP.dev 2023 - "Python in HEP" Developer's Workshop, 25th
August 2023
- PyLadies Dublin, 15th
- EuroSciPy 2023, 14-18th
September 2023
- PyData Amsterdam, 14-16th
- PyCon UK, 22nd - 25th
🐍 Python project:
- Python
- Documentation
- News & Blog
- Python Planet blog aggregator
💓 Python Community:
- #python IRC for general questions
- #python-dev IRC for CPython developers
- PySlackers Slack channel
- Python Discord server
- Python Weekly newsletters
- Mailing lists
- Forum
✨ Python Ecosystem:
🌌 Fediverse
Communities
- #python on Mastodon
- c/django on programming.dev
- c/pythorhead on lemmy.dbzer0.com
Projects
- Pythörhead: a Python library for interacting with Lemmy
- Plemmy: a Python package for accessing the Lemmy API
- pylemmy pylemmy enables simple access to Lemmy's API with Python
- mastodon.py, a Python wrapper for the Mastodon API
Feeds
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thanks for replying :)
I should have clarified, sorry. I've got some Github sites running, but just using HTML, CSS, and JavaScript. I know they run on a Github page, but I also know that some backend stuff doesn't. I was wondering if Python scripts for the games that Lung described could run on one too.
I've been tinkering with HTML and CSS for a few years, but it's only fairly recently that I've started doing it properly, and added JavaScript. Python may as well be a foreign language for now, so I can't even try something simple to see what works. I've got a book to learn from but I haven't had a chance to go through it yet :)
Thanks for the clarification! Yeah I think you’re right that running python on a github page isn’t possible (at least not straightorward). Replit might be closer to what you’re looking for in that regard. I love it because it handles setting up your programming environment for you and lets you dive right into what you actually want to do (write and run code). Sharing the link to your project lets anyone open it up and run it in their browser!
I'll have a look into it, thanks :)
You should stick to JavaScript for web. Running Python in a GitHub page is technically possible, but I really don't recommend it. Python and JS are very similar languages, right in the same family of single threaded interpreted C-style languages. If you learn one, the other is almost identical, with slightly different syntax
To answer your question, GitHub pages cant run a backend service, no. There's a good chance you don't really need one yet. Your GitHub page can load publicly hosted JavaScript libraries just with a URL, and it can use existing third party services. For example, you could use a free Google Firebase account to enable login/accounts, and never have to build a backend for it yourself
When you do decide to write backends, you can do that in JavaScript too, using Node.js. It's real easy, but there is a lot to know about networking, concurrency, server management, etc. But you can also write Python backends really easily. My favorite language for this is Google's Go
I'm gonna say -1 to the suggestion of replit - never heard of that service and appears to be some AI startup. If you wanna do backend, just head to Google Cloud or Amazon Web Services. Google Cloud is my provider, and they have a lot of great options. For example, you can make a "Cloud Function" which is a type of "serverless" technique - you just write one little blob of code, set up the configuration, and it gets magically executed when conditions are met or a request is made. Then you can skip knowing 99.9% of what goes into making the magic work and just write the code. Or when you want more complete control, you can look at Google Cloud Run for a pretty easy full site/backend system, and Kubernetes for the really advanced modern tech. Google gives out a ton to free computation hours, so you can likely build a full backend without spending anything in cloud run
That's a great answer, thank you :)
Sorry I didn't reply sooner, I managed to miss the notification.
I still get frontend and backend stuff mixed up, but I'm getting there slowly. I need to learn more, especially as I want to be able to add push notifications to a web app I'm working on (opt in only, of course). It's a site and app for a small music festival, so I'm going to try to put in notifications for late changes to the lineup, and maybe reminders for when a chosen artist is due to start. Should hopefully be a fun challenge :)