I want to create a web service in Python. I have almost always used web.py for doing so, but I have read good things about flask. What do you recommend me?
This #SQLAlchemy question has been in my head these past few days, so I finally decided to post it on the official support channels. If by any chance you know the answer, please let me know!
No bullshit. We focus on what's different between both languages and start from what you know as a senior dev. Learn the Python mindset and tooling. Great resource to then be able to learn #Django, #Flask or #FastAPI.
Rewriting parts of a #flask app to use #ctypes to allow me to import #Golang. It’s actually been extremely pleasant. I get most of the speed advantage of Go but I get to still use my favorite framework with flask.
I’m not sure if this is the “best” way to write modern web apps but it has been very fast to write v1, profile it under actual production load, find the problem areas and rewrite.
#Othello front end served by #Apache, written in #JavaScript with #Phaser 3 game engine, back end served with #Flask (soon AWS #Lambda) and written in #Python. There's a lot going on but it sorta works. This proves my idea to offload the processing to a remote back end driving a thin client works.
It plays terribly at the moment, but it's good enough to work on the UX.
I'm building out some routes to get and edit some database objects. These objects are children associated to a parent in a collection.
For the URL, is it better to have a hierarchical address like /parent/<parent_id>/child/<child_id> than to just do /child/<child_id>?
My thinking is yes because I can filter DB objects based on the parent ID and the associations which already exist, but then looking up a child directly is also fast. Thoughts?
The last couple of months I've been working on a little #rss reader that doubles as a (read-only) #mastodon client. The UI is closer to a Mastodon/Twitter feed than an email inbox.
I'm still experimenting with it, and it's missing a bunch of basic stuff, but I did add some cool features already, like an embedded reader mode and a send to #kindle button.
I'm interested in doing some livestream maintainer office hours for Flask and the Pallets ecosystem. Are there any hashtags on Mastodon related to that, where I can follow others doing it and get more reach when I start? #Python#Flask
Any recommendations for any easy to use #Javascript libraries I can use to create charts in a #Python#Flask app? I need to be able to plot multiple time series, with different sample times. Things like Charts.js and Frappe only seem to support having shared X axis points (labels). I'm now wondering if D3.js is my only option, but it looks like a monster. It's for this project: https://www.henryleach.com/2023/03/home-sensor-network-part-1-the-plan/
I've been working on a small tool that makes it a lot easier to create tracklists for albums on @wikidata!
Essentially, you pick an album to edit, input your tracklist (with optional duration and ISRC), plus some other optional metadata like the producer, recording location, and performer, and then it'll automatically create the track items and tracklist statement for you.
Today's Python hot take: FastAPI is one of those sarcastic names, like Greenland (which isn't very green). The devs' claims of it being fast is some kind of joke. Because it's not actually very fast at all. A replacement package that's actually fast is Litestar, which also seems generally more wholesome.
Isn't the quite new? I only recently heard of it while searching for asyncio #Redis caching and using async Requests and #BeautifulSoup. Now, I see it everywhere.
Personally, I am am busy investigating some backend and API, and I have just been considering using #Go instead of #Python and #Flask
Love to see +187 -3027 as the change summary. This probably represents another speedup for Werkzeug on top of the 35% observed when everything was adjusted internally for 2.3, since all the deprecation checks are no longer done for each request https://github.com/pallets/werkzeug/pull/2768#Python#Werkzeug#Flask
Werkzeug 3.0 will remove our modified, difficult to maintain copy of the built-in urllib.parse module. It also removes support for bytes where strings are expected, an artifact of Python 2+3 compat. These are huge changes, there's deprecation warnings all over the place in 2.3. And yet we've received no comments on the warnings yet. Remember to treat warnings as errors during testing! I'll probably make a prerealease as well. #Python#Werkzeug#Flask
I've now ported #Maerstanas from a CLI #Python thing to #Pygame to #Flask...and now to #Django. All because I want to create a social asynchronous web app for a strategy board game I invented. Talk about scratching an itch.
Getting the Pallets Community Ecosystem set up. https://github.com/pallets-eco Similar to Jazzband https://jazzband.co, this is a place to collect important Pallets/Flask/Click/etc extensions and allow community write access and easier publishing workflows. Still figuring it out. If you are interested in getting a project in, or contributing to a project, please reach out on the Pallets Discord server https://discord.gg/pallets. #Python#Pallets#Flask#Click
Recently watched this video by #ThePrimeTime on #Youtube, and his hot-take 🔥 was that they were using #Ruby, and half of their pain was caused by this.
I have no experience with Ruby at all and most probably won't even recognize it if I were to read it.
If Ruby is such a bottleneck and inefficient, why did #Mastodon :mastodon: use Ruby for its implementation?
I know Ruby is often praised for servers and backends, especially APIs, but we have many solutions for this in #Python :python: , which I wouldn't recommend, but #Go :golang: and #Rust.
Does anyone have opinions or sources for this statement?
I like #Rust and #Go :golang: for backends. For simple personal prohects, #Python :python: and #Flask are great. The development process is fast, I can push it out under hours. But I wouldn't use it for mission critical systems!
I thought I knew #Python until I read this. The plugins' functionality was quite interesting, and I have a few ideas about what I can use it for. One thing I miss in Python that I often use is in #CPP are true abstract classes, overloading, and extension of classes. With tools like this, you can achieve similar functionality.
My first introduction to plugins was with #Octoprint, which really made its plugin system very easy. It is such a great project to develop plugins for. They did it with #Flask. I've been wondering if I should use something similar.
The mixins make it quite easy to extend specific functionalities on events. It was really cool how they did it. #Octoprint is built with #Flask and uses the blueprint system of Flask.
second flask project, and my feeling is that by the time you need multiple files, which happens sooner than you think, you may as well have used django for the structure and nicer orm
@hynek I know you have some snippets about using #structlog with #Flask on the docs, bu do you know of a sample repo with something like "this is a sample Flask app with everything set up to show basic request information on stdout and/or a log file using structlog"? Extra points if it has configuration for #gunicorn.