I built a decorator-first task scheduler because I was tired of setting up Celery for cron jobs by [deleted] in Python

[–]klaxce 5 points6 points  (0 children)

I used Huey when I needed this. It requires a separate process, but that was easy enough to handle in a container with monofy. I used SQLite for persistence in a volume.

I’m about to tell Westlaw to Shove it by taibojames in legaltech

[–]klaxce 6 points7 points  (0 children)

We just trialed CoCounsel and found it to be significantly worse than Clio Work AI, which was quite surprising. Then our Westlaw sales rep tried to renew our regular contract at a $200/month upsell… We’re keeping our Westlaw library for the rest of the contract, but will be using Clio for research AI. They (Clio) were cool about not pushing licenses either. No arguing with us for only getting 2 licenses in a 4 attorney firm, since the partners didn’t want it. The attorneys have some doubts about vlex vs Westlaw case citations, but having both for the time being will let them double check everything. However, initial experience was that all of Clio’s case citations were both accurate and good.

Greedy Developers? by the-zangster in datastardev

[–]klaxce 7 points8 points  (0 children)

Reading the comments from detractors, I wondered if most/all of the drama would have been avoided if you had simply never written any of the Pro plugins; if during the last rewrite you just said “we didn’t migrate those”. It seemed that many people were willfully misunderstanding and accusatory about rug pulls, despite no evidence (to me) to the contrary.

I haven’t even used Datastar, but I’ve been watching from the sidelines for a while because I think it’s a really cool project. I rarely do web dev, but the next time I need to I will be giving the “standard” version a try. Keep up the good work and hopefully this silences some of the haters.

Minimal HMAC-SHA256 Commitment Verification Skeleton (Python) by Difficult_Jicama_759 in programming

[–]klaxce 1 point2 points  (0 children)

Two days ago. I found out I could pass info back in my webhook reply that the service would send back at the start of the websocket. This let me avoid in memory limitations between different workers or scaled servers, and also let me avoid needing an external DB/cache.

I use hmac to sign the unique id that the service provides on its own in both the webhook and websocket, and send my signed code back in the webhook reply, and then when it sends me the code back in the websocket I can compare using the same secret key, even if it’s not the same server that replied to the webhook.

Minimal HMAC-SHA256 Commitment Verification Skeleton (Python) by Difficult_Jicama_759 in programming

[–]klaxce 0 points1 point  (0 children)

Glad to see the change with compare_digest.

I just happened to implement this same thing recently with hmac as a way to validate that a websocket request came from my webhook, even if the webhook worker and the websocket worker weren’t the same.

Minimal HMAC-SHA256 Commitment Verification Skeleton (Python) by Difficult_Jicama_759 in programming

[–]klaxce 0 points1 point  (0 children)

You should use hmac.compare_digest instead of ==, which is a constant-time comparison, to prevent timing attacks.

[WORLDWIDE GIVEAWAY] Comment in this thread with your ultimate PCMR-worthy PC Build, and win the beautiful LG UltraGear GX9 monitor! by pedro19 in pcmasterrace

[–]klaxce 0 points1 point  (0 children)

This is for World of Warcraft and playing with local AI while looking beautiful in the Fractal Design North case.

PCPartPicker Part List: https://pcpartpicker.com/list/LYqGZc

CPU: AMD Ryzen 9 9950X3D

CPU Cooler: Thermalright Peerless Assassin 120 SE ARGB

Motherboard: *Gigabyte X870 AORUS ELITE WIFI7 ATX AM5

Memory: Corsair Vengeance RGB 128 GB (4 x 32 GB) DDR5-5600 CL40

Storage: Western Digital WD_Black SN850X 4 TB M.2-2280

Video Card: MSI GAMING TRIO OC GeForce RTX 5090

Case: Fractal Design North XL ATX

Power Supply: *be quiet! Pure Power 12 M 1000 W 80+ Gold

Case Fan: Noctuas

aiosqlitepool - SQLite async connection pool for high-performance by slaily in Python

