attrs
Plausible Analytics
Our great sponsors
attrs | Plausible Analytics | |
---|---|---|
11 | 302 | |
5,065 | 18,213 | |
0.7% | 2.3% | |
9.2 | 9.8 | |
8 days ago | about 13 hours ago | |
Python | Elixir | |
MIT License | GNU Affero General Public License v3.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
attrs
-
Litestar 2.0
Full support for validation and serialisation of attrs classes and msgspec Structs. Where previously only Pydantic models and types where supported, you can now mix and match any of these three libraries. In addition to this, adding support for another modelling library has been greatly simplified with the new plugin architecture
- Ask HN: How can I get better at writing production-level Python?
-
Starlite updates March '22 | 2.0 is coming
Pydantic is by far not the only library of its kind, with prominent members of the same class being attrs, cattrs or even plain dataclasses for some use cases.
-
Data Classification: Does Python still have a need for class without dataclass?
Anything requiring e.g. setattr, getattr, delattr? Without looking far,
https://github.com/python-attrs/attrs/blob/main/src/attr/_ma...
- What new Python features are the most useful for you?
- Why you should use Data Classes in Python
-
Python Built-In Functions to Know
I was looking for an example of using locals() to "fill a data class from kwargs" or something similar to that. The example here doesn't use locals().
That aside, I generally wouldn't use the kwargs approach shown in this example either. I'd use [dataclasses](https://docs.python.org/3/library/dataclasses.html ) or [attrs](https://www.attrs.org/) instead.
-
Building a Micro Business: What Services I Pay For
hynek: developer of attrs
-
Soap and REST at Odds (2017)
I continue to be surprised how easy it can be to consume a SOAP API with the right client libraries. Such as https://docs.python-zeep.org/en/master/ for Python. Now that's not to say it will always work, you can design a terrible API with any mechanism, no SOAP or REST client will help you if the other end has desided to succumb to madness and done something like turn their entire API into just "two endpoints" and driven by the payload content you post to the inbound endpoint, and you have to sit there polling the outbound endpoint with the inbound endpoints response ID because to find out what the eventual response is...
But horror story aside, consuming a decent SOAP endpoint with a good client library can be practically magical.
Between attrs (https://www.attrs.org/), cattrs (https://cattrs.readthedocs.io/), and the aforementioned zeep soap client I've got a serialisation pipeline from soap endpoint into an attrs dataclass with type hints and basic type validation down to a snippet so small it fits right here (type hints removed to minimise size).
from zeep import helpers
-
PEP 661 -- Sentinel Values
attrs has at least two.
Plausible Analytics
-
Plausible as an alternative to Google Analytics
I just swapped out Google Analytics with Plausible for AINIRO.IO. It’s only been a week, but so far I am super jazzed about it. First of all, Plausible doesn’t use cookies, so I can completely drop all cookie disclaimers and popups I had because of GDPR. Second of all, the site scores significantly better on load time. This results in a 10x better user experience for my website visitors, while making sure the website is still 100% conforming to GDPR laws.
-
Simple no bs persistent notepad
No clue what you mean, browser cache might even clear itself without you doing anything manually. This thing makes no sense.
Nowhere ever did it say Tech Demo anywhere, not in the HN headline, not on the page itself. No, thanks. And even as a tech demo, there is nothing impressive going in. It is stores shit to local storage, I guess. Lol, I just looked this up, and it was in Firefox on 2009 already? WHAT? https://developer.mozilla.org/en-US/docs/Web/API/Window/loca... I never used it myself directly, but I remember reading about some API that kind of is the new version of cookies that can store more and better and I think that is it. 2009, I would swear what I think about was newer, maybe I am mixing something up, maybe not.
It has unnecessarily tracking from the comment above, not sure if it even sends all your notes to https://plausible.io, and I do not care. For me, this fails as a tech demo or whatever the fuck It's supposed to be. Sorry to not get all excited about everything posted here. In 2009 it for sure would ;)
-
Using Analytics on My Website
If you already use Posthog, Web Analytics has been in Public Beta for quite some time.[1]
If I remember correctly, CloudFlare Analytics does not need you to register your domain with them. I personally feel keeping domain registration coupled with your DNS provider is not a good idea.
Plausible[2] has an Open Source self-hostable version but is not so updated in sync with their SaaS version.
Umami[3] is another simple, clean one. And, of course, as many have suggested, Matomo is the other well-established one. If you want to avoid maintaining a hosting routine, a lot do the hosting out of the box these days. PikaPods[4] was good when I tried and played around for a while.
1. https://posthog.com/docs/web-analytics
-
Open Source alternatives to tools you Pay for
Plausible - Open Source Alternative to Google Analytics
-
11 Ways to Optimize Your Website
There are many good, lightweight, and open-source alternatives to Google Analytics, such as Plausible, Matomo, Fathom, Simple Analytics, and so on. Many of these options are open-source, and can be self-hosted.
-
Ask HN: What is the least obnoxious way to ask for cookie permissions?
You log the IP address, referrer, user agent and the requested page URL but you don't set a unique cookie to identify the user.
This still gets you plenty of actionable analytics information: where geographically people are located (via GeoIP), what pages are most popular, what platforms (including desktop vs mobile) people are using.
I've been using https://plausible.io for analytics on a bunch of my sites for a couple of years now and I honestly don't miss the extra level of detail I got from cookie-based analytics I've used in the past.
- Ask HN: Is Google Analytics that useful?
-
A Developer's Guide to Blogging
The analytics provider I've gone with is Plausible. Sadly it's not free - about $9 a month - but it's easy to use, lightweight (the script is less than 1kb), and respects privacy, so it's worth a look IMO.
-
Best alternative to GA4 when Google Ads is your most important channel?
Plausible
-
It Took Me a Decade to Find the Perfect Personal Website Stack – Ghost+Fathom
Or you need to use some other static site generator to build the HTML table from JSON.
Something very simple, but yet so difficult.
I liked that it was possible to use SQLite3 in production for Ghost. It worked very well and scales as well since it is mostly read operation, but they are officially dropping support for production and using only MySQL. I guess the one argument was, that sending emails for many subscribers was too much for SQLite.
There is also another good analytics service, without cookies and also fully GDPR compliant: https://plausible.io/
What are some alternatives?
itsdangerous - Safely pass trusted data to untrusted environments and back.
Umami - Umami is a simple, fast, privacy-focused alternative to Google Analytics.
transitions - A lightweight, object-oriented finite state machine implementation in Python with many extensions
Fathom Analytics - Fathom Lite. Simple, privacy-focused website analytics. Built with Golang & Preact.
pluginbase - A simple but flexible plugin system for Python.
GoatCounter - Easy web analytics. No tracking of personal data.
Pychievements - The Python Achievements Framework!
PostHog - 🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
Throttler - 🔀⏳ Easy throttling with asyncio support
ctop - Top-like interface for container metrics
blinker - A fast Python in-process signal/event dispatching system.
pirsch - Pirsch is a drop-in, server-side, no-cookie, and privacy-focused analytics solution for Go.