Skip to main content

QuickLog

QuickLog is a tiny Python3 library for logging experimental results. It uses JSON to serialize log records into human readable text files. Appending new records to a log file does not require parsing the current log data, making logging performance scallable. Parsing log results may however require some time, but complexity is $O(n)$ where n is the number of records in the log file.

QuickLog also features trace save to a traces database (which is a structured directory). Each trace is referenced in the log file via a unique random identifier. For this, the TRACESDIR environment variable should refer to the traces database directory. If this environment variable is not defined, ./traces directory is used.

This library is meant to be very simple to use.

Logging example

import quicklog

log = quicklog.Log()
for i in range(100):
    # new_record creates a dict with session Id, record Id and timestamp.
    record = quicklog.new_record()
    # Add experiment data
    record['result'] = do_experiment()
    log.append(record)

Parsing log example

import quicklog

for record in quicklog.read_log():
    rid = record['id']
    result = record['result']
    print(f'{rid}: {result}')

Installation

Quicklog is available on pypi. You can install it with pip3:

pip3 install donjon-quicklog

If you want to install the latest version from the repository, clone the repository then use pip3 to install the package.

pip3 install ./quicklog

Licensing

Quicklog is released under GNU Lesser General Public Licence version 3 (LGPLv3). See COPYING and COPYING.LESSER for license details.

Metadata

Release files for donjon-quicklog 1.0.2.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for donjon-quicklog 1.0.2.post1
File Size Uploaded
donjon_quicklog-1.0.2.post1.tar.gz 18.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for donjon-quicklog 1.0.2.post1
File Interpreter ABI Platform
donjon_quicklog-1.0.2.post1-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / donjon_quicklog-1.0.2.post1.tar.gz

Download URL donjon_quicklog-1.0.2.post1.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
15c5cfbbe9063961b4f5d1160f71ea52b191337a1c5384ee70cc6f46d9b44b25
BLAKE2b-256 checksum
How to use checksums
bc97ca0f0b19d2cf289feb4648f46701c1977779927b38dba8034fd5c5d85b3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0

Release files / donjon_quicklog-1.0.2.post1-py3-none-any.whl

Download URL donjon_quicklog-1.0.2.post1-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c2cbef3c85a6f8da33eff03690205ca76d53b7157ce5034a5026705a53be59b
BLAKE2b-256 checksum
How to use checksums
5a47be30988de080326e7adb9ac00cd27cec87ebaac009e0535b74aa4efa706b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0

Release history Release notifications | RSS feed

This release

1.0.2.post1 This release

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page