Skip to main content

Simplify scientific data logging

Project description

CI Status PyPI

SimLogger

See the docs! - https://joey-kilgore.github.io/SimLogger/index.html Logger and python data archiving

Archive your python objects simply and easiy, and never worry about overwriting files. All data is defined with 3 key components
simTag - tag unique for each simulation (like naming the experiment)
objTag - tag unique for each object (like the variable within the experiments)
date-time - this is automatically added by SimLogger to help ensure unqiueness of files

With that you can save your data easily!

from SimLogger import SimLogger
simTag = 'sampleSimulation'
objTag = 'sampleArray'
sampleArray = [1,2,3,4]
SimLogger.saveObj(simTag, objTag, sampleArray, makeNote=True)

# Outputs
# 2024-06-25 10:44:44,063 [INFO ] Logger Loaded
# 2024-06-25 10:44:44,064 [INFO ] OBJECT,sampleSimulation,sampleArray,data/obj/sampleSimulation_sampleArray_2024-06-25_10-44-44.pkl
#
# additionally a file is saved: data/obj/sampleSimulation_sampleArray_2024-06-25_10-44-44.pkl

And you can load your data later using a uniqueId
uniqueId - unique identifier that goes to the python pkl file (almost always is simTag_objTag)

from SimLogger import SimLogger
sampleArrayLoaded = SimLogger.getObjectFromuniqueId('sampleSimulation_sampleArray')
print(sampleArrayLoaded)

# Ouptuts
# [1, 2, 3, 4]

Installation

Install the python package
pip install SimLogger

To utilize the FigLogger you will need to register your machine ssh keys with kachery
Run the following command and follow the instructions
kachery-cloud-init

Development

install all dependencies (including linting and testing) with:
pip install -e '.[lint,test]

run tests with:
pytest tests/

run linting + formatting + etc with:
pre-commit run --all-files

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simlogger-0.3.1.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simlogger-0.3.1-py2.py3-none-any.whl (18.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file simlogger-0.3.1.tar.gz.

File metadata

  • Download URL: simlogger-0.3.1.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for simlogger-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b52f1f51a6012c1ecb742174e482349186eea75085ae23a715a25c8b3be87bad
MD5 53aecebf26ffcfb7ff0da8be5055bf30
BLAKE2b-256 b087cb440ab527ca50577ab170fd1e26a3f26a86c59df99d894cdb29d8d9a355

See more details on using hashes here.

File details

Details for the file simlogger-0.3.1-py2.py3-none-any.whl.

File metadata

  • Download URL: simlogger-0.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for simlogger-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 aeb9674d8f6ec6df74143d987b4c00780c14cb45147da6839d00a53bb1d46027
MD5 e908503d2f3cfdc5058fc61ce9f50f66
BLAKE2b-256 3356b31620e6c4f7309f475f53b88959792156d139643c1e8ce0e7eed8ad43ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page