python中用于分布式系统开发的工具包库集合

pykit-bsc的Python项目详细描述


目录

名称

皮基特: python lib的集合,这些lib用于项目s2:storage service 白山云

状态

这个库处于测试阶段。

它在我们的对象存储服务中被大量使用,作为基础 我们的DevOps平台的库。

说明

模块列表

每个模块都有一个README.md

namedescription
argcheckerValidates arguments against the schema
awsAWS error codes and so on
cacheableCache data which access frequently
cachepoolReusable object cache in process
clusterSome helper function for the server in a cluster
daemonizeStart, stop or restart a daemon process
dictutilDictionary helper utility
etcdetcd client
fsutilFile-system Utilities
heapMin heap
httpHTTP/1.1 client
humannumConvert number to human readable number string
jobqProcess serial of input elements with several functions concurrently and sequentially
logutilUtility functions to create logger or make log message
mimeUtility functions to handle mime type
modutilSubmodule Utilities
mysqlconnpoolMysql connection pool with MySQLdb in python
mysqlutilMysql related datatype, operations
netNetwork utility
portlockcross process lock
priorityqueuePriority queue
procUtility to create sub process
rangesetSegmented range.
ratelimiterrate limiter
redisutilFor using redis more easily.
shellSet different command arguments to execute different functions
strutilA collection of helper functions used to manipulate string
threadutilUtility functions for better management of threads
timeutilSupport specify time format output and get current ts, ms, us api etc
utfjsonForce ^{} and ^{} in ^{} encoding
utfyamlForce ^{} and ^{} in ^{} encoding
wsjobdJob daemon based on websocket protocol
zkutilUtility functions for zookeeper

模块依赖性

安装

只需克隆它并将其复制到项目源文件夹中。

cd your_project_folder
git clone https://github.com/baishancloud/pykit.git

用法

from pykit import jobq

def add1(args):
    return args + 1

def printarg(args):
    print args

jobq.run([0, 1, 2], [add1, printarg])
# > 1
# > 2
# > 3

配置

config.md

测试

运行以下任一项测试全部、模块、测试用例或函数。

./script/t
./script/t zkutil
./script/t zkutil.test
./script/t zkutil.test.test_zkutil
./script/t zkutil.test.test_zkutil.TestZKUtil
./script/t zkutil.test.test_zkutil.TestZKUtil.test_lock_id

Details

对于开发者

有几个脚本供开发人员使用。 见script

作者

张艳波(音译)drdr.xp@gmail.com

版权和许可

麻省理工学院许可证(MIT)

版权所有(c)2015张艳波

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带EJB的java JPA:无持久性提供程序   检查数字最后一位的java If语句   java解除对象在字符串池中驻留时的字符串类型分配   java如何在Android中使用堆栈?   java删除字符串中数字之后的任何内容   JAVA 7中消除StringBuilder对象(在循环中运行)最后一个逗号的json方法?   字典将值放入Java*中的映射,而不更新现有值(如果存在)   Java中加法和乘法的基本词法分析器   ExoPlayer2中的java检查视频对象   java向HashMap添加对象   java如何配置JavaMelody以监视C3p0数据源中的Jdbc连接   java“Xlint:unchecked”在Intellij中配置后不工作   悬停时将java滑块元素移出   c如何在SWIG生成的Java绑定中转换为SWIGTYPE_p_void类型?   Ant的java代码未在Maven中运行   字典使用公共键创建两个映射值的映射java   java Tomcat 8元空间OutOfMemory问题