Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

Anže

@anze3db@fosstodon.org
mastodon 4.7.3
  • Open on fosstodon.org

Writing Python :python:, Django :django: and surfing waves 🏄‍♂️

Projects:
🧑‍💻 https://fedidevs.com find awesome devs across the fediverse
💻 https://github.com/anze3db/django-tui a TUI for all your Django commands

673 Followers
577 Following
30 Posts
Joined November 06, 2022
GitHub:
https://github.com/anze3db
Website:
https://pecar.me
Blog:
https://blog.pecar.me
Twitter:
https://twitter.com/anze3db
Open post
Anže @anze3db@fosstodon.org
· 3mo ago

Today I migrated some Go code to Python and made it 590x FASTER 😎

6
1
0
0
Open post
Anže @anze3db@fosstodon.org
· 2mo ago

Quite a way to start a Monday 😅

3
1
0
0
Open post
Anže @anze3db@fosstodon.org
· 6mo ago

With recent Python supply chain attacks (Trivy/LiteLLM), it’s worth mentioning uv’s `exclude-newer = "x days"` config.

It forces uv to only installs packages published more than x days ago, reducing risks since problematic packages should be yanked by then.

https://docs.astral.sh/uv/reference/settings/#exclude-newer

docs.astral.sh
16
0
9
0
Open post
Anže @anze3db@fosstodon.org
· 2mo ago

I asked Claude to come up with writing guidelines based on my blog posts:

> A few things I deliberately did not encode as guidelines: the frequent typos (characteristic of your fast publishing cadence)

88 blog post in 14 years is not fast publishing cadence 😅

3
1
0
0
Open post
Anže @anze3db@fosstodon.org
· 2mo ago

My dog kept me in Zone 2 for 3kms. Then I had to drop him off and immediately made bad decisions. 💛

2
1
0
0
Open post
Anže @anze3db@fosstodon.org
· 5mo ago

With all the supply chain attacks going around, we have to be very careful about how we update our dependencies. I've written a full blog post about it, but here is the TLDR:

1. Pin to hashes, not just versions
2. Automate the updates
3. Use dependency cooldowns

https://blog.pecar.me/how-to-safely-update-your-dependencies/

blog.pecar.me
8
1
5
0
Open post
Anže @anze3db@fosstodon.org
· 5mo ago

Everyone’s favorite web framework is now also in the gelato business 🤤

7
1
0
0
Open post
Anže @anze3db@fosstodon.org
· 2mo ago

We benchmarked 15 models for triaging vulnerabilities.

* Kimi K3 came out on top but marked a true positive as a false positive ☠️
* Opus 5 refused to give a verdict on 11 vulnerabilities
* Sonnet 5 and Luna outperformed Terra and Sol

Full post 👇
https://www.fencer.dev/blog/llm-triage-sast-false-positives

fencer.dev
1
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 6mo ago

I wrote a blog post about some of the options for adding type checking to your Django project!

Historically, Django projects have been tough to type-check, but the future feels bright, especially if PEP 827 gets accepted!

https://blog.pecar.me/typing-your-django-project-in-2026/

Typing Your Django Project in 2026
Anže

Typing Your Django Project in 2026

The first version of Django was released about 10 years before Python standardized its type hints syntax. Because of this it’s not surprising that getting type hints to work in your Django project is not going to be trivial. django-stubs with mypy If you want your Django codebase to be type checked then django-stubs is the go to package to use. It ships both type-stubs for most of Django’s public APIs as well as a mypy plugin that fills in the typing information for all the dynamic black magic t

5
3
3
0
Open post
Anže @anze3db@fosstodon.org
· 6mo ago

I wrote a post on how we tracked down slow imports in our Django app, fixed them by making imports lazy, and added a lint check to prevent regressions.

Now I’m waiting for Python 3.15 to make all of this easier! 🚀

https://blog.pecar.me/speeding-up-django-startup-times-with-lazy-imports/

blog.pecar.me
4
0
3
0
Open post
Anže @anze3db@fosstodon.org
· 3mo ago

We reviewed 4,978 mypy runs in our Django app:

• 4,731 green
• 246 failed

Of the 246 failures:
• 173 false positives
• 73 real issues
• 39 caught only by mypy and no other check!

Some noise, but it prevented real bugs from reaching production. 🎉

1
1
0
0
Open post
Anže @anze3db@fosstodon.org
· 3mo ago

After 9 meetups full of talks, lightning talks, and even lightning turtles, it's time for the Python Lisbon Meetup to take it easy.

Join us at Linha d'Água on Thursday to relax and enjoy the summer in Lisbon with Python friends 🐢

https://www.meetup.com/python-lisbon-meetup/events/315420890/

meetup.com
1
0
1
0
Open post
Anže @anze3db@fosstodon.org
· 6mo ago

Can't wait for lazy imports in Python 3.15! I spent a bunch of time and tokens over the weekend inlining heavy imports so that they don't get loaded during initial start of a Django app.

