From 8c1f83ccfd3db509cc80d4b48f8c9c786757fe47 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sat, 28 Sep 2024 14:28:51 -0400 Subject: [PATCH] python/preferences: Add Polars and httpx --- docs/python/performance.rst | 5 +++++ docs/python/preferences.rst | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/python/performance.rst b/docs/python/performance.rst index 937b8be..e4414f5 100644 --- a/docs/python/performance.rst +++ b/docs/python/performance.rst @@ -92,6 +92,11 @@ Optimizations .. Can search for class in: *.py,-commands/*,-migrations/*,-tests/*,-base_spiders/*,-spiders/*,-exceptions.py,-manage.py,-admin.py,-apps.py,-forms.py,-models.py,-routers.py,-views.py +.. seealso:: + + - `array — Efficient arrays of numeric values `__ + - `struct — Interpret bytes as packed binary data `__ + Reference --------- diff --git a/docs/python/preferences.rst b/docs/python/preferences.rst index c7b4815..52f261f 100644 --- a/docs/python/preferences.rst +++ b/docs/python/preferences.rst @@ -23,9 +23,11 @@ Preferences Web framework `Django LTS `__, unless a newer version has desirable features. Do not use `Flask `__, except in limited circumstances like generating a static site with `Frozen-Flask `__. API - `Django REST Framework `__ or `FastAPI `__. Do not use `Django Tastypie `__, which has fallen behind on Django and Python versions. + `Django REST Framework `__ or `FastAPI `__. Do not use `Django Tastypie `__, which has at times fallen behind on Django and Python versions. Command-line interface `Click `__, unless a framework provides its own, like `Django `__ or `Scrapy `__. Do not use `argparse `__. +DataFrames + `Polars `__, unless end-users are unfamiliar (`pandas `__). Object Relational Mapper (ORM) Django. If you don't need an ORM, use `psycopg2 `__. Do not use `SQLAlchemy `__, except with FastAPI or in low-level libraries with limited scope *where an ORM is needed*. @@ -34,7 +36,7 @@ Object Relational Mapper (ORM) Use ``psycopg2`` in production, not ``psycopg2-binary``, `as recommended `__. :ref:`See instructions`. HTTP client - `Requests `__, unless a framework uses another, like Scrapy (Twisted). + `Requests `__ for synchronous code and `httpx `__ for asynchronous code, unless a framework uses another, like Scrapy (Twisted). HTML parsing `lxml `__. Do not use `BeautifulSoup `__. Templating