LIVRAISON GARANTIE avant Noël pour vos achats avec Colissimo jusqu'au 20 décembre inclus sur tous les livres indiqués "Expédiés" sous 24h"
Tous nos rayons

Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
Advanced Python Development: Using Powerful Language Features in Real-World Applications
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

Advanced Python Development: Using Powerful Language Features in Real-World Applications

Advanced Python Development: Using Powerful Language Features in Real-World Applications

Matthew Wilkes

605 pages, parution le 25/07/2020

Résumé

This book builds on basic Python tutorials to explain various Python language features that aren't routinely covered: from reusable console scripts that play double duty as micro-services by leveraging entry points, to using asyncio efficiently to collate data from a large number of sources. Along the way, it covers type-hint based linting, low-overhead testing and other automated quality checking to demonstrate a robust real-world development process.
Some powerful aspects of Python are often documented with contrived examples that explain the feature as a standalone example only. By following the design and build of a real-world application example from prototype to production quality you'll see not only how the various pieces of functionality work but how they integrate as part of the larger system design process. In addition, you'll benefit from the kind of useful asides and library recommendations that are a staple of conference Q&A sessions at Python conferences as well as discussions of modern Python best practice and techniques to better produce clear code that is easily maintainable.
Advanced Python Development is intended for developers who can already write simple programs in Python and want to understand when it's appropriate to use new and advanced language features and to do so in a confident manner. It is especially of use to developers looking to progress to a more senior level and to very experienced developers who have thus far used older versions of Python.

What You'll Learn
  • Understand asynchronous programming
  • Examine developing plugin architectures
  • Work with type annotations
  • Review testing techniques
  • Explore packaging and dependency management
Who This Book Is For
Developers at the mid to senior level who already have Python experience.




Chapter 1: Prototyping and Environments Chapter Goal: Create a prototype script to read a single sensor valueNo of pages 25Sub -Topics1 Introduce the example of collating data from a large number of othermachines1.1 Possible usecases of this pattern include log aggregation, servermonitoring, IoT, monitoring of customer servers, etc1.2 We'll use raspberry pis with a mix of server monitoring andvery basic sensors like temperature sensors. There'll be no IoTspecific setup or detail, it's just that this is easier for people tofollow along with without inventing another system beingmonitored.1.3 There'll be plenty of extra context here for how to apply theongoing example if you do already have a system that needsmonitoring.2 Prototyping using jupyter and nbconvert3 Use pipenv to set up dependency environment3.1 Note that by introducing pipenv before setuptools we'repreempting the confusion about the right way to do dependencyand environment management.

Chapter 2: Testing, Checking and LintingChapter Goal: Progress the prototype to a series of reliable functions thatcan be testedNo of pages: 30Sub - Topics1 Testing with PyTest (especially fixtures and MUT style)2 Type hinting and checking with mypy3 Linting with flake8 and autoformatting with black4 pre-commit and commit hooks5 GitHub CI integration for easier contributions
Chapter 3: Packaging ScriptsChapter Goal: Create an installable package that gives a single script toread the sensor valueNo of pages : 30Sub - Topics:1 setup.py and setuptools when it comes to packaging (not pip /setup.py for environment management, that's in chapter 1)2 Namespace packages3 Console entrypoint4 argparseHelpful aside: Package name conflicts, installing from GitHub releases,release hashing, wheels
Chapter 4: From Script to LibraryChapter Goal: Extend the package to allow reading of multiple sensorsthrough the command lineNo of pages: 20Sub - Topics:1. Abstract Base Classes2. Second sensor value3. argparse subcommands
Chapter 5: Alternative InterfacesChapter Goal: Make the script functionality available as a HTTPmicroserviceNo of pages : 40Sub - Topics:1 Simple API servers using flask2 Plugin architecture using entrypoints3 Dynamic dispatch4 Serialisation considerations with custom classes (like units from pintspackage)

Chapter 6: Speeding Things UpChapter Goal: Discuss optimisation strategies, what the tradeoffs betweenasync and different types of caching are. We'll use cachinghere, but async laterNo of pages : 25Sub - Topics:1 asyncio vs lru_cache vs redis vs sqlite etc2 Use of timeit3 File operations using context managers
Chapter 7: Aggregation ProcessChapter Goal: Create a new package, read configuration files, do a basicHTTP loopNo of pages : 25Sub - Topics:1 cookiecutter2 Config files (configparser vs json vs yaml)3 Requests library4 More depth in pytest usage
Chapter 8: Asynchronous ProgrammingChapter Goal: Understand the event loop, especially async for loops,demonstrate how it's a good fit for the aggregation processNo of pages : 40Sub - Topics:1 Defining asynchronous functions2 Using the event loop3 Syntactic sugar for loops and iterators4 Async tasks vs await5 async executors
Chapter 9: Asynchronous DatabasesChapter Goal: Understand async executors, using sqlalchemy and JSONBNo of pages : 30Sub - Topics:1 sqlalchemy (and why pandas isn't a good fit here)2 JSONB format and schemaless3 aiofile, asyncpg and usability/speed tradeoffs
Chapter 10: Viewing the DataChapter Goal: Creating Jupyter notebooks and using matplotlibNo of pages : 35Sub - Topics:1 Calling async functions from Jupyter Notebooks2 Binding function calls to ipywidgets for interactive reports3 Examples of matplotlib4 GeoJSON
Chapter 11: Fault ToleranceChapter Goal: Extending ABC interfaces and efficient use of iterables forlarge HTTP responsesNo of pages : 20Sub - Topics:1 Using __subclasshook__ effectively2 Chunked responses vs framing3 JSON deserialisation of partial data and efficient data transfer

Chapter 12: Callbacks and Data AnalysisChapter Goal: Using generators, iterators and coroutines for dataanalysis, async timeoutsNo of pages : 30Sub - Topics:1 Iterator based filtering2 Coroutine based plugins, for example a coroutine that pulls historicaldata and compares it to the current value to decide if an alarm shouldbe raised3 waitfor and executor timeout considerations

Matthew Wilkes is a European software developer who has worked with Python on web projects for the last fifteen years. As well as developing software, he has long experience in mentoring Python developers in a commercial setting.

He is also very involved in open source software, with commits to many popular

frameworks. His contributions in that space are focused on the details of database and security interactions of web frameworks.


Caractéristiques techniques

  PAPIER
Éditeur(s) Apress
Auteur(s) Matthew Wilkes
Parution 25/07/2020
Nb. de pages 605
EAN13 9781484257920

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav.client@eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription