SQLAlchemy - 用 Mixin / Custom Base Classes 撰寫好維護的 ORM
越是使用 SQLAlchemy 就會越是發現 SQLAlchemy 在 Python ORM 的用心,例如 Mixin and Custom Base Classes 讓我們能夠將常見的資料庫欄位或者功能放在一起,變成 Mixin 類別(c…
196 篇 · 第 17 頁
越是使用 SQLAlchemy 就會越是發現 SQLAlchemy 在 Python ORM 的用心,例如 Mixin and Custom Base Classes 讓我們能夠將常見的資料庫欄位或者功能放在一起,變成 Mixin 類別(c…
Django 對於 internationalization 與 localization 已提供成熟的解決方案,官方 文件 也寫得十分詳細。 而 Flask 作為一個輕量化的 Web Framework ,並沒有內建 i18n & l10…
JWT(JSON Web Token) 是 RFC 7519 定義的一套標準,用以確保應用(application)之間傳遞訊息的安全性與完整性(integrity)。 JWT 常常與傳統的 Cookie/Session 技術一起被比較,然…
Python logging 模組提供很多內建的 handlers ,可以依照各種不一樣的使用情況選擇不同的 handler 處理日誌(log)。 然而,關於 QueueHandlers 的說明最為吸引我的目光: Along with th…
SQLAlchemy ORM Query API 提供 filter(*criterion) 與 filter_by(**kwargs) 2 種 Query 方式,都是分別對應到 SQL 中的 WHERE 語句,不過用法上有些許出入。 特此…
本文為系列教學: 用 Python 學 Google Protocol Buffers - Part 1 用 Python 學 Google Protocol Buffers - Part 2 用 Python 學 Google Proto…
本文為系列教學: 用 Python 學 Google Protocol Buffers - Part 1 用 Python 學 Google Protocol Buffers - Part 2 用 Python 學 Google Proto…
本文為系列教學: 用 Python 學 Google Protocol Buffers - Part 1 用 Python 學 Google Protocol Buffers - Part 2 用 Python 學 Google Proto…