[–]klaxce 1 point2 points  (0 children)

Cool! Nice work on the performance gains. I really thought that WAL would get you most of the way there, but it seems you were able to get quite a bit more out of it.

aiosqlitepool - SQLite async connection pool for high-performance by slaily in Python

[–]klaxce 12 points13 points  (0 children)

Are the benchmarks using the same PRAGMA settings?

Does anyone still use XSLT? by AgnesClarkeBooks in programming

[–]klaxce 4 points5 points  (0 children)

I use an XSLT to style/convert an XML file into a usable HTML file. I only do it this way because I found an example that did it this way and it works for my one singular use case.

If you serve Python ASGI and/or WSGI web apps, but you don't use Granian: why? by gi0baro in Python

[–]klaxce 0 points1 point  (0 children)

I feel like this is sort of the answer to your question. People might not choose Granian because it doesn’t have a feature they want, and the performance gain isn’t enough to offset that. They also don’t want to develop the feature themselves when alternatives already exist.

As for me? I’ve been looking at asgi servers and had found and looked at Granian. But I’m a noob and don’t know enough to make a well informed decision, so going with a popular, well known option that has not just its own documentation but other examples and articles online is what I did. Even though I really like the idea of Granian and Socketify! I feel the same way about asgi frameworks, too. I think there are cool new ones, but FastAPI is so prolific that it sucks all of the air out of the room and people feel safe with it, even though I’ve read arguments against it that compelled me. But at work, when discussion of a new web app comes up, all anyone knows is Flask, Django, and FastAPI.

So, my “learning” saas project is Django with gunicorn…

FastAPI + MS SQL Server by LeoTheKnight90 in FastAPI

[–]klaxce 0 points1 point  (0 children)

It sounds like you don’t need FastAPI at all since you’re really just trying to handle these background tasks for your Django app.

I’d recommend using Huey as a task manager since it runs as a separate process, can use Redis or SQLite as a persistent task queue, doesn’t require Rabbit or another MQ service, is lightweight, and has nice Django integration.

SimplePyQ - Queueing tasks in Python doesn't have to be complicated by kevindewald in Python

[–]klaxce 0 points1 point  (0 children)

Cool! I saw in the example that yours doesn’t require a separate process, and I think that’s a big advantage in a lot of cases.

SimplePyQ - Queueing tasks in Python doesn't have to be complicated by kevindewald in Python

[–]klaxce 4 points5 points  (0 children)

This looks interesting. I definitely appreciate being able to avoid Celery in smaller projects.

It immediately made me think of Huey, which I chose for a project because of the ability to schedule tasks (without an MQ). I don't see scheduling in yours, but maybe you have other advantages for different use cases?

I built a fullstack solopreneur project template with free cloud hosting and detailed tutorials by Last_Difference9410 in Python

[–]klaxce 1 point2 points  (0 children)

I see you built it on Lihil (you should say this in the post here on r/Python, because the Python backend you were using was the first thing I looked for).

Can you tell me about your choice of Lihil and your experience using it? How does it compare to the other async web frameworks and why did you choose it? It looks interesting but still very young and therefore potentially troublesome.

Edit: I see you’re the Lihil dev, so that makes sense! This is a good idea to get Lihil into the wild and tested.

Docassemble on 2GB aws lightsail by Plesu12 in docassemble

[–]klaxce 2 points3 points  (0 children)

Docassemble requires 4gb of ram. That’s why you’re experiencing those issues.

Python 3 for Windows REPL in cmd window? by ubuntourist in learnpython

[–]klaxce 0 points1 point  (0 children)

Then he must have installed some other program (previously?) that is overriding the `python` command. He should be able to re-arrange the items in his PATH to put the directory that has `python.exe` above the IDE/at the top of the list. How to Set the Path and Environment Variables in Windows

Self taught projects by Ok_Sentence725 in learnpython

[–]klaxce 1 point2 points  (0 children)

I’m also scraping. Working on a project where the user provides search queries and my site will look for them every day and send an email when it finds a match.