Is it reasonable to use #Django + #drf , and #Keycloak for authn and authz ? Do I need another dependency like Django #allauth ? I see tutorial authors implementing BaseAuthentication from rest_framework.authentication (eg to plug in a JavaScript frontend). Is that enough to be secure? @adamchainz@adamghill any thoughts or a boost would be a gigantic help! 🙏
@adamchainz@adamghill Clarifying, there's logic elsewhere in the system determining authz with access tokens, I'm just trying to secure the endpoints/ensure that a user is logged in, and maybe have a notion of an admin user down the road. Thank you for any input at all. Sorry for the spam 🙊
Does anyone have a pattern they recommend for running docker (or similar) on macOS, inside GitHub actions? I need to start up something that can receive SSH connections, and then test that the SSH connection works.
I must say, absolute kudos to the developer ❤️ I'm only asking for alternatives to see if there is a pattern that's more platform independent and uses less time (aiming to have a low cost for an open source project)
Package dependency resolution on #python can be so frustrating! I'm running python 3.11 so this dependency should work fine. But poetry refuses to install it:
The current project's supported Python range (>=3.9,<4.0) is not compatible with some of the required packages Python requirement:
textx requires Python >=3.8, <3.13, so it will not be satisfied for Python >=3.13,<4.0
Because textx (4.0.1) requires Python >=3.8, <3.13
and no versions of textx match >4.0.1,<5.0.0, textx is forbidden
@RhetTbull That's fair, and a pain 🫤 On the plus side, if you can solve it, you may inspire the whole Python community 😅 Could a git branching strategy help? I'm imagining a "release/main" branch with locking and a "beta/develop/RC" that's less restrictive, with some clear/minimal CI configuration (automated updates?). Caveat: GitHub actions can be challenging. 🙊😵💫
Is anyone using #pex or wheels that have native components with #rust ? For instance integrating with RustPython or PyO3? If so can you share a project/blog post?
@h4kor In the long run, yes. Thank you! 😊 That's a very cool project, working with graphs is fun.
I should have said in my first toot, I'm looking to call some parts of an existing #python CLI/library from #rust .
I want to build a static binary. I've used #pyoxidizer before successfully, but I'm having trouble creating a single file binary this time around (I guess because of my dependency 'asyncssh' )
@kev I've recommended it (and https://github.com/picocss/pico ) a fair bit. Classless CSS is terribly underrated IMHO ❤️ I think classless goes a very long way to motivating young people, inspiring beginners, and (let's face it) massively helping the backend engineer who just wants a thing that works 😅
This morning during the DjangoCon US 2023 sprints, with Will Vincent we showed his Django Microframework repository based on Carlton Gibson 2018 talk, and then I showed my optimized version. 🤯
@adamchainz@carlton@paulox@djangocon@wsvincent I actually laughed out loud. Well played, all 👏😆 That said, I do support it! Happy to offer some testing, as long as you write the test criteria 😎
In addition to using #mypy , can anyone share any guidance, tooling, or blogs that may help steer a #python application towards the "TypeState" pattern? I'm also curious if there are references comparing the "State" pattern to the "TypeState" pattern (Rust).
I suppose I'm looking specifically for Python comparisons with #rust, e.g. if there were a part 2 for the article here:
I know and ❤️ Paramiko. That said, I'm wondering if anyone can recommend a pure python #SSH client library (without native dependencies). I ask for pure #Python because I'm looking at compiling something for multiple platforms. I'm assuming one must exist. It seems like Nuitka may work with #Paramiko , but I'd love to find something that could work with other compilers & Python implementations.
I haven't been this excited about a new package manager since Mamba. Actually, probably since before Mamba! Go and take a look at Pixi, it sounds like it could be pretty revolutionary 👀 https://prefix.dev/blog/launching_pixi
Note that this will initially be an experiment. As such, the SC is reserving its right to drop the experiment if it becomes too burdensome to support (both in CPython and in the community in general, including lack of uptake). So for all of those who have been asking for the GIL to be removed, this is very much a "put up or shut up" situation for the community to show they support this.
@brettcannon Just replying to say thank you to everyone, and to share my excitement. If there is some narrow (easy to grok) testing task that I can support, I'd be happy to lend a hand. 💚 :python:
@brettcannon Maybe I can play the part of "student" in some discussions. I'm still trying to get my mind around the topic, and like many I feel like the vocabulary can be challenging. I suppose, I'm also wondering if it's important for a layperson to participate?
#Django friends, I'm looking for nice examples of Django app code to mimic. I'll need models and tests, and a reasonable way to configure & install to various sites. If it matters, I prefer Poetry and I've already found @adamghill 's Coltrane and django-fbv 💚 :django: Are there other projects that I should reference? What's an app pattern to follow or anti-pattern to avoid?
I've been meaning to publish this one for a while. It talks about an insidious type of inheritance that has somehow become the defacto design tool in the #Python realm, is easy to spot but quite difficult to fix, and hurts readability as your code grows.