183 karma · joined July 12, 2014
We removed benchmarks from the docs completely when the rule of "only show benchmarks with comparatively popular or more popular libraries" no longer made sense, and maintaining benchmarks with many hobby packages was obviously going to become burdensome.
Please show me a sensible benchmark where your library is faster than pydantic?
I agree unions were wrong in V1, but smart unions helped, and unions are fixed properly in V2.
The argument for Rust: 1. If I'm going to rewrite - why not go the whole hog and do it in rust - and thereby get a 20x improvement, not 2x. 2. By using Rust we can have add more customisation with virtually no performance impact, with Python that's not the case.
Of course we could make Pydantic faster by removing features, but that would be very disappointing for existing user.
As mentioned by other commenters, your comment about "constrained" does not apply.
# add devtools debug to builtins
try:
from devtools import debug
except ImportError:
pass
else:
__builtins__['debug'] = debug
(see https://github.com/samuelcolvin/python-devtools#usage-withou...)This would work with icecream too.
The second advantage of not needing the import is that CI fails if you forget to remove all debug() commands.
https://github.com/samuelcolvin/python-devtools
(install with `pip install devtools`)
It has similar functionality for debugging but has prettier formatting and code highlighting using pygments.
S3 doesn't offer the redirect functionally and you would have to have your aws keys public in the repo.
So not really substitutes.
Dynamic subdomains aren't a problem for this with the smart redirecting logic.
I would argue your case for cloudflare workers being "sketchy" only applies if you're confident you're better at "automate provisioning and configuration" than cloudflare.
In the end you have two choices: run your own hardware and networking, control everything; or, use a "cloud" infrastructure provider and accept you don't really have control.
Once you've given up fundamental control of the hardware networking and OS, I don't really see the advantage of managing provisioning and configuration. I definitely don't see a sensible argument that not doing so is "sketchy".
* UI get's intertwined with logic and DB access * monolithic applications * UI developers have to have access to the full server side application
I guess overall I wasn't suggesting this approach as an alternative to traditional django-eske apps, but rather to CRA-eske single page app platforms.
My number one aim with this was for the code to be kept in a simple text file precisely so things like linters worked out of the box.
I guess other languages would in theory be possible but would take almost as much work as the original implementation.
I can understand why they don't want to add a big barrier to entry by requiring that.
Senior frontend developer, react or vue.
Nell is transforming how companies and individuals check, understand and optimise their health by putting positive health data into the hands of every employee. Our industry leading team of scientists have designed unique tests and support programmes, which combine genetic, biomarker and lifestyle data to provide a truly personalised and holistic view of your health.
Nell focus on 'positive' and actionable diet, exercise and lifestyle insights that prevent bad health before it happens. We are driving a revolution in employee engagement and performance, making it easier than ever before for individuals to track and improve their health by engaging with their own bodies.
Be a pivotal part of building our platform to process genetic and biometric data to show people how they can be healthier.
Contact samuel@nell.co.uk
This used the widely used and very stable toml library from rust.
It started because I tried the most popular toml library for python and found significant bugs and poor code quality. Some other libraries had fewer bugs but were very slow. Then I wondered how hard it would be to use the rust library from python via pyo3, and here we are.
We use netlify a lot and don't pay, we'd happily pay if there was a reasonable middle way.
Run time type hint checks in the standard library, small performance impact allowed.
2. Compilation/optimisation using your hints
Like cython but using python's own type hints so you can give the compiler type information without leaving valid python.
Arguably it might deserve a more descriptive title?
In short:
* I started out with a class that substituted environment variables into itself for settings, still in aiohttp-devtools: https://github.com/aio-libs/aiohttp-devtools/blob/master/aio...
* using annotations occurred to me
* it worked
* it was 50% faster than trafaret which I'd been using before
* I added some unit tests, published to pypi and started using it.
__eq__ makes sense, I'll do it when I get round to it
__hash__ would be nice but far from simple to do in a performant way.
__lt__ I'm not sure what this would mean?
__cmp__ no longer exists in python 3.
Because it reuses python's typing system it should have the most pythonic and flexible description of types possible.
I agree about the need for complex validation chains relating to numerous fields, that's already partially possible with pydantic (although not documented). I'll add support for this stuff as well as documentation over the next few weeks.