资源简介
Python requests模块
代码片段和文件信息
#!/usr/bin/env python
import os
import re
import sys
from codecs import open
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [(‘pytest-args=‘ ‘a‘ “Arguments to pass into py.test“)]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
if sys.argv[-1] == ‘publish‘:
os.system(‘python setup.py sdist upload‘)
sys.exit()
packages = [
‘requests‘
‘requests.packages‘
‘requests.packages.chardet‘
‘requests.packages.idna‘
‘requests.packages.urllib3‘
‘requests.packages.urllib3.packages‘
‘requests.packages.urllib3.contrib‘
‘requests.packages.urllib3.util‘
‘requests.packages.urllib3.packages.ssl_match_hostname‘
‘requests.packages.urllib3.packages.backports‘
]
requires = []
test_requirements = [‘pytest>=2.8.0‘ ‘pytest-httpbin==0.0.7‘ ‘pytest-cov‘]
with open(‘requests/__init__.py‘ ‘r‘) as fd:
version = re.search(r‘^__version__\s*=\s*[\‘“]([^\‘“]*)[\‘“]‘
fd.read() re.MULTILINE).group(1)
if not version:
raise RuntimeError(‘Cannot find version information‘)
with open(‘README.rst‘ ‘r‘ ‘utf-8‘) as f:
readme = f.read()
with open(‘HISTORY.rst‘ ‘r‘ ‘utf-8‘) as f:
history = f.read()
setup(
name=‘requests‘
version=version
description=‘Python HTTP for Humans.‘
long_description=readme + ‘\n\n‘ + history
author=‘Kenneth Reitz‘
author_email=‘me@kennethreitz.com‘
url=‘http://python-requests.org‘
packages=packages
package_data={‘‘: [‘LICENSE‘ ‘NOTICE‘] ‘requests‘: [‘*.pem‘]}
package_dir={‘requests‘: ‘requests‘}
include_package_data=True
install_requires=requires
license=‘Apache 2.0‘
zip_safe=False
classifiers=(
‘Development Status :: 5 - Production/Stable‘
‘Intended Audience :: Developers‘
‘Natural Language :: English‘
‘License :: OSI Approved :: Apache Software License‘
‘Programming Language :: Python‘
‘Programming Language :: Python :: 2.6‘
‘Programming Language :: Python :: 2.7‘
‘Programming Language :: Python :: 3‘
‘Programming Language :: Python :: 3.3‘
‘Programming Language :: Python :: 3.4‘
‘Programming Language :: Python :: 3.5‘
‘Programming Language :: Python :: Implementation :: CPython‘
‘Programming Language :: Python :: Implementation :: PyPy‘
)
cmdclass={‘test‘: PyTest}
tests_require=test_requirements
extras_require={
‘security‘: [‘pyOpenSSL>=0.14‘ ‘cryptography>=1.3.4‘ ‘idna>=2.0.0‘]
‘socks‘: [‘PySocks>=1.5.6 !=1.5.7‘]
}
)
相关资源
- 二级考试python试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
- 一个简单的python爬虫
- csv文件行列转换python实现代码
- Python操作Mysql教程手册
- Python Machine Learning Case Studies
- python获取硬件信息
评论
共有 条评论