5 place 0 fresh

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

Habr
Neko1313 @ Habr · today 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

🔮
02.04.2026 ♌︎ Dear Lev, Today promises you many bright emotions and interesting events. In love, you can... 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

Habr
Kudryavtsev-AiPrRocknRoll @ Habr 1 place · today 15:15 EDT

Как я научил ИИ читать советские ГОСТы и сократил подготовку карт контроля с 2 часов до 5 минут

Реальный кейс: как LLM заменяет трех технологов на металлургическом заводе - и почему универсальный подход не сработал.Как я научил ИИ читать советские ГОСТы и сократил подготовку карт контроля с 2 часов до 5 минут. Читать далее Read more

0 newcommer

Engadget
Igor Bonifacic @ Engadget 1 place · today 15:14 EDT

OpenAI brings ChatGPT's Voice mode to CarPlay

In a surprise release, OpenAI has made ChatGPT's Voice mode available through Apple CarPlay. If you're running the latest version of both iOS and the ChatGPT app, and own a CarPlay-compatible vehicle, you can check out the experience. To get started, download all the necessary software, connect your iPhone to CarPlay and select "New voice chat" from ChatGPT. When the in-app text indicates ChatGPT is "listening," you can start a... Read more

0 newcommer

Business Insider
Reem Makhoul,Robert Leslie,Zeta Spyraki @ Business Insider 1 place · today 15:13 EDT

How AI could destroy — or save — humanity, according to former AI insiders

Five former AI insiders debate whether artificial intelligence will erase jobs, reshape power, and unlock breakthroughs in medicine and education. Read more

0 fresh

Digital Trends
Manisha Priyadarshini @ Digital Trends 1 place · today 15:13 EDT

If you love indie games, there’s now a subscription service for these gems

Indie Pass is a new $6.99-a-month subscription service launching April 13 with over 70 indie titles on PC. Built by indie.io, it promises curated picks, a smart recommendation engine, and a fair revenue model for developers. Read more

0 newcommer

The Verge
Richard Lawler @ The Verge 1 place · today 15:08 EDT

Trump fires attorney general Pam Bondi.

Taking a break from calling Bruce Springsteen a boring loser on Thursday, Donald Trump followed that up with another Truth Social post saying "loyal friend" Pam Bondi will transition to a yet-to-be-announced job in the private sector. CNN, the New York Times, and Fox News all report that Bondi, a figure in the TikTok takeover, […] Read more

0 fresh

TechRadar
TechRadar 1 place · today 15:05 EDT

If only your EV did this: Dell’s new supercapacitor keyboard and mouse combo delivers 'full day use' with a 5-second charge — here’s how

Dell’s supercapacitor-powered keyboard and mouse deliver ultra-fast charging and long usage, redefining convenience and eliminating reliance on traditional batteries. Read more

0 fresh

Habr
kuz1 @ Habr 2 place · today 15:05 EDT

Память для LLM-чата на Python. Часть 3: добавляем историю сообщений и контекст

Во второй части мы сделали консольный чат с циклом и system prompt. Но у него был пробел: каждый запрос шёл к модели независимо, без контекста предыдущих реплик. В третьей части добавляем историю сообщений — и чат наконец начинает помнить разговор. Читать далее Read more

0 fresh

Silicon Canals
Daniel Voss @ Silicon Canals 2 place · today 15:04 EDT

ICE confirms it deployed Paragon spyware inside the United States for drug trafficking cases

ICE is actively using commercial spyware to surveil people on U.S. soil. The agency has confirmed it deployed Paragon Solutions’ surveillance tool in drug trafficking investigations inside the United States — a disclosure that raises immediate constitutional questions about warrantless access to encrypted personal devices, the absence of independent oversight, and the potential for mission ... Read more Read more

0 fresh

Gizmodo
Germain Lussier @ Gizmodo 1 place · today 15:02 EDT

Michael B. Jordan’s First Post-Oscars Film Looks Way Cuter Than ‘Sinners’

It's called 'Swapped' and features the Oscar winner as the voice of an animal that swaps bodies with its enemy. Read more

