#litestar — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #litestar, aggregated by home.social.
-
Январский рефакторинг: 7 дней, чтобы почистить Python веб‑проект
Январь - самое удобное время разобрать завалы в проекте. Пол‑команды ещё в отпусках, pull‑реквестов меньше, product owner'ы только вспоминают, что планировали делать в этом году - можно спокойно пройтись по коду и навести порядок. В этой статье пойдёт речь о нескольких косметических действиях, которые, с одной стороны, почти не затрагивают логику программы и не вызывают ненависти у тестировщиков, а с другой - делают код чуть приятнее и дают темы для обсуждения на бэкенд‑созвонах. Мы разложим импорты, перенесём логику из роутов в контроллеры, а из контроллеров - в репозитории и сервисы, избавимся от requirements.txt в пользу нормального менеджера зависимостей и включим mypy.
https://habr.com/ru/articles/983172/
#python #backend #refactoring #architecture #linter #mypy #litestar
-
API frameworks for Python Benchmark: FastAPI vs Litestar vs Django Ninja vs Django Bolt vs Django REST Framework
https://github.com/tanrax/python-api-frameworks-benchmark
#python #fastapi #litestar #djangoninja #djangobolt #djangorestframework -
API frameworks for Python Benchmark: FastAPI vs Litestar vs Django Ninja vs Django Bolt vs Django REST Framework
https://github.com/tanrax/python-api-frameworks-benchmark
#python #fastapi #litestar #djangoninja #djangobolt #djangorestframework -
RE: https://fosstodon.org/@talkpython/115735672147779460
🎧 We are live and talking about all-the-web-frameworks!
-
RE: https://fosstodon.org/@talkpython/115735672147779460
🎧 We are live and talking about all-the-web-frameworks!
-
Восемь высокопроизводительных Python-библиотек в копилку разработчикам
Когда в 1991 году Гвидо ван Россум представил миру Python, никто не мог предсказать, какое место через несколько десятилетий этот язык займет в веб-разработке, Data Science и Machine Learning. Сейчас Python продолжает развиваться: с новым поколением инструментов в прошлое уходят традиционные ограничения — производительность, GIL и сложность параллельных вычислений. Привет, Хабр! С вами Леша Жиряков, я руковожу бэкенд-направлением витрины KION, возглавляю гильдию по Python и пишу для блога MWS на Хабре. Я каждый день сталкиваюсь с вызовами высоконагруженных систем и сформировался пул инструментов, которые помогают решать критические проблемы современной разработки — от обработки данных с Polars до управления зависимостями с UV. В этом материале я сделаю обзор Python-библиотек, с которыми можно создавать системы, сравнимые по производительности с Go и Rust.
https://habr.com/ru/companies/ru_mts/articles/968776/
#библиотеки #python #fastapi #litestar #polars #httpx #dask #Pydantic_V2 #ruff #Pithon_UV
-
Практическое тестирование приложений
Всем привет! Эта статья — продолжение материала про универсальный прототип бэкенд-приложений. В ней я поделюсь практическим опытом написания тестов и покажу, как выбранная архитектура упрощает этот процесс. Ну что ж, приступим
https://habr.com/ru/articles/958014/
#python #faststream #dishka #litestar #fastapi #sqlalchemy #pydantic #asgi #pytest
-
RBACX — универсальный RBAC/ABAC-движок авторизации для Python
RBACX — авторизация без боли в Python-проектах Когда доступ «размазан» по вьюхам и миддлварам, ревью и тесты превращаются в квест - появляется мотивация все это унифицировать. Я написал RBACX — лёгкий движок, где правила описываются декларативно (JSON/YAML), а проверка прав — это один понятный вызов. В статье показываю, как собрать из него аккуратный PDP для микросервисов и монолитов. Я последние два года пишу бэкенд в стартапе MindUp — это мой первый пост на Хабре, и первая библиотека. Буду рад вопросам и критике. Если тема авторизации болит так же, как у меня, загляните!
https://habr.com/ru/articles/950080/
#python #rbacx #RBAC #ABAC #fastapi #authorization #django #flask #litestar #accesscontrol
-
Bon je dois me rendre à l’évidence : je crois que j’aime bien écrire des articles de blog/tuto sur des sujets #tech comme j’ai fait pour celui sur #neovim
Est-ce qu’il y aurait d’autres sujets qui pourraient vous intéresser ? Mon setup #desktop #linux optimisé pour l’utilisation clavier avec #sway, #kitty, le lanceur #rofi (apps, emojis, etc), mes mappings #ergol et mes quelques apps #cli dont je peux pas me passer ?
Des tutos #python sur #litestar notamment ? Autre chose ? -
Bon je dois me rendre à l’évidence : je crois que j’aime bien écrire des articles de blog/tuto sur des sujets #tech comme j’ai fait pour celui sur #neovim
Est-ce qu’il y aurait d’autres sujets qui pourraient vous intéresser ? Mon setup #desktop #linux optimisé pour l’utilisation clavier avec #sway, #kitty, le lanceur #rofi (apps, emojis, etc), mes mappings #ergol et mes quelques apps #cli dont je peux pas me passer ?
Des tutos #python sur #litestar notamment ? Autre chose ? -
LitestarCatsCV. Тренируемся на кошках. Расширяем возможности и готовимся к продакшену. Часть 3
Привет, котики и котолюбы! В первой части нашего кошачьего приключения мы выбрали инструменты (Litestar вместо FastAPI, Granian вместо Gunicorn, KeyDB вместо Redis), настроили uv и заложили фундамент проекта. Во второй части мы построили полноценное CRUD API для резюме котиков (или людей, если вам так ближе), подружили его с PostgreSQL через SQLAlchemy, настроили миграции с Alembic и написали тесты с Pytest. У нас уже есть стены и фундамент, но пора ставить крышу и готовиться к продакшену! 🏠 Сегодня мы сделаем наш API ещё круче: вынесем конфиги в отдельный модуль с помощью msgspec, добавим аутентификацию через встроенный JWT в Litestar, ускорим API с KeyDB, проверим покрытие тестами с coverage, упакуем всё в Docker и нарисуем резюме котиков с помощью Jinja. К концу статьи наш кошачий проект будет готов к реальной жизни — поехали! 🚀
https://habr.com/ru/companies/ntechlab/articles/901852/
#api #python #tutorial #backend #uv #fastapi #litestar #granian #jinja #keydb
-
Bon c’est vraiment pas mal #litestar comme framework #python https://litestar.dev/
Ça a le goût de #fastapi sauf que c’est développé par une vraie communauté, que la doc est hyper bien faite et que l’écosystème a l’air riche 😊 #staytuned -
Bon c’est vraiment pas mal #litestar comme framework #python https://litestar.dev/
Ça a le goût de #fastapi sauf que c’est développé par une vraie communauté, que la doc est hyper bien faite et que l’écosystème a l’air riche 😊 #staytuned -
LitestarCatsCV. Тренируемся на кошках. Реализация API и работа с данными
Что вас ждёт: Если в первой части мы заложили фундамент проекта (выбор инструментов, настройка окружения и структура), то здесь мы превратим этот каркас в полноценное API для управления резюме кошек (или людей — как вам ближе). Мы подключим базу данных, добавим тесты, настроим миграции и даже проверим всё в действии. К концу статьи у вас будет рабочее API, которое можно потрогать руками (или лапками 🐾). Полный код доступен на GitHub — ссылка в конце!
https://habr.com/ru/companies/ntechlab/articles/889022/
#python #python3 #litestar #alembic #sqlalchemy #orm #pytest #asyncpg
-
Наш архитектурный подход к Python приложениям
Мы долгие годы писали сервисы исходя из каких-то своих внутренних ощущений правильности их написания. Но синхронизироваться по хорошим практикам в разных командах бывает довольно сложно и часто хорошие практики не выходили за рамки одной команды, а такого хотелось бы избежать. Поэтому мы решили объединить все хорошие по нашему мнению практики в единый справочник. Этот справочник получил название «Архитектурный гайд». Про него и поговорим в данной статье.
https://habr.com/ru/companies/raiffeisenbank/articles/885792/
#архитектура #архитектура_приложений #python #fastapi #litestar #райффайзенбанк #лучшие_практики #pytest #circuit_breaker #stamina
-
Version 1.8.0 of jinja2-fragments is out!
Release notes:
- Adds support for rendering multiple blocks on Flask, Quart, Sanic and Litestar.
- Fixes deprecated Litestar import. -
Version 1.8.0 of jinja2-fragments is out!
Release notes:
- Adds support for rendering multiple blocks on Flask, Quart, Sanic and Litestar.
- Fixes deprecated Litestar import. -
LitestarCatsCV. Тренируемся на кошках. Пробуем litestar и другое новьё. Часть 1
Иногда хочется попробовать что-то новое, но в рабочих проектах это не всегда возможно. Поэтому предлагаю всем вместе пощупать несколько относительно новых фреймворков и посмотреть, что это такое и с чем их едят. Для начала придумаем проект, который не займёт много времени(надеюсь) и над которым будет интересно посидеть пару вечеров.
https://habr.com/ru/companies/ntechlab/articles/883578/
#python #backend #tutorial #litestar #granian #uv #fastapi #api
-
Although I'm known as a #Django guy, I think I've mentioned a few times that of the new generation of async/type-hint-driven #Python web frameworks my favorite is #Litestar.
I already have a bunch of Litestar services in production at work, and just added a new one today. Our metrics dashboard says it's humming along at a p95 response time of 10ms, and that's *without* having added any caching to it yet.
Worth a look if you're interested in exploring the state of the art in Python web dev.
-
Although I'm known as a #Django guy, I think I've mentioned a few times that of the new generation of async/type-hint-driven #Python web frameworks my favorite is #Litestar.
I already have a bunch of Litestar services in production at work, and just added a new one today. Our metrics dashboard says it's humming along at a p95 response time of 10ms, and that's *without* having added any caching to it yet.
Worth a look if you're interested in exploring the state of the art in Python web dev.
-
Пишем универсальный прототип бэкенд-приложения: Litestar, FastStream, dishka
Привет, Хабр! Меня зовут Сергей, я техлид в команде PT BlackBox. Мы с коллегами разрабатываем продукт, который позволяет обнаруживать уязвимости в приложениях методом черного ящика. Фактически мы сами и пишем веб-приложения, и именно о них пойдет речь в статье. Я бы хотел с вами поделиться своими наработками по теме бэкенд-приложений и предоставить вам шаблон-прототип, который, как мне кажется, может закрыть подавляющее большинство потребностей при их разработке. Для написания прототипа я буду использовать Litestar , FastStream и dishka . Эта статья будет особенно полезна тем, кто пишет на Tornado, Django, Flask или AIOHTTP и хочет перейти на более актуальные технологии для дальнейшего развития своих проектов на современных рельсах. Ну что ж, приступим
https://habr.com/ru/companies/pt/articles/820171/
#python #Litestar #прототип #web #faststream #asgi #sqlalchemy #alembic #pydantic #dishka
-
Been slowly tinkering on a Litestar app I'm building just for the hell of it. My local amateur soccer league could really use a website, and I could also stand to learn a new web framework. (I mean, why not?)
While I've been plugging away at it (over-engineering and all), I decided to continue building in public.
Lots of fun stuff in here, but a pretty good "real world" use case for the PyHAT stack (htmx/Tailwind).
-
You can install from PyPI:
https://pypi.org/project/jinja2-fragments/
If you haven't tried Litestar, why not give it a try?
But even if not, jinja2-fragments also has support for Flask, Quart, Sanic, and FastAPI!
-
New release of Jinja Fragments is out with support for Litestar thanks to @pythonbynight !
-
New release of Jinja Fragments is out with support for Litestar thanks to @pythonbynight !
-
The previous post with the hashtag #litestar is me praising it's sqlalchemy integration. Oh irony.
-
Last week I decided to pick #litestar instead of #fastapi for a new #python microservice and I already regret this decision. I can't make DB rollbacks work in tests because the test client runs the server in a separate thread with its own event loop. And it feels like I'm the first one doing it and there is no community to help.
I learned a valuable lesson: don't underestimate the importance of community. Sometimes, it's better to go with mainstream. Especially for commercial projects.
-
Last week I decided to pick #litestar instead of #fastapi for a new #python microservice and I already regret this decision. I can't make DB rollbacks work in tests because the test client runs the server in a separate thread with its own event loop. And it feels like I'm the first one doing it and there is no community to help.
I learned a valuable lesson: don't underestimate the importance of community. Sometimes, it's better to go with mainstream. Especially for commercial projects.
-
@glowrocks Django is still very much alive and I, unfortunately, work with it daily at my job. It didn't age well, though. The support for asyncio is still quite rough, support for typing is third-party (see django-stubs) and painful, and it hides too many things (the ORM makes it too easy to make bad requests). The modern most hyped web framework is #fastapi and I personally found #litestar (ex #starlite) quite nice (better #sqlalchemy integration).
-
@glowrocks Django is still very much alive and I, unfortunately, work with it daily at my job. It didn't age well, though. The support for asyncio is still quite rough, support for typing is third-party (see django-stubs) and painful, and it hides too many things (the ORM makes it too easy to make bad requests). The modern most hyped web framework is #fastapi and I personally found #litestar (ex #starlite) quite nice (better #sqlalchemy integration).