Pysj makes Python development more comfortable. This package contains utils, classes and helper
Project description
Pysj
This package contains utils, classes and helper functions I find myself reimplementing in several projects. As of now all functions are importable from the top level module.
The name is a commonly used shortened version of the Norwegian word "pysjamas" (in english: pajamas/pyjamas). Coding in your pysjamas/pajamas/pyjamas is comfortable. This package is an attempt to make Python development a bit more comfortable.
This is an ongoing project and so far just a few functions are implemented, as well as a project structure, tests and packaging.
Installation
pip install pysj
Usage
from pysj import sha256, ExtendedJSONEncoder
# Simple hashing
print(sha256("test"))
# JSON Encoder converting datetime to ISO format
json.dumps(
{
"timestamp": datetime.datetime.fromisoformat("2021-12-01T04:50:00.123456")
},
cls=ExtendedJSONEncoder,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.