Skip to main content

Table of Content

Name

pykit: A collection of python libs those are used in project s2: Storage-Service at baishancloud.com

Status

This library is in beta phase.

It has been used heavily in our object storage service, as a foundamental library of our devops platform.

Description

Module List

There is a README.md for each module.

name description
argchecker Validates arguments against the schema
aws AWS error codes and so on
cacheable Cache data which access frequently
cachepool Reusable object cache in process
cluster Some helper function for the server in a cluster
daemonize Start, stop or restart a daemon process
dictutil Dictionary helper utility
etcd etcd client
fsutil File-system Utilities
heap Min heap
http HTTP/1.1 client
humannum Convert number to human readable number string
jobq Process serial of input elements with several functions concurrently and sequentially
logutil Utility functions to create logger or make log message
mime Utility functions to handle mime type
modutil Submodule Utilities
mysqlconnpool Mysql connection pool with MySQLdb in python
mysqlutil Mysql related datatype, operations
net Network utility
portlock cross process lock
priorityqueue Priority queue
proc Utility to create sub process
rangeset Segmented range.
ratelimiter rate limiter
redisutil For using redis more easily.
shell Set different command arguments to execute different functions
strutil A collection of helper functions used to manipulate string
threadutil Utility functions for better management of threads
timeutil Support specify time format output and get current ts, ms, us api etc
utfjson Force json.dump and json.load in utf-8 encoding
utfyaml Force yaml.dump and yaml.load in utf-8 encoding
wsjobd Job daemon based on websocket protocol
zkutil Utility functions for zookeeper

Module dependency

Install

Just clone it and copy it into your project source folder.

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

Usage

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

Configuration

See config.md

Test

Run one of following to test all, a module, a TestCase or a function.

./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

See Details

For developer

There are several scripts for developers. See script.

Author

Zhang Yanpo (张炎泼) drdr.xp@gmail.com

Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com

Metadata

Release files for pykit-bsc 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pykit-bsc 0.0.5
File Size Uploaded Provenance Actions
pykit-bsc-0.0.5.tar.gz 219.9 kB Without provenance Details for pykit-bsc-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pykit-bsc 0.0.5
File Interpreter ABI Platform Actions
pykit_bsc-0.0.5-py2-none-any.whl Python 2 none any Details for pykit_bsc-0.0.5-py2-none-any.whl

Total release size: 520.1 kB

Release files / pykit-bsc-0.0.5.tar.gz

Download URL pykit-bsc-0.0.5.tar.gz
Size 219.9 kB
Tags Source
SHA-256 checksum
How to use checksums
99a12b88f4c8c573e8eddd4702fc49277e4349bebd44cfe67ece98235a3d3776
BLAKE2b-256 checksum
How to use checksums
26be4f9e402bfa3bbf44440f0a7ccac2c1b915ce3bd6364929e78e286479c61f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pykit_bsc-0.0.5-py2-none-any.whl

Download URL pykit_bsc-0.0.5-py2-none-any.whl
Size 300.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
cf4bd25beb4fa130be3c76eca89f3b4cb6c78965808b7b4ae9e7064195deaf3f
BLAKE2b-256 checksum
How to use checksums
a4a6345a432fc5a971157b03a4a03dce3a98c43501ebfb6e167f17d404cece4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pykit-bsc 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page