In the interest of learning new (new-ish I guess since it's not really a new language?) things, I've been working through some introductory guides. It really makes me wish had a built-in template project like "rails new" that creates all the default config settings and files rather than having to build all that from scratch. Unless it has that and I just missed it along the way?

@wxheather Django! docs.djangoproject.com/en/4.1/

I am thinking about writing a backend for my website so I can do some kinda blogging while I am finishing my undergrad.

@brandonb_phy @wxheather came here to say this. I think the most comparable framework in the #Python ecosystem is #django.

#python ~= #ruby
#django ~= #rails

@brandonb_phy Thanks! I've heard of Django but never spent a ton of time trying to use it. Is it mainly built for support web applications or can it be used for python projects that are for non-web purposes?

@wxheather You know I'm not too sure, I think if you just return back data from the controller instead of HTML it can function how you like. I would defer to @mattkram I haven't personally used it before, they might know more.

@brandonb_phy @wxheather unfortunately I don't actually have much #django experience. I did some early tutorials but all my web work has used #flask, #fastapi, and #paneldata.

Django is certainly the most complete web framework that I'm aware of, but the right app framework definitely depends on the use case. If you're doing data apps in python I definitely recommend a look at panel.holoviz.org/ , from some of my colleagues at #anaconda (and community).

@wxheather depends what you’re trying to achieve. Some of the more opinionated web frameworks provide that and there’s a plethora of cookie-cutter projects as well.

Nowadays I’m a big user of poetry and their initialisation of a project will do that for you with tests. Highly recommended if you haven’t come across and just want generic Python development.

python-poetry.org/docs/basic-u

@mentor Thank you! I am thinking I might have to sign up for this year to give these tools a test drive.

@wxheather poetry is the sort of tool I wish existed years ago. Makes life so easy now.

If you want a good, detailed, yet accessible introduction to some of the tools and best practices I’d recommend reading the excellent Hypermodern Python series of articles from a couple of years ago. In some cases might be sledgehammer to crack a nut but some great stuff in there cjolowicz.github.io/posts/hype

@wxheather Don't know if it fits you, but you might be interested in using cookiecutter and some Python template like the following one:

github.com/claws/cookiecutter-

Hope it helps!

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.