https://github.com/harisekhon/pylib
  
  
    Python / Jython Utility Library for my other repos 
    https://github.com/harisekhon/pylib
  
cli hacktoberfest hbase library nagios-plugins nosql python rest tools unit-test unit-testing unit-tests
        Last synced: 11 days ago 
        JSON representation
    
Python / Jython Utility Library for my other repos
- Host: GitHub
 - URL: https://github.com/harisekhon/pylib
 - Owner: HariSekhon
 - License: mit
 - Created: 2015-10-27T14:47:50.000Z (about 10 years ago)
 - Default Branch: master
 - Last Pushed: 2025-03-14T19:37:08.000Z (8 months ago)
 - Last Synced: 2025-03-14T20:31:46.496Z (8 months ago)
 - Topics: cli, hacktoberfest, hbase, library, nagios-plugins, nosql, python, rest, tools, unit-test, unit-testing, unit-tests
 - Language: Python
 - Homepage: https://www.linkedin.com/in/HariSekhon
 - Size: 1.63 MB
 - Stars: 11
 - Watchers: 4
 - Forks: 9
 - Open Issues: 16
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE
 - Codeowners: .github/CODEOWNERS
 
 
Awesome Lists containing this project
README
          # Hari Sekhon - Python / Jython Library
[](https://github.com/HariSekhon/pylib/stargazers)
[](https://github.com/HariSekhon/pylib/network)
[](https://github.com/boyter/scc/)
[](https://github.com/boyter/scc/)
[](https://github.com/HariSekhon/pylib/blob/master/LICENSE)
[](https://www.linkedin.com/in/HariSekhon/)
[](https://github.com/HariSekhon/pylib/commits/master)
[](https://www.codacy.com/gh/HariSekhon/pylib/dashboard)
[](https://www.codefactor.io/repository/github/harisekhon/pylib/overview/master)
[](https://sonarcloud.io/dashboard?id=HariSekhon_pylib)
[](https://sonarcloud.io/dashboard?id=HariSekhon_pylib)
[](https://sonarcloud.io/dashboard?id=HariSekhon_pylib)
[](https://sonarcloud.io/dashboard?id=HariSekhon_pylib)
[](https://sonarcloud.io/summary/new_code?id=HariSekhon_pylib)
[](https://coveralls.io/github/HariSekhon/pylib?branch=master)
[](https://github.com/HariSekhon/pylib#hari-sekhon---python--jython-library)
[](https://github.com/HariSekhon/pylib#hari-sekhon---python--jython-library)
[](https://hub.docker.com/r/harisekhon/github/)
[](https://github.com/HariSekhon/Dockerfiles)
[](https://hub.docker.com/r/harisekhon/github)
[](https://hub.docker.com/r/harisekhon/centos-github)
[](https://harisekhon.github.io/CI-CD/)
[](https://github.com/HariSekhon/pylib/blob/master/Jenkinsfile)
[](https://github.com/HariSekhon/pylib/blob/master/cicd/.concourse.yml)
[](https://github.com/HariSekhon/pylib/blob/master/cicd/.gocd.yml)
[](https://github.com/HariSekhon/TeamCity-CI)
[](https://circleci.com/gh/HariSekhon/pylib)
[](https://buildkite.com/hari-sekhon/pylib)
[](https://ci.appveyor.com/project/HariSekhon/pylib/branch/master)
[](https://cloud.drone.io/HariSekhon/pylib)
[](https://g.codefresh.io/pipelines/edit/new/builds?id=5e58e2f89604d74f0c95ee24&pipeline=pylib&projects=GitHub&projectId=5e52ca8ea284e00f882ea992&context=github&filter=page:1;pageSize:10;timeFrameStart:week)
[](https://cirrus-ci.com/github/HariSekhon/pylib)
[](https://harisekhon.semaphoreci.com/projects/pylib)
[](https://github.com/HariSekhon/pylib/blob/master/buddy.yml)
[](https://github.com/HariSekhon/pylib/blob/master/shippable.yml)
[](https://github.com/HariSekhon/pylib/blob/master/.travis.yml)
[](https://dev.azure.com/harisekhon/GitHub/_build/latest?definitionId=4&branchName=master)
[](https://gitlab.com/HariSekhon/pylib/pipelines)
[](https://bitbucket.org/harisekhon/pylib/addon/pipelines/home#!/)
[](https://github.com/HariSekhon/pylib/blob/master/cicd/buildspec.yml)
[](https://github.com/HariSekhon/pylib/blob/master/cicd/cloudbuild.yaml)
[](https://github.com/HariSekhon/pylib)
[](https://gitlab.com/HariSekhon/pylib)
[](https://dev.azure.com/harisekhon/GitHub/_git/pylib)
[](https://bitbucket.org/HariSekhon/pylib)
[](https://app.fossa.com/projects/custom%2B16526%2Fgithub.com%2FHariSekhon%2Fpylib?ref=badge_shield)
[](https://github.com/HariSekhon/pylib/actions/workflows/shellcheck.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/json.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/yaml.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/xml.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/markdown.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/validate.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/kics.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/grype.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/semgrep.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/semgrep-cloud.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/trivy.yaml)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22GitHub+Actions+Ubuntu%22)
[](https://github.com/HariSekhon/pylib/actions/workflows/mac.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/mac_11.yaml)
[](https://github.com/HariSekhon/pylib/actions/workflows/mac_12.yaml)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Ubuntu%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Ubuntu+20.04%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Ubuntu+22.04%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Debian%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Debian+10%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Debian+11%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Debian+12%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22CentOS%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22CentOS+7%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22CentOS+8%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Fedora%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Alpine%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Alpine+3%22)
[](https://github.com/HariSekhon/pylib)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Python+3.7%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Python+3.8%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Python+3.9%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Python+3.10%22)
[](https://github.com/HariSekhon/pylib/actions?query=workflow%3A%22Python+3.11%22)
[git.io/python-lib](https://git.io/pylib)
Python library, full of lots of validation code and utility functions.
Hari Sekhon
Cloud & Big Data Contractor, United Kingdom
[](https://www.linkedin.com/in/HariSekhon/)
*(you're welcome to connect with me on LinkedIn)*
## Build + Unit Tests
```shell
make &&
make test
```
[Continuous Integration](https://travis-ci.org/HariSekhon/pylib) is run on this repo to build and test it (around 450 unit tests, plus custom tests).
### Configuration
Strict validations include host/domain/FQDNs using TLDs which are populated from the official IANA list, a snapshot of which is shipped as part of this project.
To update the bundled official IANA TLD list with the latest valid TLDs do
```shell
make tld
```
#### Custom TLDs
If using bespoke internal domains such as `.local`, `.intranet`, `.vm`, `.cloud` etc. that aren't part of the official IANA TLD list then this is additionally supported via a custom configuration file ```resources/custom_tlds.txt``` containing one TLD per line, with support for # comment prefixes. Just add your bespoke internal TLD to the file and it will then pass the host/domain/fqdn validations.
## Related Repositories
- [Java version of this library](https://github.com/HariSekhon/lib-java)
- [Perl version of this library](https://github.com/HariSekhon/lib)
[git.io/python-lib](https://git.io/python-lib)
[git.io/pylib](https://git.io/pylib)
## More Core Repos
### Knowledge
[](https://github.com/HariSekhon/Knowledge-Base)
[](https://github.com/HariSekhon/Diagrams-as-Code)
### DevOps Code
[](https://github.com/HariSekhon/DevOps-Bash-tools)
[](https://github.com/HariSekhon/DevOps-Python-tools)
[](https://github.com/HariSekhon/DevOps-Perl-tools)
[](https://github.com/HariSekhon/DevOps-Golang-tools)
### Containerization
[](https://github.com/HariSekhon/Kubernetes-configs)
[](https://github.com/HariSekhon/Dockerfiles)
### CI/CD
[](https://github.com/HariSekhon/GitHub-Actions)
[](https://github.com/HariSekhon/Jenkins)
### DBA - SQL
[](https://github.com/HariSekhon/SQL-scripts)
### DevOps Reloaded
[](https://github.com/HariSekhon/Nagios-Plugins)
[](https://github.com/HariSekhon/HAProxy-configs)
[](https://github.com/HariSekhon/Terraform)
[](https://github.com/HariSekhon/Packer-templates)
[](https://github.com/HariSekhon/Nagios-Plugin-Kafka)
### Templates
[](https://github.com/HariSekhon/Templates)
[](https://github.com/HariSekhon/Template-repo)
### Misc
[](https://github.com/HariSekhon/Spotify-tools)
[](https://github.com/HariSekhon/Spotify-playlists)
The rest of my original source repos are
[here](https://github.com/HariSekhon?tab=repositories&q=&type=source&language=&sort=stargazers).
Pre-built Docker images are available on my [DockerHub](https://hub.docker.com/u/harisekhon/).
