pysolbase
Welcome to pysol
Copyright (C) 2013/2025 Laurent Labatut / Laurent Champagnac
pysolbase is a set of python helpers to ease development.
It is gevent (co-routines) based.
Usage
Engage gevent monkey patching and setup default logger configuration:
SolBase.voodoo_init()
Initialize logging system (without engaging gevent) with default configuration (ie console logs - there is support for syslog and file logs).
SolBase.logging_init("INFO")
Re-initialize logging system (without engaging gevent):
SolBase.logging_init("DEBUG", True)
Millis helpers:
ms = SolBase.mscurrent()
do_something()
ms_elapsed = SolBase.msdiff(ms)
Date helpers
dt = SolBase.datecurrent()
do_something()
ms_elapsed = SolBase.datediff(dt)
Binary helpers
bin_buf = SolBase.unicode_to_binary('This is my text buffer', encoding='utf-8')
unicode_string = SolBase.binary_to_unicode(bin_buf, encoding='utf-8')
File helpers
FileUtility.append_text_to_file('/tmp/test.txt', 'This is my text buffer', 'utf-8')
bin_buf = FileUtility.file_to_binary('/tmp/test.txt')
unicode_string = FileUtility.file_to_text('/tmp/test.txt', 'utf-8')
Exception helper
try:
a = None
b = a + 1
except Exception as e:
logger.warn("Ex=%s", SolBase.extostr(e))
Metadata
Release files for pysolbase 3.13.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pysolbase-3.13.7.tar.gz | 26.3 kB | Without provenance | Details |
Release files / pysolbase-3.13.7.tar.gz
| Download URL | pysolbase-3.13.7.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07091522d23e741687975f6929869766566a1cc5af981f4955476443062d455e
|
|
BLAKE2b-256 checksum How to use checksums |
d03314d6328fa18b590f8a584401698d1bfbddd53117bcf88522dc36aad7ebe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for pysolbase 3.13.7
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.