table of contents - deploy python · jenkins..... 377 gocd 5.8 configuration management..... 379...

6

Upload: others

Post on 29-Jun-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Table of Contents - Deploy Python · Jenkins..... 377 GoCD 5.8 Configuration management..... 379 Ansible..... 381
Page 2: Table of Contents - Deploy Python · Jenkins..... 377 GoCD 5.8 Configuration management..... 379 Ansible..... 381

Table of Contents1. Introduction........................................ 8

1.1 Learning Programming............................ 8The Python Language............................ 12Why Use Python?................................ 16Python 2 or 3?................................. 19Enterprise Python.............................. 23

1.2 Python Community............................... 27Companies Using Python......................... 31Best Python Resources.......................... 34Must-watch Python Videos....................... 39Podcasts....................................... 42

2. Development Environments........................... 482.1 Text Editors and IDEs.......................... 51

Vim............................................ 55Emacs.......................................... 61Sublime Text................................... 65PyCharm........................................ 69Jupyter Notebook............................... 70

2.2 Shells......................................... 74Bourne-again shell (Bash)...................... 75Zsh............................................ 77PowerShell..................................... 78

2.3 Terminal multiplexers.......................... 79tmux........................................... 81Screen......................................... 82

2.4 Environment configuration...................... 83Application dependencies....................... 84virtual environments (virtualenvs)............. 90Localhost tunnels.............................. 91

2.5 Source Control................................. 91Git............................................ 97Mercurial..................................... 103

3. Data.............................................. 1053.1 Relational databases.......................... 108

Full Stack Python: April 2019 Edition

2

Page 3: Table of Contents - Deploy Python · Jenkins..... 377 GoCD 5.8 Configuration management..... 379 Ansible..... 381

PostgreSQL.................................... 114MySQL......................................... 120SQLite........................................ 124

3.2 Object-relational mappers..................... 128SQLAlchemy.................................... 135Peewee........................................ 140Django ORM.................................... 143Pony ORM...................................... 146

3.3 NoSQL......................................... 147Redis......................................... 152MongoDB....................................... 155Apache Cassandra.............................. 158Neo4j......................................... 162

3.4 Data analysis................................. 163pandas........................................ 166SciPy & NumPy................................. 168

3.5 Data visualization............................ 171Bokeh......................................... 173d3.js......................................... 176Matplotlib.................................... 178

3.6 Markup Languages.............................. 179Markdown...................................... 180reStructuredText.............................. 182

4. Web Development................................... 1844.1 Web Frameworks................................ 187

Django........................................ 191Flask......................................... 199Bottle........................................ 206Pyramid....................................... 209Falcon........................................ 214Morepath...................................... 215Sanic......................................... 217Other web frameworks.......................... 219

4.2 Template Engines.............................. 221Jinja2........................................ 225Mako.......................................... 227

Full Stack Python: April 2019 Edition

3

Page 4: Table of Contents - Deploy Python · Jenkins..... 377 GoCD 5.8 Configuration management..... 379 Ansible..... 381

Django Templates.............................. 2284.3 Web design.................................... 229

HTML.......................................... 232CSS........................................... 233Responsive Design............................. 239Minification.................................. 240

4.4 CSS Frameworks................................ 241Bootstrap..................................... 242Foundation.................................... 243

4.5 JavaScript.................................... 243React......................................... 246Vue.js........................................ 248Angular....................................... 250

4.6 Task queues................................... 250Celery........................................ 255Redis Queue (RQ).............................. 259Dramatiq...................................... 261

4.7 Static site generators........................ 261Pelican....................................... 267Lektor........................................ 269MkDocs........................................ 271

4.8 Testing....................................... 272Unit testing.................................. 276Integration testing........................... 279Debugging..................................... 280Code Metrics.................................. 282

4.9 Networking.................................... 285HTTPS......................................... 286WebSockets.................................... 287WebRTC........................................ 294

4.10 Web APIs..................................... 296Microservices................................ 299Webhooks..................................... 302Bots......................................... 302

4.11 API creation................................. 305API Frameworks............................... 310

Full Stack Python: April 2019 Edition

4

Page 5: Table of Contents - Deploy Python · Jenkins..... 377 GoCD 5.8 Configuration management..... 379 Ansible..... 381

Django REST Framework........................ 3104.12 API integration.............................. 312

Twilio....................................... 314Stripe....................................... 316Slack........................................ 317Okta......................................... 319

4.13 Web application security..................... 320SQL injection................................ 324Cross Site Request Forgery................... 325

5. Web App Deployment................................ 3275.1 Hosting....................................... 331

Servers....................................... 332Static content................................ 335Content Delivery Networks..................... 337

5.2 Virtual Private Servers (VPS)................. 338Linode........................................ 339DigitalOcean.................................. 339Lightsail..................................... 340

5.3 Platform-as-a-Service......................... 340Heroku........................................ 345PythonAnywhere................................ 346AWS Codestar.................................. 346

5.4 Operating systems............................. 346Ubuntu Linux.................................. 351macOS......................................... 353FreeBSDWindows....................................... 353

5.5 Web servers................................... 354Apache HTTP Server............................ 358Nginx......................................... 359Caddy......................................... 363

5.6 WSGI servers.................................. 364Green Unicorn................................. 369uWSGI......................................... 372mod_wsgi

5.7 Continuous integration........................ 372

Full Stack Python: April 2019 Edition

5

Page 6: Table of Contents - Deploy Python · Jenkins..... 377 GoCD 5.8 Configuration management..... 379 Ansible..... 381

Jenkins....................................... 377GoCD

5.8 Configuration management...................... 379Ansible....................................... 381Salt

5.9 Containers.................................... 383Docker........................................ 385Kubernetes.................................... 389

5.10 Serverless Architectures..................... 391AWS Lambda................................... 396Azure Functions.............................. 399Google Cloud Functions....................... 400

6. DevOps............................................ 4036.1 Monitoring.................................... 405

Prometheus.................................... 409Rollbar....................................... 410SentryScout

6.2 Web App Performance........................... 410Logging....................................... 413Caching....................................... 412Web Analytics................................. 417

7. MetaAbout the author.................................. 422What "full stack" means........................... 422

Full Stack Python: April 2019 Edition

6