4 ms·
Ask HN: What lesser-known Python libraries do you wish people knew about?
- asicsp 3y agohttps://github.com/WyattBlue/auto-editor https://github.com/WyattBlue/auto-editor - command line application for automatically editing video and audio by analyzing a variety of methods, most notably audio loudness https://github.com/pycompiled/compiled https://github.com/pycompiled/compiled - compiled variants of the Python standard library
- pizza 3y ago- optree - symbex - polars - python-lenses - nbdev
- mattbillenstein 3y agoPerhaps Mako - everything uses Jinja2, but you have to essentially learn a limited DSL when you could just be using Python in templates.
- gardnr 3y agoLink: https://pypi.org/project/Mako/ https://pypi.org/project/Mako/
- jayfk 3y agoI can't recommend django-ninja enough. It's an easy to use, extremely fast, typed API for django. I've found it to be better in almost all aspects when compared to djangorestframework. It's gaining popularity but is still widely unknown. https://github.com/vitalik/django-ninja https://github.com/vitalik/django-ninja
- wanderingmind 3y agoMost people using python for prediction are interested in accuracy and typically use sklearn or NeuralNetwork libraries (TensorFlow, PyTorch). However if you are interested in understanding the data and doing linear models,`statsmodels` is an excellent library. It has a learning curve to interpret results, but that's really something people must use to understand and get a deeper insight into data
- lozenge 3y agoq for debugging where you can't set a breakpoint (eg there's a timeout) Or print debugging where you can't print (eg you're in a pipeline) https://pypi.org/project/q/ https://pypi.org/project/q/ Portion - represent intervals. Use this to describe tax bands, calendar appointments, etc. https://pypi.org/project/portion/ https://pypi.org/project/portion/
- xqb64 3y agoI really like: trio: https://trio.readthedocs.io/en/stable/index.html https://trio.readthedocs.io/en/stable/index.html and a couple of trio-compatible libraries that blend with it nicely: tractor: https://github.com/goodboy/tractor https://github.com/goodboy/tractor trio-parallel: https://trio-parallel.readthedocs.io/en/latest/ https://trio-parallel.readthedocs.io/en/latest/
- antman 3y agohelium, hrequests (for web crawling) scalene profiler pipgrep pycallflow rich ducks,polars,duckdb transitions for fsm dash,perspective smart_open,fsutil,platformdirs environs diskcache datasketch,setsimilaritysearch,more_itertools act (local github actions) verbex (for regexp) keyring ftfy,chardet,unidecode ulid,cyksuid watchdog dradonfly tenacity lox,parsl,dask,ray delegator huey
- ishandotpage 3y agohttps://pypi.org/project/dirtyjson/ https://pypi.org/project/dirtyjson/ Using this one a lot nowadays. It's great for getting embedded JSON out of things which are not very consistent. Extremely useful for extracting JSON from LLM responses, also great for general purpose data munging. https://dataset.readthedocs.io/en/latest/ https://dataset.readthedocs.io/en/latest/ Used to love this one when I didn't know SQL: It's kind of like RedbeanPHP, but in Python, and lets you do stuff like this (from link) : import dataset db = dataset.connect('sqlite:///:memory:') table = db['my_table'] table.insert(dict(name='John Doe', age=37)) table.insert(dict(name='Jane Doe', age=34, gender='female')) john = table.find_one(name='John Doe')
- Phoenix12052023 3y agoSympy. Great alternative to Mathematica.