5 place 0

692 Authorization без middleware: как я завернул Casbin в декораторы для FastAPI

Habr
Neko1313 @ Habr · 04/02/2026 13:46 EDT

Authorization без middleware: как я завернул Casbin в декораторы для FastAPI

Когда в FastAPI-проекте появляется нормальная авторизация, код быстро начинает расползаться в стороны.Сначала все выглядит терпимо: один Depends(get_current_user), один Depends(get_enforcer), одна ручная проверка. Потом роутов становится больше, правил доступа становится больше, и внезапно половина endpoint’ов начинает содержать не бизнес-логику, а обвязку вокруг нее.В какой-то момент меня перестал устраивать и классический подход через dependency injection в каждом роуте, и вариант с middleware. Хотелось,.

To see detailed statistics for the news please log in »

Read the original

Add your comment
You must be logged in with Facebook to read and write comments.

A newsletter a day!

You may get 10 most important news around midday in daily newsletter. Press the button and we will send you the most important news only, no spam attached.

or register

LIKE us on Facebook so you won't miss the most important news of the day!

News from the same source
Habr Habr
Silicon Valley
George Avalos @ Silicon Valley 1 place · 02/07/2106 01:28 EDT

Newark apartment complex bought for much less than prior value

An East Bay apartment complex has been bought at a price that's well below its prior value. Read more

0

🔮
22.04.2026 ♊︎ Dear Gemini, Today, you can expect unusual and profound changes in your emotional world. Love... Read more ›
Silicon Valley
George Avalos @ Silicon Valley 2 place · 02/07/2106 01:28 EDT

PG&E buys San Jose building to bolster South Bay operations

A PG&E Corp. unit has bought a San Jose building in a move to bolster the utility's South Bay operations. Read more

0

Inc42 Media
Lokesh Choudhary @ Inc42 Media 1 place · today 20:30 EDT

STCH Raises $7 Mn To Build AI-Led Fabric R&D, Manufacturing Platform

AI startup STCH has raised $7 Mn (about ₹66 Cr) in its Pre-Series A funding round led by Omnivore, along… Read more

0 newcommer

Business Insider
Ben Bergman @ Business Insider 1 place · today 20:29 EDT

Anthropic has surged to a trillion-dollar valuation on secondary markets, overtaking OpenAI

Buyers are in a race to secure a dwindling supply of shares in Anthropic, driving the AI company's valuation on some platforms to $1 trillion. Read more

0 newcommer

Droid Life
Kellen @ Droid Life 1 place · today 20:28 EDT

Google Releases Android 17 QPR1 Beta 1 for Pixel

Google surprised us a bit this afternoon with the release of Android 17 QPR1 Beta 1 for its Pixel line-up. This update will come after the first stable build of Android 17 is released, which should happen soon now that we have received the final beta of that. For those not up-to-date on what the... Read the original post: Google Releases Android 17 QPR1 Beta 1 for Pixel Read more

0 newcommer

GSMArena.com
GSMArena.com 1 place · today 20:03 EDT

OnePlus Ace 6 Ultra shown off in new Metal Storm color

The OnePlus Ace 6 Ultra will be unveiled on April 28 (that’s Tuesday next week). Last week, the company posted details on the Ace Awakening design, which features the word “Ace” etched on the back of the device in a way that creates a 3D effect. Now OnePlus has revealed another look for the Ace 6 Ultra called “Metal Storm”. It’s a combination of a metal frame with a matte... Read more

0 fresh

TechRadar
TechRadar 1 place · today 20:00 EDT

It’s finally happened — renewable energy just overtook coal as the world’s main source of electricity as solar growth hits 'the largest ever observed for any source'

Renewable energy overtakes coal as the main source of the world's electricity generation, as thinktank sees a 'shift in the underlying dynamics of the power system'. Read more

0 fresh

VentureBeat
VentureBeat 1 place · today 19:53 EDT

OpenAI introduced a new paradigm and product today that is likely to have huge implications for enterprises seeking to adopt and control fleets of AI agent workers.Called "Workspace Agents," OpenAI's new offering essentially allows users on its ChatGPT Business ($20 per user per month) and variably priced Enterprise, Edu and Teachers subscription plans to design or select from pre-existing agent templates that can take on work tasks across third-party apps... Read more

0 fresh

CNET
Gael Cooper @ CNET 1 place · today 19:44 EDT

Mandalorian and Grogu Fans, Set a Course for Burger King

This is the tray: The new Mando menu items arrive on Star Wars Day, with kids' meals flying in early on April 28. Read more

0 fresh

SlashGear
SlashGear 1 place · today 19:30 EDT

10 Expensive DeWalt Tools Users Say Are Worth Buying

DeWalt is a reliable trusted name in tools with a wide array of options at different price points. These are the expensive ones users say are worth buying. Read more

0 fresh

CNET
Aaron Pruner @ CNET 2 place · today 19:13 EDT

Meta Adds New Live Chat Feature to Threads for NBA Playoffs, Major Events

Threads users can chat in real-time conversations during big cultural events. Read more

0 fresh

Skift
Meghna Maharishi @ Skift 1 place · today 19:05 EDT

American and Alaska in Talks Over a Revenue-Sharing Partnership

Such a partnership could give both American and Alaska a revenue boost as they struggle with surging fuel costs. Read more

0 fresh

CNET
Tyler Lacoma @ CNET 3 place · today 19:01 EDT

T-Mobile Begins DoorDashing 5G Internet to Customers for Same-Day Deliveries

T-Mobile's latest use of DoorDash is speedy and free, but it may not be available everywhere and requires you to install your own internet. Read more

0 fresh

TechRadar
TechRadar 2 place · today 19:00 EDT

I counted every gadget in my home for Earth Day — and the results surprised me

In honor of Earth Day, I rounded up every gadget I own to sort out what I actually use from what needs selling, trading in, or recycling. Read more

0 fresh

TechRadar
TechRadar 3 place · today 19:00 EDT

Quordle hints and answers for Thursday, April 23 (game #1550)

Looking for Quordle clues? We can help. Plus get the answers to Quordle today and past solutions. Read more

0 fresh

Slashdot
BeauHD @ Slashdot 1 place · today 19:00 EDT

Billionaire Backer Sues Trump Family's Crypto Firm Over Alleged Extortion

Ancient Slashdot reader Alain Williams shares a report from the BBC: The Trump family's World Liberty crypto venture is being sued by one of its billionaire backers over allegations of extortion. Justin Sun has accused World Liberty of an "illegal scheme" to seize his WLFI tokens, a cryptocurrency issued by the company. Sun alleges the firm, co-founded by U.S. President Donald Trump and his son Eric Trump, has "frozen" all... Read more

0 fresh

TechRadar
TechRadar · today 19:00 EDT

NYT Connections hints and answers for Thursday, April 23 (game #1047)

Looking for NYT Connections answers and hints? Here's all you need to know to solve today's game, plus my commentary on the puzzles. Read more

0 fresh

TechRadar
TechRadar · today 19:00 EDT

NYT Strands hints and answers for Thursday, April 23 (game #781)

Looking for NYT Strands answers and hints? Here's all you need to know to solve today's game, including the spangram. Read more

0 fresh

Silicon Canals
Lachlan Brown @ Silicon Canals 1 place · today 18:51 EDT

Psychology says a truly successful life isn’t measured by what you’ve accumulated, it’s measured by whether the people closest to you feel more like themselves or less like themselves after spending time with you

When a Harvard study tracking people for over 80 years revealed that the quality of our relationships—not our bank accounts or achievements—determines our happiness and success, it challenged everything we thought we knew about what it means to "make it" in life. Read more

0 fresh

The Information
Sri Muppidi @ The Information 1 place · today 18:49 EDT

OpenAI in Talks to Invest Up to $1.5 Billion in Private Equity Joint Venture

OpenAI is in discussions to invest up to $1.5 billion in a private equity joint venture called DeployCo, according to a person with knowledge of the effort. The ChatGPT maker is in talks to invest $500 million initially in DeployCo, which is expected to be valued at $10 billion. OpenAI has the ... Read more

0 fresh

The most popular news from the same source for the last week
Habr Habr
Habr
appet1te @ Habr · 04/15/2026 21:09 EDT

Почему Дюну так интересно читать?

Дюна не типичная фантастика. Это не типичная история, где все неоновое, блестит, киберпанк, где технология или какой-то отдельный технический объект является одним из действующих персонажей и возможно главным персонажем.В Дюне из железяк орнитоптеры, которые и почти не описаны, просто возки для героев. Ядоискатели. Конденс костюмы. Бластеры и силовые щиты. Вот и основные игрушки для размышления читателя. Ножи. Просто ножи. Не лазерные мечи, а просто ножики-крисы из зубов чудовища.Потому что конфликт.Любая... Read more

0

Habr
Ares_ekb (Architeezy) @ Habr · 04/16/2026 00:17 EDT

Навайбкодил приложение для анализа графов

Попробовал создать небольшое приложение с помощью Claude Code. Изначально я был очень скептически настроен, потому что до этого использовал GPT в Copilot, который меня больше бесил, чем делал что‑то полезное. Поэтому я ожидал, что, ну, наверное Claude что‑то сгенерирует, но потом ещё неделю нужно будет вручную допиливать.Я ошибался, вполне работающее приложение он сгенерировал за час, ещё день ушёл на тестирование и накидывание промптов по доработке. Можно было бы на этом... Read more

0

Habr
AlekseiVB @ Habr · 04/16/2026 00:53 EDT

Часть 6: Безопасность и приватность в голосовом управлении — как защитить умный дом от утечек и взломов

От диплома до продакшена. Часть 1: Что я хотел … Часть 2: Техническая реализация … Часть 3: Архитектура нейросети … Часть 4: Обучение и валидация … Часть 5: Интеграция с устройствами …… И ВОТ ТЕПЕРЬ …Если вы используете умный дом: Настройки… Проверьте разрешения приложений Сеть… Включите WPA3 на Wi-Fi Приватность… Регулярно очищайте историю команд Физическая безопасность… Там много интересного Read more

0

Habr
RakovskyAlexander @ Habr · 04/16/2026 01:00 EDT

Как я заставил ИИ писать код по книжке: Clean Architecture + TDD на автопилоте

Продолжение первой статьи про взрослый вайб-код для тех разработчиков, которые уже перешли на тёмную сторону. Рассказ про фреймворк, который насильно заставляет писать ИИ хороший код с хорошими тестами. Читать далее Read more

0

Habr
projectgeek (YouGile) @ Habr · 04/16/2026 01:01 EDT

Что умеет таск-трекер в 2026 году: обзор российских сервисов

Когда искал таск-трекер, решил сравнить лучшие системы управления проектами на российском рынке. Этого показалось мало, собрал их в статью. В материале — обзор лучших таск-менеджеров от российских разработчиков. Все соответствуют законодательству и отвечают запросам бизнеса.  Читать далее Read more

0

Habr
AlexeyMarketing @ Habr · 04/16/2026 01:12 EDT

Почему сложные задачи висели неделями: я думал, проблема в дисциплине, а оказалось — в избегании когнитивной нагрузки

Иногда у меня неделями лежала одна и та же задача: открыть новый документ, собрать структуру, написать сложное письмо, придумать логику материала. При этом внешне я был занят весь день, но к вечеру видел знакомую картину: мелочи закрыты, созвоны прошли, а главный кусок работы снова остался нетронутым. Читать далее Read more

0

Habr
ARad @ Habr · 04/16/2026 01:16 EDT

[Перевод] Unitree R1 на AliExpress по цене Mac Pro: что на самом деле скрывается за $8150

Unitree R1 появился на AliExpress за $8150. Разбираем аппаратные характеристики, сроки поставок (июнь 2026) и критичную блокировку SDK, о которой нужно знать разработчикам перед покупкой. Читать далее Read more

0

Habr
alexander_kubarski @ Habr · 04/16/2026 01:28 EDT

[Перевод] Пишем свой текстовый 3D движок в браузере

Сразу скажу: это перевод моей же статьи на Medium, но с небольшими дополнениями и более практичным разбором реализации. Читать далее Read more

0

Habr
FaryaRos @ Habr · 04/16/2026 02:00 EDT

[Перевод] Full-stack верификация: как Playwright-агент тестирует UI, затем проверяет базу данных без единой строки SQL

Ваш тест на оформление заказа нажимает «Оформить заказ» и видит зелёный тост. Хорошо. Но вот чего он не проверяет: реально ли записалась строка? Правильно ли записались позиции заказа? Уменьшился ли инвентарь? UI написал «подтверждено», но UI иногда врёт — проглоченная ошибка, откаченная транзакция, очередь, которая молча дропнула сообщение.Классическое решение некрасиво: нужно подключить ORM или низкоуровневый драйвер базы данных внутри тестового харнеса, управлять отдельными учётными данными, писать SQL-а Read more

0

Habr
IBS_habrablog (IBS) @ Habr · 04/16/2026 02:22 EDT

Искусственный архитектор: как нейросети справляются с проектированием ПО

Не так давно в нашем блоге была статья о том, как искусственный интеллект помогает разбирать логи 1C. В этой — поговорим о задачах архитекторов ПО. LLM и диффузионные модели уже способны генерировать варианты архитектур, оценивать компромиссы и предлагать решения быстрее, чем это возможно вручную. Пора разобраться, насколько глубоко ИИ может встроиться в рабочие процессы архитектора ПО — и стоит ли ему там оставаться.Привет, Хабр! Меня зовут Александр Брейман, я доцент... Read more

0

Most popular sources

  • You see 908 news out of 908.
  • Sources 61 out of 61.
Financial Times 0%
ArcticStartup 0%
Startup News 0%
Tech Wire Asia 0%
ScienceDaily 0%
View sources »

LIKE us on Facebook so you won't miss the most important news of the day!

22.04.2026 20:48
Last update: 20:40 EDT.
News rating updated: 03:41.

What is Times42?

Times42 brings you the most popular news from tech news portals in real-time chart.
Read about us in FAQ section.


Times42 © 2026