“batteries included” philosophy
https://docs.djangoproject.com/en/2.2/ref/contrib/
contrib
packages
Django aims to follow Python’s “batteries included” philosophy. It ships with a variety of extra, optional tools that solve common Web-development problems.
This code lives in django/contrib
in the Django distribution. This document gives a rundown of the packages in contrib
, along with any dependencies those packages have.
https://docs.python.org/3/tutorial/stdlib.html#tut-batteries-included
10.12. Batteries Included
Python has a “batteries included” philosophy. This is best seen through the sophisticated and robust capabilities of its larger packages. For example:
The
xmlrpc.client
andxmlrpc.server
modules make implementing remote procedure calls into an almost trivial task. Despite the modules names, no direct knowledge or handling of XML is needed.The
email
package is a library for managing email messages, including MIME and other RFC 2822-based message documents. Unlikesmtplib
andpoplib
which actually send and receive messages, the email package has a complete toolset for building or decoding complex message structures (including attachments) and for implementing internet encoding and header protocols.The
json
package provides robust support for parsing this popular data interchange format. Thecsv
module supports direct reading and writing of files in Comma-Separated Value format, commonly supported by databases and spreadsheets. XML processing is supported by thexml.etree.ElementTree
,xml.dom
andxml.sax
packages. Together, these modules and packages greatly simplify data interchange between Python applications and other tools.The
sqlite3
module is a wrapper for the SQLite database library, providing a persistent database that can be updated and accessed using slightly nonstandard SQL syntax.Internationalization is supported by a number of modules including
gettext
,locale
, and thecodecs
package.
“batteries included” philosophy的更多相关文章
- Brief Tour of the Standard Library
10.1. Operating System Interface The os module provides dozens of functions for interacting with the ...
- Python Tutorial 学习(十)-- Brief Tour of the Standard Library
10.1. Operating System Interface os库 import os os.getcwd() # Return the current working directory 'C ...
- Documentation | AnsibleWorks
Documentation | AnsibleWorks Welcome to the Ansible documentation! Ansible is an IT automation too ...
- Western Subregional of NEERC, Minsk, Wednesday, November 4, 2015 Problem K. UTF-8 Decoder 模拟题
Problem K. UTF-8 Decoder 题目连接: http://opentrains.snarknews.info/~ejudge/team.cgi?SID=c75360ed7f2c702 ...
- xpath scrapy shell
w from scrapy.spider import Spider from scrapy.crawler import CrawlerProcess import pymysql conn = p ...
- 聊聊 Python 的内置电池
本文原创并首发于公众号[Python猫],未经授权,请勿转载. 原文地址:https://mp.weixin.qq.com/s/XzCqoCvcpFJt4A-E4WMqaA (一) 最近,我突然想到一 ...
- python2.7初学(〇)
为什么学习Python Python为我们提供了非常完善的基础代码库,覆盖了网络.文件.GUI.数据库.文本等大量内容,被形象地称作“内置电池(batteries included)”.而且pytho ...
- 用 ElementTree 在 Python 中解析 XML
用 ElementTree 在 Python 中解析 XML 原文: http://eli.thegreenplace.net/2012/03/15/processing-xml-in-python- ...
- 爬虫笔记(四)------关于BeautifulSoup4解析器与编码
前言:本机环境配置:ubuntu 14.10,python 2.7,BeautifulSoup4 一.解析器概述 如同前几章笔记,当我们输入: soup=BeautifulSoup(response. ...
随机推荐
- JavaScript 正则匹配中文,中文符号,空格,全数字,以https:// 开头的url,用于各种场景的输入校验
业务场景1: 密码输入框需要验证输入中文,中文符号,空格等情况,以便于给出错误提示 业务场景2: 输入框只允许输入数字的情况 业务场景3: 输入框允许输入均为数字或以https:// 开头的url的情 ...
- Error:(12, 24) 警告: [deprecation] android.hardware中的Camera已过时.android
问题:android studio编译项目时出现: Error:(12, 24) 警告: [deprecation] android.hardware中的Camera已过时 解决:(只是让其不提示) ...
- java instanceof 判断是否是String
if(formbean.getBean().get("RZZGMCM") instanceof String){ formbean.getBean().put("RZZG ...
- SSRF之利用dict和gopher吊打Redis
SSRF之利用dict和gopher吊打Redis 写在前面 SSRF打Redis也是老生常谈的东西了,这里复现学习一下之前在xz看到某师傅写的关于SSRF利用dict和gopher打内网服务的文章, ...
- Linux 时间同步 05 chrony时间同步
Linux 时间同步 05 chrony时间同步 目录 Linux 时间同步 05 chrony时间同步 chrony 的优势: chrony包介绍 安装chrony 配置与外部时间服务器进行时间同步 ...
- 新建虚拟机ping不通windows主机,windows主机ping不通虚拟机解决办法(图文)
说明: 新建虚拟机和主机互ping不通,因此使用xhell等远程连接工具连接不上 解决办法:配置的时候注意网段 2.修改 /etc/sysconfig/network-scripts/ifcfg- ...
- shellSyntax.md
shell #! /bin/bash 头文件 echo -e 若字符串出现特殊字符,则特别处理 -n 不要在最后自动换行 ./filename.sh sh filename.sh r ...
- navicat for mysql 破解版
Navicat for MySQL下载地址:Navicat for MySQL 软件和破解程序 第1步.安装Navicat软件,最后点击完成 第2步.安装成功之后还要进行破解.点击patchNavic ...
- 废弃fastjson!大型项目迁移Gson保姆级攻略
前言 大家好,又双叒叕见面了,我是天天放大家鸽子的蛮三刀. 在被大家取关之前,我立下一个"远大的理想",一定要在这周更新文章.现在看来,flag有用了... 本篇文章是我这一个多月 ...
- HBase的架构设计为什么这么厉害!
老刘是一名即将找工作的研二学生,写博客一方面是复习总结大数据开发的知识点,一方面是希望能够帮助和自己一样自学编程的伙伴.由于老刘是自学大数据开发,博客中肯定会存在一些不足,还希望大家能够批评指正,让我 ...