tlib 1.2.10

Creator: bradpython12

Last updated:

0 purchases

TODO
Add to Cart

Description:

tlib 1.2.10

Over View





Some own/observed great lib/ideas,common useful python libs/utils.
GitHub https://github.com/txu2008/tlib
PyPI: https://pypi.org/project/tlib
Catalogue

aws AWS SDK APIs for Python.
bs Math calculate releated functions.
data structure Data Structures operations.
data base Data Base related API/Packages.
docker docker manager API/Packages.
es ElasticSearch related test
fileop File operation related functions
git Git commands opt; GitLab API
jenkinslib libs for jenkins
k8s Kubernetes API.
log logging config, colored, compress, log file/console.
ltp Linux Test Project tools
mail Send email, attachment.
platform Linux/windows platform operations,such as shell,cmd,ssh_manager...
vsphere pyVmomi is the Python SDK for the VMware vSphere API that allows you to manage ESX, ESXi, and vCenter.
retry Decorators for retry func
schedule Decorators for schedule the func task and list the tasks with PrettyTable
storage Object related storage
Stress Runner A TestRunner generates a HTML report to show the result at a glance.
utils Some python utils
validparam Decorators for verify param valid, verify param type, value range, ...
vim-config A easy vim configuration for python

Quick Start
1. Installation
Install from pip
pip install tlib

Install from source code:
# git clone tlib or download the released tar balls, then:
python setup.py install

2. Doc & Wiki
Visit Wiki to see more details: https://github.com/txu2008/tlib/wiki
Visit Doc site to see py-docs: TODO
Visit examples to see .examples/*
# Examples:

# 1. Init logging logger
from tlib import log
logger = log.get_logger(logfile='test1.log', logger_name='test1', debug=True, reset_logger=True)
logger.info('test_1 start ...')
logger.warning('test_1 hello,world')
logger.debug('test_1 hello,world')
logger.error('test_1 hello,world')
logger.critical('test_1 hello,world')

# 2. stressrunner
import unittest
from tlib.stressrunner import StressRunner
from test.test_mail import TestMail
runner = StressRunner(
report_path='sr_test.log',
title='My unit test with stressrunner',
description='This demonstrates the report output by StressRunner.',
logger=logger, # support owner logging logger
)
test_suite = unittest.TestSuite()
test_suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestMail))
runner.run(test_suite)

Tests
How to run test case in this project:
- Run test/test_*.py
- python run_test.py log
- python run_test.py mail
- python run_test.py es stress -h
- python run_test.py es index -h
- ...
Contribute To TLIB
- Commit code to Github, https://github.com/txu2008/tlib
- Need to check pep8 and pylint rules before you start a pull request

Discussion
- Github Issues

Reference
* http://tungwaiyip.info/software/HTMLTestRunner.html

WIKI
https://github.com/txu2008/tlib/wiki
Code directory tree:
tlib
|-- docs module Docments
|-- examples module tlib useage examples
|-- test module tlib unit test cases
|-- tlib module tlib packages
|-- requirements.txt module Python package requirements, pip install -r requirements.txt
|-- Pipfile module Python packages manage with pipenv
|-- run_test.py module An interface for run unit test, python run_test.py -h
|-- setup.py module Setup
....

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.