jblib
Author: Justin Bard
This module was written to minimize the need to write the functions I use often.
INSTALL: python3 -m pip install jblib
The source code can be viewed here: https://github.com/ANamelessDrake/jblib
More of my projects can be found here: http://justbard/com
import jblib
class cd()
Example:
with cd(directory):
print (os.getcwd())
print (os.getcwd()) ## Back at the originating directory on exit
class hilight(string).color(highlight=True, bold=True)
Example:
print (hilight("Hello World").red(bold=True))
Or you could make an object:
text = hilight("Bar")
print ("Foo "+text.blue())
To return the original string:
print (text.string)
Available Colors:
red
green
yellow
blue
purple
teal
white
import convert_module
Module to convert various data
def convert_time_from_seconds(seconds_given)
Converts a seconds into minutes, hours and days.
def IP2Int(ip)
Converts a IPv4 address to a interger - This is useful to store IP addresses in databases
def Int2IP(ipnum)
Converts a interger back to an IPv4 address
def urlcode(url, encode=False)
Wrapper for urllib.parse.quote and urllib.parse.unquote.
From urllib docs - Replace special characters in string using the %xx escape. Letters, digits, and the characters '_.-' are never quoted. By default, this function is intended for quoting the path section of URL.
- https://docs.python.org/3.1/library/urllib.parse.html?highlight=urllib#urllib.parse.quote
Metadata
Release files for jblib 1.6.26
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jblib-1.6.26.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jblib-1.6.26-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / jblib-1.6.26.tar.gz
| Download URL | jblib-1.6.26.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a132088af15325a9f92ae999b8a3b4a762e08ec34de52b1b26802a5a68a3aba4
|
|
BLAKE2b-256 checksum How to use checksums |
a25d6a5506bc98d46abbb6e99d7ed36e288c1112b7db1c2a3f34f13308db40be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
|
Release files / jblib-1.6.26-py3-none-any.whl
| Download URL | jblib-1.6.26-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a2e4dfc5349f7ed364e291ecce48486ffc48dd4cd608db703b450baadaff2db
|
|
BLAKE2b-256 checksum How to use checksums |
0cd4f942e5fb617221fb6778b6f80a4d2aaceb03c1a991f609dffcf1e57d53d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
|