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
35 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
· 2d ago

Python 3.15 has been released 🎉

Grab it while it's fresh 😉

https://www.python.org/downloads/release/python-3150/

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

🐍 Python Lisbon Meetup is tomorrow!

🎤 Talk by @mathsppblog@fosstodon.org
⚡ Lightning talks
🍻 Socializing

📍 IST, Sala Multiusos, Torre Norte (new room, not the Pavilhão de Matemática!)
🕖 Thu, 1 Oct, 19:00

RSVP links below 👇

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

PyCon Portugal continues to be my favorite PyCon. This year it was in Aveiro (a better Venice 😉) and we had a blast!

I enjoyed giving my talk on lazy imports, but the best part was meeting new people and catching up with friends.

Looking forward to it again next year!

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

I had a bit of a heart attack this morning when we noticed that my Grok 4.6 benchmark experiment using Amazon Bedrock would cost $28,044.59 instead of ~$28.00 that I was expecting 😱

2
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. 💛

4
1
0
0
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
2
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

Settings | uv

uv is an extremely fast Python package and project manager, written in Rust.

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
· 1mo ago

One of the many things that I learned at DEF CON a few weeks ago is about Python Class Pollution and how a harmless snippet like the one below can cause a huge issue if an attacker controls it!

1
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/

How to Safely Update Your Dependencies
Anže's Blog

How to Safely Update Your Dependencies

With all the supply chain attacks happening lately (litellm being the most recent example) keeping dependencies up to date without risk has been on my mind. Below is everything I do to keep my personal projects secure, what we do at Fencer to keep our own codebase secure, and what we recommend to the startups we work with. Be hesitant about what you add The best way to reduce the risk of installing a compromised dependency is to avoid relying on it in the first place. Before adding a new depende

8
1
5
0
Open post
Anže @anze3db@fosstodon.org
· 6mo 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

Benchmarking 15 LLMs on SAST false-positive triage
Fencer

Benchmarking 15 LLMs on SAST false-positive triage

We benchmarked 15 LLMs on 142 real security findings to triage SAST false positives. Kimi K3 led on accuracy, with one caveat that matters for security.

1
0
0
0
Open post
Anže @anze3db@fosstodon.org
· 7mo 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/

Speeding Up Django Startup Times with Lazy Imports
Anže's Blog

Speeding Up Django Startup Times with Lazy Imports

At Fancer we are building the security suite for startups. Startups use a lot of SaaS tools and services which means we are building a lot of integrations. Most of these go through API calls but we also try to leverage SDKs to make our lives a little bit easier. The problem we started noticing was that loading all these 3rd party integrations has made our Django app feel very sluggish. While this was noticeable around deployments and starting scans, it hurt the most during local development. It

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/

#10 – PyLM Meetup – Social Get-Together, Thu, Jul 2, 2026, 7:00 PM   | Meetup
Meetup

#10 – PyLM Meetup – Social Get-Together, Thu, Jul 2, 2026, 7:00 PM | Meetup

🇬🇧 After 9 meetups full of talks, lightning talks, and even lightning turtles, it's time to take it easy. Join us at Linha d'Água — the café by the lake in Parque Eduardo

1
0
1
0
Open post
Anže @anze3db@fosstodon.org
· 7mo 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
· 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.

5
0
0
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

Google

Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.

1
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
· 10mo 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

Advent of Code 2025 🎄
Anže's Blog

Advent of Code 2025 🎄

December is the time for Advent of Code, as it has been since 2015, when the first Advent of Code event was published. This year, Advent of Code only had 12 days instead of the usual 25. To me, this was a relief. I always get competitive and then start waking up at 5 am every day to get more points on the leaderboards. I did the exact same thing this year as well, of course, but at least I only did it for 12 days!

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
· 7mo 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

http://blog.pecar.me/jekyll-to-hugo-migration/

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

New board!

0
0
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
· 10mo 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
· 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

Python Lisbon Meetup

Python Lisbon Meetup — a friendly community for Python enthusiasts in Lisbon. We meet monthly to learn, share, and connect.

0
0
1
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
· 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
  • Pricing
  • 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: 01:11:00 UTC