0 fresh

Engadget
Ian Carlos Campbell @ Engadget 2 place · today 15:01 EDT

CFTC sues three states for trying to regulate prediction markets

The US Commodity Futures Trading Commission is suing Illinois, Arizona and Connecticut for attempting to outlaw or regulate prediction markets like Kalshi and Polymarket. The CFTC believes it has sole jurisdiction to regulate these platforms, and that states attempting to classify them as illegal gambling are overstepping their authority.CFTC defines prediction markets as “designated contract markets” where futures contracts are traded, essentially letting people bet on the outcome of events... Read more

0 fresh

GSMArena.com
GSMArena.com 1 place · today 15:01 EDT

Report: Samsung is looking to offset rising RAM prices in an unusual way

The rising cost of memory chips in the last year or so has forced manufacturers of electronic goods to come up with various strategies to offset the burden, especially smartphone makers that have a portfolio of low-end to mid-range devices. Bumping up the price of more affordable devices could potentially spell trouble. This doesn't necessarily apply to the high-end smartphones, where manufacturers are more inclined to shift the cost to... Read more

0 fresh

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

Raspberry Pi 4 3GB Launches, Raspberry Pi Prices Go Up Again Due To RAM

AmiMoJo shares a report from Phoronix: Raspberry Pi prices are going up yet again due to the continued memory squeeze on the industry. To help offset the memory prices for some use-cases, Raspberry Pi also announced the introduction of the Raspberry Pi 4 3GB model at $83 to help fill the void between the 2GB and 4GB options. The 3GB Raspberry Pi 4 was announced at $83.75 USD for those... Read more

0 fresh

Business Insider
Alex Bitter @ Business Insider 2 place · today 15:00 EDT

Amazon tells sellers it's adding a 3.5% charge to offset rising fuel and logistics costs

Amazon said it would add a 3.5% surcharge to some orders, citing rising "fuel and logistics" costs amid higher oil prices. Read more

0 fresh

Vox
Jolie Myers @ Vox 1 place · today 14:55 EDT

Why Trump betrayed MAGA, according to Tucker Carlson

After five weeks of muddled messaging, President Donald Trump finally addressed the nation on Wednesday night to make the case for his war on Iran. That message was…still muddled. He did not articulate a clear exit plan from the conflict, fobbed the Strait of Hormuz problem off on other countries, and denied that regime change […] Read more

0 fresh

The most popular news from the same source for the last week
Habr Habr
Habr
svetiks14 @ Habr · 03/26/2026 16:10 EDT

Как сделать себе личного Промпт-инженера с ИИ за 15 минут

Вы наверняка видели те самые видео: «Все секреты промптинга за 4 часа», «Идеальный промпт для Midjourney», «Как научиться разговаривать с нейросетями». Я тоже их смотрел. Сохранял в закладки, записывал советы, искал тот самый файл с рабочими формулировками, который куда‑то завалился.А потом понял: вместо того чтобы учиться общаться с ИИ, можно просто сделать себе личного промпт‑инженера, который уже всё знает. И для этого даже не нужно настраивать сложные агенты или платить... Read more

0

Habr
adobry96 @ Habr · 03/26/2026 16:13 EDT

UseCase или как описывать бизнес-процессы в коде

UseCase - как организовать своё приложение с точки зрения бизнес-процессов, чтобы не погрязнуть в хаосе сервисов, контроллеров и разрозненной логики. Узнать как это Read more

0

Habr
appet1te @ Habr · 03/26/2026 16:59 EDT

Теория игр в обычной жизни. Теория игр в найме

История такова. Бродил я на хабре и увидел сей опус:"Как я пытался трудоустроиться в Яндекс в 2026"Где разраба с 20 летним опытом нагрели, как ребенка.Ситуация типовая. И когда людей "едят", используют, эксплуатируют их ресурс/время/энергию/деньги/пэм ресурс и т.д. И они этого в упор не видят. Таких ситуаций множество. Да только разраб кажется умным. Есть ожидание, что он интеллектуален и может в математику. И так и есть скорее всего, но базовая, минимальная... Read more

