Python for DevOps : learn ruthlessly effective automation /
Much has changed in technology over the past decade. Data is hot, the cloud is ubiquitous, and many organizations need some form of automation. Throughout these transformations, Python has become one of the most popular languages in the world. This practical resource shows you how to use Python for...
Clasificación: | Libro Electrónico |
---|---|
Autores principales: | , , , |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Sebastopol, CA :
O'Reilly Media,
[2019]
|
Edición: | First edition. |
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Intro; Copyright; Table of Contents; Preface; What Does DevOps Mean to the Authors?; How to Use This Book; Conceptual Topics; Conventions Used in This Book; Using Code Examples; O'Reilly Online Learning; How to Contact Us; Acknowledgments; Noah; Kennedy; Alfredo; Grig; Chapter 1. Python Essentials for DevOps; Installing and Running Python; The Python Shell; Jupyter Notebooks; Procedural Programming; Variables; Basic Math; Comments; Built-in Functions; Print; Range; Execution Control; if/elif/else; for Loops; while Loops; Handling Exceptions; Built-in Objects; What Is an Object?
- Object Methods and AttributesSequences; Functions; Anatomy of a Function; Functions as Objects; Anonymous Functions; Using Regular Expressions; Searching; Character Sets; Character Classes; Groups; Named Groups; Find All; Find Iterator; Substitution; Compiling; Lazy Evaluation; Generators; Generator Comprehensions; More IPython Features; Using IPython to Run Unix Shell Commands; Exercises; Chapter 2. Automating Files and the Filesystem; Reading and Writing Files; Using Regular Expressions to Search Text; Dealing with Large Files; Encrypting Text; Hashing with Hashlib
- Encryption with CryptographyThe os Module; Managing Files and Directories Using os.path; Walking Directory Trees Using os.walk; Paths as Objects with Pathlib; Chapter 3. Working with the Command Line; Working with the Shell; Talking to the Interpreter with the sys Module; Dealing with the Operating System Using the os Module; Spawn Processes with the subprocess Module; Creating Command-Line Tools; Using sys.argv; Using argparse; Using click; fire; Implementing Plug-ins; Case Study: Turbocharging Python with Command-Line Tools; Using the Numba Just-in-Time (JIT) Compiler
- Using the GPU with CUDA PythonRunning True Multicore Multithreaded Python Using Numba; KMeans Clustering; Exercises; Chapter 4. Useful Linux Utilities; Disk Utilities; Measuring Performance; Partitions; Retrieving Specific Device Information; Network Utilities; SSH Tunneling; Benchmarking HTTP with Apache Benchmark (ab); Load Testing with molotov; CPU Utilities; Viewing Processes with htop; Working with Bash and ZSH; Customizing the Python Shell; Recursive Globbing; Searching and Replacing with Confirmation Prompts; Removing Temporary Python Files; Listing and Filtering Processes
- Unix TimestampMixing Python with Bash and ZSH; Random Password Generator; Does My Module Exist?; Changing Directories to a Module's Path; Converting a CSV File to JSON; Python One-Liners; Debuggers; How Fast Is this Snippet?; strace; Exercises; Case Study Question; Chapter 5. Package Management; Why Is Packaging Important?; When Packaging Might Not Be Needed; Packaging Guidelines; Descriptive Versioning; The changelog; Choosing a Strategy; Packaging Solutions; Native Python Packaging; Debian Packaging; RPM Packaging; Management with systemd; Long-Running Processes; Setting It Up