A Python library for simple logging, json file operations, Maple file format operations, and console color utilities.
Project description
MapleX
MapleX is a Python library for simple logging, json file operations, Maple file format operations, and console color utilities.
You can install the package from pip with the following command.
pip install MapleX
Logger Class
Logger is a logging object for Python applications. It outputs application logs to log files and to console (standard output).
Easy and simple enough to use, yet highly practical. The best logging library for beginners and for personal projects.
Beginner Friendly
Color Highlited Output
The output will be color-highlighted for better analysis based on the log level. (Not tested on macOS, and you need Windows Terminal for Windows OS)
Outputs Stack Trace
You can use a function to outputs error message and the stack trace at once.
Logger Sample
import maplex
logger = maplex.getLogger("FunctionName")
logger.info("Hello there!")
This outputs to the console:
[INFO ][FunctionName] <module>(4) Hello there!
Also outputs to the log file:
(PsNo) yyyy-MM-dd HH:mm:ss.fff [INFO ][FunctionName] <module>(4) Hello there!
MapleJson
MapleJson class is a library class for converting data between dict data and JSON-formatted file data.
You can read, write, and also encrypt a JSON file as a dict data.
Maple File Format
Maple is a file system that I created when I was a child. It's like a combination of the INI file and the Jason file. I made this format that is easy to read and write for both humans and machines.
Basic Format
All data before MAPLE\n will be ignored
MAPLE
# Maple data must start with "MAPLE"
*MAPLE_TIME
yyyy/MM/dd HH:mm:ss.fffffff
# Encoded time or optional time in the method parameter
H *STATUS
# File status
ADT yyyy/MM/dd HH:mm:ss.fffffff
RDT yyyy/MM/dd HH:mm:ss.fffffff
CNT {int}
H #*
ADT is the most recent edited time
RDT is the second most recent edited time (before ADT)
CNT is the data count (Optional)
E *#
E
H *Header
# Headers include '*' are system headers
E
H Data Headers
H Sub Data Header
CMT Comments
# This is also a comment
Tags Properties
# Propaties cannot include 'CRLF.'
Tags2 Properties
# You cannot use the same tags in a Header except CMT and NTE in H NOTES
H Sub Data Header
Tags Propaties
# You can use the same tag in the child header,
# which is already used in the parents' header
E
E
H *NOTES NOTES_HEADER
# Note's header
NTE {strimg}
NTE ...
# Notes' main strings for the multi-line data
# COMMENTS IN THE "*NOTES" BLOCK WILL BE DELETED WHEN SAVING!
E
H #*
This is a comment block.
Starts with "H #*"
and ends with "E *#"
E *#
E
H Data Headers2
E
# "\nEOF\n" must be needed for all data
EOF
All datas after "\nEOF\n" will be ignored
MapleTree Class
MapleTree class is a Python library for reading, editing, and writeing the Maple formatted file from the Python code.
You can also automatically encrypt the file data using the library functions.
Exceptions
Excption classes are the specialized classes for MapleX to make your debugging easier.
Console Colors
ConsoleColors class is a class library for color-highlighting the standard output.
Install MapleX
From PyPI
[python[3] -m] pip install MapleX [--break-system-packages]
Manual Installation
- Download
./dist/maplex-<version>-py3-none-any.whl - Run
[python[3] -m] pip install /path/to/downloaded/maplex-<version>-py3-none-any.whl [--break-system-packages]
Build the Package by Yourself
Run python[3] -m build
or
Run python[3] setup.py sdist bdist_wheel
Unit test
python[3] -m unittest discover -s tests
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maplex-3.0.0.dev3.tar.gz.
File metadata
- Download URL: maplex-3.0.0.dev3.tar.gz
- Upload date:
- Size: 98.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4ba2cbfb134052db607ef84ae6ea97af298f4f12425ac9b680135e5e7996c00
|
|
| MD5 |
db7900e69104241887a5f78fcd2b21d7
|
|
| BLAKE2b-256 |
69cda3edadc2592beb81ff683efebef23e2d212b94a43a7e94c0ee2ea1f19c7d
|
Provenance
The following attestation bundles were made for maplex-3.0.0.dev3.tar.gz:
Publisher:
python-publish.yml on Ryuji-Hazama/MapleTree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maplex-3.0.0.dev3.tar.gz -
Subject digest:
d4ba2cbfb134052db607ef84ae6ea97af298f4f12425ac9b680135e5e7996c00 - Sigstore transparency entry: 894617020
- Sigstore integration time:
-
Permalink:
Ryuji-Hazama/MapleTree@f0fc006f625f9643239b62276841d76d35c90511 -
Branch / Tag:
refs/tags/v3.0.0.dev3 - Owner: https://github.com/Ryuji-Hazama
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f0fc006f625f9643239b62276841d76d35c90511 -
Trigger Event:
release
-
Statement type:
File details
Details for the file maplex-3.0.0.dev3-py3-none-any.whl.
File metadata
- Download URL: maplex-3.0.0.dev3-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75d85e187268c591dc81c8be000045b0f508958cc45bc304c2f92ada6fb2f741
|
|
| MD5 |
304f7a8618e14f798b3434f293ea2754
|
|
| BLAKE2b-256 |
491b01d466225489016eaad9d231e44739bc8079e57d16f7a67b94f0abb49c49
|
Provenance
The following attestation bundles were made for maplex-3.0.0.dev3-py3-none-any.whl:
Publisher:
python-publish.yml on Ryuji-Hazama/MapleTree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maplex-3.0.0.dev3-py3-none-any.whl -
Subject digest:
75d85e187268c591dc81c8be000045b0f508958cc45bc304c2f92ada6fb2f741 - Sigstore transparency entry: 894617022
- Sigstore integration time:
-
Permalink:
Ryuji-Hazama/MapleTree@f0fc006f625f9643239b62276841d76d35c90511 -
Branch / Tag:
refs/tags/v3.0.0.dev3 - Owner: https://github.com/Ryuji-Hazama
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f0fc006f625f9643239b62276841d76d35c90511 -
Trigger Event:
release
-
Statement type: