Twisted Documentation Release 21.7.0.Post0

Total Page:16

File Type:pdf, Size:1020Kb

Twisted Documentation Release 21.7.0.Post0 Twisted Documentation Release 21.7.0.post0 Twisted Matrix Labs Aug 11, 2021 CONTENTS 1 Installing Twisted 3 1.1 Installing Optional Dependencies....................................3 2 Twisted Core 5 2.1 Developer Guides............................................5 2.2 Examples................................................. 321 2.3 Specifications............................................... 323 2.4 Development of Twisted......................................... 326 3 Twisted Conch (SSH and Telnet) 369 3.1 Developer Guides............................................ 369 3.2 Examples................................................. 377 4 Twisted Mail (SMTP, POP, and IMAP) 379 4.1 Examples................................................. 379 4.2 Developer Guides............................................ 379 4.3 Twisted Mail Tutorial: Building an SMTP Client from Scratch..................... 382 5 Twisted Names (DNS) 393 5.1 Developer Guides............................................ 393 5.2 Examples................................................. 403 6 Twisted Pair 405 6.1 Developer Guides............................................ 405 6.2 Examples................................................. 407 7 Twisted Web 409 7.1 Developer Guides............................................ 409 7.2 Examples................................................. 483 8 Twisted Words (IRC and XMPP) 485 8.1 Developer Guides............................................ 485 8.2 Examples................................................. 490 9 API Reference 491 10 Historical Documents 493 10.1 Twisted Core 14.0.2 (2014-09-18).................................... 493 10.2 Twisted Conch 14.0.2 (2014-09-18)................................... 493 10.3 Twisted Lore 14.0.2 (2014-09-18).................................... 493 10.4 Twisted Mail 14.0.2 (2014-09-18).................................... 493 i 10.5 Twisted Names 14.0.2 (2014-09-18)................................... 493 10.6 Twisted News 14.0.2 (2014-09-18)................................... 493 10.7 Twisted Pair 14.0.2 (2014-09-18).................................... 494 10.8 Twisted Runner 14.0.2 (2014-09-18).................................. 494 10.9 Twisted Web 14.0.2 (2014-09-18).................................... 494 10.10 Twisted Words 14.0.2 (2014-09-18)................................... 494 10.11 Twisted Core 14.0.1 (2014-09-17).................................... 494 10.12 Twisted Conch 14.0.1 (2014-09-17)................................... 494 10.13 Twisted Lore 14.0.1 (2014-09-17).................................... 494 10.14 Twisted Mail 14.0.1 (2014-09-17).................................... 494 10.15 Twisted Names 14.0.1 (2014-09-17)................................... 495 10.16 Twisted News 14.0.1 (2014-09-17)................................... 495 10.17 Twisted Pair 14.0.1 (2014-09-17).................................... 495 10.18 Twisted Runner 14.0.1 (2014-09-17).................................. 495 10.19 Twisted Web 14.0.1 (2014-09-17).................................... 495 10.20 Twisted Words 14.0.1 (2014-09-17)................................... 495 10.21 Twisted Core 14.0.0 (2014-05-08).................................... 495 10.22 Twisted Conch 14.0.0 (2014-05-08)................................... 497 10.23 Twisted Lore 14.0.0 (2014-05-08).................................... 498 10.24 Twisted Mail 14.0.0 (2014-05-08).................................... 498 10.25 Twisted Names 14.0.0 (2014-05-08)................................... 498 10.26 Twisted News 14.0.0 (2014-05-08)................................... 499 10.27 Twisted Pair 14.0.0 (2014-05-08).................................... 499 10.28 Twisted Runner 14.0.0 (2014-05-08).................................. 500 10.29 Twisted Web 14.0.0 (2014-05-08).................................... 500 10.30 Twisted Words 14.0.0 (2014-05-08)................................... 500 10.31 Twisted Core 13.2.0 (2013-10-29).................................... 501 10.32 Twisted Conch 13.2.0 (2013-10-29)................................... 502 10.33 Twisted Lore 13.2.0 (2013-10-29).................................... 502 10.34 Twisted Mail 13.2.0 (2013-10-29).................................... 503 10.35 Twisted Names 13.2.0 (2013-10-29)................................... 503 10.36 Twisted News 13.2.0 (2013-10-29)................................... 504 10.37 Twisted Pair 13.2.0 (2013-10-29).................................... 504 10.38 Twisted Runner 13.2.0 (2013-10-29).................................. 504 10.39 Twisted Web 13.2.0 (2013-10-29).................................... 504 10.40 Twisted Words 13.2.0 (2013-10-29)................................... 505 10.41 Twisted Core 13.1.0 (2013-06-23).................................... 505 10.42 Twisted Conch 13.1.0 (2013-06-23)................................... 506 10.43 Twisted Lore 13.1.0 (2013-06-23).................................... 507 10.44 Twisted Mail 13.1.0 (2013-06-23).................................... 507 10.45 Twisted Names 13.1.0 (2013-06-23)................................... 507 10.46 Twisted News 13.1.0 (2013-06-23)................................... 507 10.47 Twisted Pair 13.1.0 (2013-06-23).................................... 508 10.48 Twisted Runner 13.1.0 (2013-06-23).................................. 508 10.49 Twisted Web 13.1.0 (2013-06-23).................................... 508 10.50 Twisted Words 13.1.0 (2013-06-23)................................... 509 10.51 Twisted Core 13.0.0 (2013-03-19).................................... 509 10.52 Twisted Conch 13.0.0 (2013-03-19)................................... 510 10.53 Twisted Lore 13.0.0 (2013-03-19).................................... 510 10.54 Twisted Mail 13.0.0 (2013-03-19).................................... 511 10.55 Twisted Names 13.0.0 (2013-03-19)................................... 511 10.56 Twisted News 13.0.0 (2013-03-19)................................... 512 10.57 Twisted Pair 13.0.0 (2013-03-19).................................... 512 10.58 Twisted Runner 13.0.0 (2013-03-19).................................. 512 ii 10.59 Twisted Web 13.0.0 (2013-03-19).................................... 512 10.60 Twisted Words 13.0.0 (2013-03-19)................................... 512 10.61 Twisted Core 12.3.0 (2012-12-20).................................... 513 10.62 Twisted Conch 12.3.0 (2012-12-20)................................... 514 10.63 Twisted Lore 12.3.0 (2012-12-20).................................... 515 10.64 Twisted Mail 12.3.0 (2012-12-20).................................... 515 10.65 Twisted Names 12.3.0 (2012-12-20)................................... 515 10.66 Twisted News 12.3.0 (2012-12-20)................................... 516 10.67 Twisted Pair 12.3.0 (2012-12-20).................................... 516 10.68 Twisted Runner 12.3.0 (2012-12-20).................................. 516 10.69 Twisted Web 12.3.0 (2012-12-20).................................... 516 10.70 Twisted Words 12.3.0 (2012-12-20)................................... 517 10.71 Twisted Core 12.2.0 (2012-08-26).................................... 517 10.72 Twisted Conch 12.2.0 (2012-08-26)................................... 518 10.73 Twisted Lore 12.2.0 (2012-08-26).................................... 519 10.74 Twisted Mail 12.2.0 (2012-08-26).................................... 519 10.75 Twisted Names 12.2.0 (2012-08-26)................................... 519 10.76 Twisted News 12.2.0 (2012-08-26)................................... 519 10.77 Twisted Pair 12.2.0 (2012-08-26).................................... 520 10.78 Twisted Runner 12.2.0 (2012-08-26).................................. 520 10.79 Twisted Web 12.2.0 (2012-08-26).................................... 520 10.80 Twisted Words 12.2.0 (2012-08-26)................................... 520 10.81 Twisted Core 12.1.0 (2012-06-02).................................... 520 10.82 Twisted Conch 12.1.0 (2012-06-02)................................... 522 10.83 Twisted Lore 12.1.0 (2012-06-02).................................... 523 10.84 Twisted Mail 12.1.0 (2012-06-02).................................... 523 10.85 Twisted Names 12.1.0 (2012-06-02)................................... 523 10.86 Twisted News 12.1.0 (2012-06-02)................................... 524 10.87 Twisted Pair 12.1.0 (2012-06-02).................................... 524 10.88 Twisted Runner 12.1.0 (2012-06-02).................................. 524 10.89 Twisted Web 12.1.0 (2012-06-02).................................... 524 10.90 Twisted Words 12.1.0 (2012-06-02)................................... 525 10.91 Twisted Core 12.0.0 (2012-02-10).................................... 525 10.92 Twisted Conch 12.0.0 (2012-02-10)................................... 526 10.93 Twisted Lore 12.0.0 (2012-02-10).................................... 527 10.94 Twisted Mail 12.0.0 (2012-02-10).................................... 527 10.95 Twisted Names 12.0.0 (2012-02-10)................................... 527 10.96 Twisted News 12.0.0 (2012-02-10)................................... 527 10.97 Twisted Pair 12.0.0 (2012-02-10).................................... 527 10.98 Twisted Runner 12.0.0 (2012-02-10).................................. 527 10.99 Twisted Web 12.0.0 (2012-02-10).................................... 528 10.100Twisted Words 12.0.0 (2012-02-10)................................... 528 10.101Twisted Core 11.1.0 (2011-11-15).................................... 528 10.102Twisted Conch 11.1.0 (2011-11-15)..................................
Recommended publications
  • Build It with Nitrogen the Fast-Off-The-Block Erlang Web Framework
    Build it with Nitrogen The fast-off-the-block Erlang web framework Lloyd R. Prentice & Jesse Gumm dedicated to: Laurie, love of my life— Lloyd Jackie, my best half — Jesse and to: Rusty Klophaus and other giants of Open Source— LRP & JG Contents I. Frying Pan to Fire5 1. You want me to build what?7 2. Enter the lion’s den9 2.1. The big picture........................ 10 2.2. Install Nitrogen........................ 11 2.3. Lay of the land........................ 13 II. Projects 19 3. nitroBoard I 21 3.1. Plan of attack......................... 21 3.2. Create a new project..................... 23 3.3. Prototype welcome page................... 27 3.4. Anatomy of a page...................... 30 3.5. Anatomy of a route...................... 33 3.6. Anatomy of a template.................... 34 3.7. Elements............................ 35 3.8. Actions............................. 38 3.9. Triggers and Targets..................... 39 3.10. Enough theory........................ 40 i 3.11. Visitors............................ 44 3.12. Styling............................. 64 3.13. Debugging........................... 66 3.14. What you’ve learned..................... 66 3.15. Think and do......................... 68 4. nitroBoard II 69 4.1. Plan of attack......................... 69 4.2. Associates........................... 70 4.3. I am in/I am out....................... 78 4.4. Styling............................. 81 4.5. What you’ve learned..................... 82 4.6. Think and do......................... 82 5. A Simple Login System 83 5.1. Getting Started........................ 83 5.2. Dependencies......................... 84 5.2.1. Rebar Dependency: erlpass ............. 84 5.3. The index page........................ 85 5.4. Creating an account..................... 87 5.4.1. db_login module................... 89 5.5. The login form........................ 91 5.5.1.
    [Show full text]
  • Making Story from System Logs with Elastic Stack
    SANOG36 18 - 21 January, 2021 Making story from system logs with stack [email protected] https://imtiazrahman.com https://github.com/imtiazrahman Logs syslog Audit SNMP NETFLOW http METRIC DNS ids What is Elastic Stack ? Store, Analyze Ingest User Interface a full-text based, distributed NoSQL database. Written in Java, built on Apache Lucene Commonly used for log analytics, full-text search, security intelligence, business analytics, and operational intelligence use cases. Use REST API (GET, PUT, POST, and DELETE ) for storing and searching data Data is stored as documents (rows in relational database) Data is separated into fields (columns in relational database) Relational Database Elasticsearch Database Index Table Type Row/Record Document Column Name Field Terminology Cluster: A cluster consists of one or more nodes which share the same cluster name. Node: A node is a running instance of elasticsearch which belongs to a cluster. Terminology Index: Collection of documents Shard: An index is split into elements known as shards that are distributed across multiple nodes. There are two types of shard, Primary and replica. By default elasticsearch creates 1 primary shard and 1 replica shard for each index. Terminology Shard 1 Replica 1 Replica 2 Shard 2 Node 1 Node 2 cluster Terminology Documents { • Indices hold documents in "_index": "netflow-2020.10.08", "_type": "_doc", serialized JSON objects "_id": "ZwkiB3UBULotwSOX3Bdb", "_version": 1, • 1 document = 1 log entry "_score": null, "_source": { • Contains "field : value" pairs
    [Show full text]
  • Learning Javascript Design Patterns
    Learning JavaScript Design Patterns Addy Osmani Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Learning JavaScript Design Patterns by Addy Osmani Copyright © 2012 Addy Osmani. All rights reserved. Revision History for the : 2012-05-01 Early release revision 1 See http://oreilly.com/catalog/errata.csp?isbn=9781449331818 for release details. ISBN: 978-1-449-33181-8 1335906805 Table of Contents Preface ..................................................................... ix 1. Introduction ........................................................... 1 2. What is a Pattern? ...................................................... 3 We already use patterns everyday 4 3. 'Pattern'-ity Testing, Proto-Patterns & The Rule Of Three ...................... 7 4. The Structure Of A Design Pattern ......................................... 9 5. Writing Design Patterns ................................................. 11 6. Anti-Patterns ......................................................... 13 7. Categories Of Design Pattern ............................................ 15 Creational Design Patterns 15 Structural Design Patterns 16 Behavioral Design Patterns 16 8. Design Pattern Categorization ........................................... 17 A brief note on classes 17 9. JavaScript Design Patterns .............................................. 21 The Creational Pattern 22 The Constructor Pattern 23 Basic Constructors 23 Constructors With Prototypes 24 The Singleton Pattern 24 The Module Pattern 27 iii Modules 27 Object Literals 27 The Module Pattern
    [Show full text]
  • Zope Documentation Release 5.3
    Zope Documentation Release 5.3 The Zope developer community Jul 31, 2021 Contents 1 What’s new in Zope 3 1.1 What’s new in Zope 5..........................................4 1.2 What’s new in Zope 4..........................................4 2 Installing Zope 11 2.1 Prerequisites............................................... 11 2.2 Installing Zope with zc.buildout .................................. 12 2.3 Installing Zope with pip ........................................ 13 2.4 Building the documentation with Sphinx ............................... 14 3 Configuring and Running Zope 15 3.1 Creating a Zope instance......................................... 16 3.2 Filesystem Permissions......................................... 17 3.3 Configuring Zope............................................. 17 3.4 Running Zope.............................................. 18 3.5 Running Zope (plone.recipe.zope2instance install)........................... 20 3.6 Logging In To Zope........................................... 21 3.7 Special access user accounts....................................... 22 3.8 Troubleshooting............................................. 22 3.9 Using alternative WSGI server software................................. 22 3.10 Debugging Zope applications under WSGI............................... 26 3.11 Zope configuration reference....................................... 27 4 Migrating between Zope versions 37 4.1 From Zope 2 to Zope 4 or 5....................................... 37 4.2 Migration from Zope 4 to Zope 5.0..................................
    [Show full text]
  • A Sense of Time for Node.Js: Timeouts As a Cure for Event Handler Poisoning
    A Sense of Time for Node.js: Timeouts as a Cure for Event Handler Poisoning Anonymous Abstract—The software development community has begun to new Denial of Service attack that can be used against EDA- adopt the Event-Driven Architecture (EDA) to provide scalable based services. Our Event Handler Poisoning attack exploits web services. Though the Event-Driven Architecture can offer the most important limited resource in the EDA: the Event better scalability than the One Thread Per Client Architecture, Handlers themselves. its use exposes service providers to a Denial of Service attack that we call Event Handler Poisoning (EHP). The source of the EDA’s scalability is also its Achilles’ heel. Multiplexing unrelated work onto the same thread re- This work is the first to define EHP attacks. After examining EHP vulnerabilities in the popular Node.js EDA framework and duces overhead, but it also moves the burden of time sharing open-source npm modules, we explore various solutions to EHP- out of the thread library or operating system and into the safety. For a practical defense against EHP attacks, we propose application itself. Where OTPCA-based services can rely on Node.cure, which defends a large class of Node.js applications preemptive multitasking to ensure that resources are shared against all known EHP attacks by making timeouts a first-class fairly, using the EDA requires the service to enforce its own member of the JavaScript language and the Node.js framework. cooperative multitasking [89]. An EHP attack identifies a way to defeat the cooperative multitasking used by an EDA-based Our evaluation shows that Node.cure is effective, broadly applicable, and offers strong security guarantees.
    [Show full text]
  • ELK: a Log Files Management Framework
    ELK: a log files management framework Giovanni Bechis <[email protected]> LinuxCon Europe 2016 About Me I sys admin and developer @SNB I OpenBSD developer I Open Source developer in several other projects searching through log files, the old way $ man 1 pflogsumm $ grep [email protected] /var/log/maillog | awk '{print $1 "-" $2 "-" $3;}' $ grep -e 'from=.*@gmail\.com' /var/log/maillog | grep "550" \ | awk {'print $1 "-" $2 "-" $3 " " $7 " " $10 " " $11 " " $13;}' $ vi logparser.sh $ git clone https://github.com/random/parser_that_should_work $ man 1 perltoc $ man 1 python searching through log files, the old way $ cssh -a 'mylogparser.py' host1 host2 host3 host4 | tee -a /tmp/parsedlogs.txt $ man syslogd(8) searching through log files, the new way ELK open source components I Beats: collect, parse and ship I Logstash: collect, enrich and transport data I Elasticsearch: search and analyze data in real time I Kibana: explore and visualize your data ELK closed source components I Watcher: alerting for Elasticsearch I Shield: security for Elasticsearch I Marvel: monitor Elasticsearch I Graph: analyze relationships Elasticsearch I open source search engine based on lucene library I nosql database (document oriented) I queries are based on http/json I APIs for lot of common languages, (or you can write your own framework, is just plain http and json) Elasticsearch: security I not available in open source version, you need Shield I Elasticsearch should not be exposed on the wild, use firewalling to protect your instances I manage security on your
    [Show full text]
  • Overview Guide Release 21B F45060-01
    Oracle Utilities Customer Care and Billing Cloud Service Overview Guide Release 21B F45060-01 August 2021 Oracle Utilities Customer Care and Billing Cloud Service Release 21B Overview Guide Copyright © 2012, 2021 Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation"
    [Show full text]
  • Industrial Ethernet Quick and Simple Explanation of Key Terms
    Industrial Ethernet Quick and simple explanation of key terms EN_Bro_Glossar_Netzwerktechnik_A6_Rev02.indd 1 26.05.14 15:26 Industrial Ethernet The use of industrial Ethernet communication offers many advantages and is becoming more common in the automation of production plants and machinery. Many new technical terms from the IT world are also being used in this context among industrial users. In this glossary, we have listed and explained the main techni- cal terms from the field of Industrial Ethernet – we make Ethernet easy. 2 PHOENIX CONTACT EN_Bro_Glossar_Netzwerktechnik_A6_Rev02.indd 2 26.05.14 15:26 Table of contents Glossary Pages 04 – 45 IEEE standards Pages 46 – 47 PHOENIX CONTACT 3 EN_Bro_Glossar_Netzwerktechnik_A6_Rev02.indd 3 26.05.14 15:26 Industrial Ethernet 10Base-T Standard for data transmission of 10 Mbps Ethernet using unshielded twisted pair cables (Category 3, 4 or 5). 100Base-FX Standard for data transmission of 100 Mbps Ethernet using fiber optic cables. 100Base-TX Standard for data transmission of 100 Mbps Ethernet using twisted pair cables (Category 5). Each connection is established via two wire pairs, one wire pair for “transmit data” and the other for “receive data”. 100Base-T Fast Ethernet; 100Base-T has been officially elevated to an IEEE standard as ITU 802.3u. This standard is essentially based on technologies for 10Base-T, the Ethernet version for twisted pair cables. There are several versions of 100Base-T, which differ with respect to the physical layer and therefore the transmission media: 100Base-TX, 100Base-T2, 100Base-T4, and 100Base-FX. With this method, the MAC level and therefore the conventional CSMA/CD access method are retained at a transmission speed of 100 Mbps.
    [Show full text]
  • Python Guide Documentation 0.0.1
    Python Guide Documentation 0.0.1 Kenneth Reitz 2015 11 07 Contents 1 3 1.1......................................................3 1.2 Python..................................................5 1.3 Mac OS XPython.............................................5 1.4 WindowsPython.............................................6 1.5 LinuxPython...............................................8 2 9 2.1......................................................9 2.2...................................................... 15 2.3...................................................... 24 2.4...................................................... 25 2.5...................................................... 27 2.6 Logging.................................................. 31 2.7...................................................... 34 2.8...................................................... 37 3 / 39 3.1...................................................... 39 3.2 Web................................................... 40 3.3 HTML.................................................. 47 3.4...................................................... 48 3.5 GUI.................................................... 49 3.6...................................................... 51 3.7...................................................... 52 3.8...................................................... 53 3.9...................................................... 58 3.10...................................................... 59 3.11...................................................... 62
    [Show full text]
  • FULLTEXT01.Pdf
    UPTEC F 18029 Examensarbete 30 hp Juni 2018 Investigation and Implementation of a Log Management and Analysis Framework for the Treatment Planning System RayStation Elias Norrby Abstract Investigation and Implementation of a Log Management and Analysis Framework for the Treatment Planning System RayStation Elias Norrby Teknisk- naturvetenskaplig fakultet UTH-enheten The purpose of this thesis is to investigate and implement a framework for log management and analysis tailored to the treatment planning system (TPS) Besöksadress: RayStation. A TPS is a highly advanced software package used in radiation Ångströmlaboratoriet Lägerhyddsvägen 1 oncology clinics, and the complexity of the software makes writing robust code Hus 4, Plan 0 challenging. Although the product is tested rigorously during development, bugs are present in released software. The purpose of the the framework is to allow the Postadress: RayStation development team insight into errors encountered in clinics by Box 536 751 21 Uppsala centralizing log file data recorded at clinics around the world. Telefon: A framework based on the Elastic stack, a suite of open-source products, is 018 – 471 30 03 proposed, addressing a set of known issues described as the access problem, the Telefax: processing problem, and the analysis problem. Firstly, log files are stored locally on 018 – 471 30 00 each machine running RayStation, some of which may not be connected to the Internet. Gaining access to the data is further complicated by legal frameworks Hemsida: such as HIPAA and GDPR that put constraints on how clinic data can be handled. http://www.teknat.uu.se/student The framework allows for access to the files while respecting these constraints.
    [Show full text]
  • Node.Js: Building for Scalability with Server-Side Javascript
    #141 CONTENTS INCLUDE: n What is Node? Node.js: Building for Scalability n Where does Node fit? n Installation n Quick Start with Server-Side JavaScript n Node Ecosystem n Node API Guide and more... By Todd Eichel Visit refcardz.com Consider a food vending WHAT IS NODE? truck on a city street or at a festival. A food truck In its simplest form, Node is a set of libraries for writing high- operating like a traditional performance, scalable network programs in JavaScript. Take a synchronous web server look at this application that will respond with the text “Hello would have a worker take world!” on every HTTP request: an order from the first customer in line, and then // require the HTTP module so we can create a server object the worker would go off to var http = require(‘http’); prepare the order while the customer waits at the window. Once Get More Refcardz! Refcardz! Get More // Create an HTTP server, passing a callback function to be the order is complete, the worker would return to the window, // executed on each request. The callback function will be give it to the customer, and take the next customer’s order. // passed two objects representing the incoming HTTP // request and our response. Contrast this with a food truck operating like an asynchronous var helloServer = http.createServer(function (req, res) { web server. The workers in this truck would take an order from // send back the response headers with an HTTP status the first customer in line, issue that customer an order number, // code of 200 and an HTTP header for the content type res.writeHead(200, {‘Content-Type’: ‘text/plain’}); and have the customer stand off to the side to wait while the order is prepared.
    [Show full text]
  • Download Slide (PDF Document)
    When Django is too bloated Specialized Web-Applications with Werkzeug EuroPython 2017 – Rimini, Italy Niklas Meinzer @NiklasMM Gotthard Base Tunnel Photographer: Patrick Neumann Python is amazing for web developers! ● Bottle ● BlueBream ● CherryPy ● CubicWeb ● Grok ● Nagare ● Pyjs ● Pylons ● TACTIC ● Tornado ● TurboGears ● web2py ● Webware ● Zope 2 Why would I want to use less? ● Learn how stuff works Why would I want to use less? ● Avoid over-engineering – Wastes time and resources – Makes updates harder – It’s a security risk. Why would I want to use less? ● You want to do something very specific ● Plan, manage and document chemotherapy treatments ● Built with modern web technology ● Used by hospitals in three European countries Patient Data Lab Data HL7 REST Pharmacy System Database Printers Werkzeug = German for “tool” ● Developed by pocoo team @ pocoo.org – Flask, Sphinx, Jinja2 ● A “WSGI utility” ● Very lightweight ● No ORM, No templating engine, etc ● The basis of Flask and others Werkzeug Features Overview ● WSGI – WSGI 1.0 compatible, WSGI Helpers ● Wrapping of requests and responses ● HTTP Utilities – Header processing, form data parsing, cookies ● Unicode support ● URL routing system ● Testing tools – Testclient, Environment builder ● Interactive Debugger in the Browser A simple Application A simple Application URL Routing Middlewares ● Separate parts of the Application as wsgi apps ● Combine as needed Request Static files DB Part of Application conn with DB access User Dispatcher auth Part of Application without DB access Response HTTP Utilities ● Work with HTTP dates ● Read and dump cookies ● Parse form data Using the test client Using the test client - pytest fixtures Using the test client - pytest fixtures Interactive debugger in the Browser Endless possibilities ● Connect to a database with SQLalchemy ● Use Jinja2 to render documents ● Use Celery to schedule asynchronous tasks ● Talk to 3rd party APIs with requests ● Make syscalls ● Remote control a robot to perform tasks at home Thank you! @NiklasMM NiklasMM Photographer: Patrick Neumann.
    [Show full text]