The `https://manage.py check` command is now 3.8x faster (9.45s down to 2.48s).

manage.py
3
4
1
0
Open post
Anže @anze3db@fosstodon.org
· 4mo ago

A bug that survived 15 years of upgrades.

One of my servers lost DNS after every reboot. ping 8.8.8.8 worked; ping https://google.com didn't resolve. I'd been "fixing" it by hand-editing /etc/resolv.conf, which, of course, was reset on the next boot. 🙈

Turned out to be a config from 2010. I finally debugged it properly with Claude.

https://blog.pecar.me/the-15-year-old-iptables-rule-that-broke-my-dns

google.com
1
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 10mo ago

I've finished #adventofcode 2025 and this is the first year that I managed to get all solutions under 100ms ⚡

All but two are under 10ms. Not bad for the slowest popular language out there 🐍, although I did have to use numpy a few times.

fosstodon.org
5
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 4mo ago
Replying to
@erwinrossen@mas.to good point. I think the cooldown period works for regular updates but not for security updates. If you are impacted by a security vuln you should upgrade immediately. That's not something you can easily automate though... What you can do is set a lower cooldown period for packages you trust more. E.g. we have a general 3 day cooldown for all packages but 1 day for Django so that we bring in security updates the same week. We would patch immediately if the CVE was impacting us.
1
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 6mo ago

Another Python Lisbon Meetup in the books! Looking forward to the next one on May 7 👀

2
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 6mo ago

I'll be giving a talk about lazy imports at the next Python Lisbon Meetup!

See you there? 😀

https://www.meetup.com/python-lisbon-meetup/events/313903112/?eventOrigin=home_next_event_you_are_attending

#07 - PyLM Meetup at Técnico 🎓🐍, Thu, Apr 2, 2026, 7:00 PM   | Meetup
Meetup

#07 - PyLM Meetup at Técnico 🎓🐍, Thu, Apr 2, 2026, 7:00 PM | Meetup

**Agenda:** * 25-minute talk: **Speed Up Your Startup Times with Lazy Imports** by [Anže Pečar](https://pecar.me/) * One or more lightning talks ⚡ * Socializing! **Join t

2
0
1
0
Open post
Anže @anze3db@fosstodon.org
· 4mo ago

Make sure to always reuse your botoclients. Initializing a fresh one on each task has A LOT of overhead!

1
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 9mo ago

I wrote a blog post about this year's Advent of Code. I had a blast and I am already looking forward to 2026!

* All my Python solutions were under 1s using pure Python and 100ms with a little help from mypy/scipy
• The AoC community is the best ❤️

https://blog.pecar.me/advent-of-code-2025

blog.pecar.me
2
1
1
0
Open post
Anže @anze3db@fosstodon.org
· 6mo ago
Replying to
@jonathanbiemond yes, lazy imports are used heavily in larger web applications. Although they are a double edged sword becasue they can offload slow imports into the request/response cycle. So in prod you usually have to then "warm up" the process before it starts serving requests. In our case, most of those heavy imports are used by celery tasks so nothing to really no need to import them when starting the web server.
1
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 6mo ago
Replying to
@jack I agree. I would even go as far and say that imports should have been lazy by default. But having the ability to opt into lazy imports by not needing to move imports into functions is going to be a great addition!
1
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 7mo ago

Like pretty much everyone with a static blog site in the last 6 months, I asked Claude to migrate it to a different static site generator.

Here's a blog post about it, along with some of my general thoughts on agentic code.

https://blog.pecar.me/agentic-adventures/

blog.pecar.me
1
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 7mo ago
Replying to
See you on Mar 5 @ 19:00 at IST, Pavilhão de Matemática, room 3.10! Check out our website for more info on how to join our community! https://python-lisbon-meetup.github.io/
python-lisbon-meetup.github.io
0
0
1
0
Open post
Anže @anze3db@fosstodon.org
· 9mo ago

New board!

0
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 9mo ago
Replying to
@goncalomb Nice! I really like your solution for day 7. Very clean!
0
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 4mo ago

The Claude usage page is very confusing. Since Sonnet has a separate bar I thought I'd be able to switch to it after I max out Opus, but nope.

Of course this all makes sense if you actually read the tooltip/labels but who does that today anyway? 😅

0
1
0
0
Open post
Anže @anze3db@fosstodon.org
· 4mo ago

Oh, I didn’t know GitHub doesn’t have pagination in the Commits tab of a pull request. 😅

0
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 5mo ago
Replying to
@trey@indieweb.social @stuartm@fosstodon.org I haven't heard it until now but out of the box it seems to have the same limitations as pyright, ty, pyrefly that I describe in the blog post. With zuban I'm seeing over 7k type errors in my codebase where mypy + django-stubs has 0. I'll play around a bit more with it when I have more time, but I think the general rule of the blog post still stands: You either choose completeness with mypy+django-stubs or you choose speed but then have to deal with attr-defined errors.
0
1
0
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 22:30:12 UTC