$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Clean Architecture - PythonRio
Search
Andre Fonseca
December 10, 2016
Technology
0
170
Clean Architecture - PythonRio
Presentation about clean architecture and python at last meetup of PythonRio.
Andre Fonseca
December 10, 2016
Tweet
Share
More Decks by Andre Fonseca
See All by Andre Fonseca
Quando banco de dados atrapalha
aoqfonseca
0
74
Python e a inteligência coletiva
aoqfonseca
0
83
Micro serviços e dados distribuidos
aoqfonseca
1
140
Data Dichotomy
aoqfonseca
0
25
Code Review - Fazendo de um jeito eficaz
aoqfonseca
0
140
Padrões e Anti Padrões de Estabilidade
aoqfonseca
2
120
Other Decks in Technology
See All in Technology
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
460
Lessons from Migrating to OpenSearch: Shard Design, Log Ingestion, and UI Decisions
sansantech
PRO
1
130
MLflowで始めるプロンプト管理、評価、最適化
databricksjapan
1
250
【AWS re:Invent 2025速報】AIビルダー向けアップデートをまとめて解説!
minorun365
4
530
寫了幾年 Code,然後呢?軟體工程師必須重新認識的 DevOps
cheng_wei_chen
1
1.4k
Challenging Hardware Contests with Zephyr and Lessons Learned
iotengineer22
0
220
エンジニアリングマネージャー はじめての目標設定と評価
halkt
0
290
AI 駆動開発勉強会 フロントエンド支部 #1 w/あずもば
1ftseabass
PRO
0
390
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
890
非CUDAの悲哀 〜Claude Code と挑んだ image to 3D “Hunyuan3D”を EVO-X2(Ryzen AI Max+395)で動作させるチャレンジ〜
hawkymisc
2
190
ExpoのインダストリーブースでみたAWSが見せる製造業の未来
hamadakoji
0
120
AWS re:Invent 2025で見たGrafana最新機能の紹介
hamadakoji
0
400
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
For a Future-Friendly Web
brad_frost
180
10k
Making Projects Easy
brettharned
120
6.5k
Automating Front-end Workflow
addyosmani
1371
200k
Balancing Empowerment & Direction
lara
5
800
The World Runs on Bad Software
bkeepers
PRO
72
12k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Why Our Code Smells
bkeepers
PRO
340
57k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Transcript
CLEAN ARCHITECTURE NOVIDADES - PRINCÍPIOS - DESIGN - SIMPLICIDADE -
PYTHON
15+ anos Sr System Engineer at Bemobi / Opera github.com/aoqfonseca
@aoqfonseca
ARCHITECTURE
REACT / ANGULAR JS WEBSOCKET JSON NGINX CIRCUS TORNADO /
FLASK / DJANGO MYSQL / MONGO / POSTGRES
None
None
DESIGN PATTERNS
http://www.123rf.com/photo_11204982_conceptual-vector-illustration-adult-businessman-and-question-marks-inside-his-head-choice- problems.html
ARCHITECTURE CLEAN
None
UNCLE BOB
https://en.wikipedia.org/wiki/SOLID_(object-oriented_design) Source: http://team-coder.com/tag/clean-code/
https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean- architecture.html https://8thlight.com/blog/uncle-bob/2011/11/22/Clean- Architecture.html
http://www.electronicbeats.net/the-feed/watch-how-moby-and-david-bowie-describe-the-internet-in-1995/
The WEB is just one of many ways to delivery
Many of ours truths (guide lines) are based on problems
that doesn’t exists anymore.
• Uncoupled • Allow to delay choices and decisions about
using some techies (ex: database, libs, etc) • Easy to evolve (add features, change behaves) • Solution and propose at first view • Domain more important than libs / frameworks
None
# -*- coding: utf-8 -*- import requests def main(word): url
= “http://api.duckduckgo.com/?q={}&format=json&pretty=1” url = url.format(word) response = requests.get(url) # io results = response.json()[‘Results’] # io print results
def build_url(word): url = “http://api.duckduckgo.com/?q={}&format=json” return url.format(word) def find(url): response
= requests.get(url) return response def process_result(response): json = response.json() return json.get(’Results’, []) def main(word): url = build_url(word) response = find(url) print process_result(response)
Listen your TESTS
None
https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html
Use Manager, Repository, etc…. They aren’t forbiden
Model Centralized
Model DATABASE Centralized
None
Python has great data structures and ways to manipulate them.