0

Habr
WhiteBehemoth @ Habr · 03/26/2026 17:55 EDT

Грабилка звука с переводом

Сидя на очередном teams митинге с коллегами на французском, и в очередной раз понимая, что упускаю смысл совещания, ибо уровень этого самого французского оставляет желать лучшего, подумал, что надо что-то делать.И так как их много, а меня — мало, делать что-то предстояло мне. Teams и прочие платформы, конечно, имеют опции на такой случай, но не просить же включать запись каждый раз.Получилась небольшая программа, которая берёт воспроизводимый звуковой поток, делит его... Read more

0

Habr
camunar @ Habr · 03/26/2026 17:55 EDT

Бекэнд на fastify для няшных котят (aura8)

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

0

Habr
FirsakovAE @ Habr · 03/26/2026 18:00 EDT

Тестирование Vue-приложений изнутри: props, Pinia и Network без proxy и dev-сборки

Проблема не в том, что инструментов мало. Проблема в том, что большинство из них построены вокруг браузера прошлого поколения, тогда как frontend уже давно живёт внутри runtime. Именно из этой практической боли появился собственный runtime-инспектор — сначала как консольный скрипт для одной конкретной задачи, а затем как полноценный инструмент, который неожиданно нашел отклик у QA и разработчиков. Читать далее Read more

0

Habr
Kahelman @ Habr · 03/26/2026 20:05 EDT

ударим автопробегом по галактическому бездорожью и разгильдяйству

или как уместить Вселенную в iPhone, не привлекая внимания санитаровРазработчики — люди в целом неплохие, но с одной странностью: когда задача кажется им большой, они добавляют слой. Потом ещё слой. Потом, в три часа ночи, смотрят на то, что получилось, и долго молчат.Автор проекта «ЭХО» взял и убрал всё лишнее. Без предупреждения, без RFC, без голосования в команде. Остался минимальный Linux, один бинарник на Go и файловая система — всё... Read more

0

Habr
Hubbitus @ Habr · 03/26/2026 21:44 EDT

Сталкивались уже с EvaTeam (российский аналог Jira)? Чувствуете боль при работе с бизнес-процессами (workflow)? Думаю я могу вам немного помочь Читать далее Read more

0

Habr
Dimperus @ Habr · 03/26/2026 21:48 EDT

Как учитывать стоимость ИТ-ресурсов и аллоцировать затраты по P&L-центрам (часть 3 из 5)

Меня зовут Дмитрий, я руковожу отделом ИТ-инфраструктуры и сервисов в Ви.Tech, IT-дочке ВсеИнструменты.ру. В прошлой части я подробно разбирал ценообразование вычислительных ресурсов, а теперь давайте соберем все это в единую модель учета и посмотрим, как она помогает не просто считать цифры, а принимать вполне прикладные решения.Ниже пройдемся по основным блокам, из которых этот учет складывается.1. Отдельно стоящее оборудованиеПоскольку мы планируем учитывать расходы за месяц, то стоимость покупки оборудо Read more

0

Habr
Dimperus @ Habr · 03/26/2026 21:53 EDT

Как прогнозировать потребление ресурсов и планировать ИТ-бюджет (часть 4 из 5)

Меня зовут Дмитрий, я руковожу отделом ИТ-инфраструктуры и сервисов в Ви.Tech, IT-дочке ВсеИнструменты.ру. В прошлой части я рассказывал, как мы собираем и считаем потребление вычислительных ресурсов, а теперь хочу перейти к следующему шагу - планированию ИТ-бюджета на базе этих данных.Для этого я обычно использую два дополняющих друг друга подхода: Читать далее Read more

0

Most popular sources

  • You see 852 news out of 853.
  • Sources 61 out of 61.
StartupNation 0%
MacRumors 0%
150sec 0%
VentureBeat 0%
ScienceDaily 0%
View sources »

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

02.04.2026 15:39
Last update: 15:30 EDT.
News rating updated: 22:32.

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