Skip to main content

A collection of tools for working with NEMSIS data

Project description

zolltools

The zolltools package is a collection of tools and scripts for work with NEMSIS data for the purpose of analyzing and reporting on EMS data. The package has "zoll" in it because it was originally developed as part of a research project funded by a grant from the ZOLL Foundation.

Logging

Logger names for each of the messages follow standard convention. Each module has its own logger, and they can be accessed with logging.get_logger(). The name of each module's logger also follows standard convention. For example, the name of the logger for the sasconvert module would be "zolltools.db.sasconvert". Included below is a short example of how one can access the logs for the sasconvert module. See Python's documentation of the logging module for more information on how to format and handle the logs.

import logging
import zolltools

sasconvert_logger = logging.getLogger("zolltools.db.sasconvert")
sasconvert_logger.setLevel(logging.DEBUG)
sasconvert_logger.addHandler(logging.FileHandler("sasconvert.log"))

To add a handler or set the level of all loggers in the package at once (and for other similar convenience functions), see the zolltools.logging module. See the example usage below.

import logging
from zolltools import logging as zlg

zoll_handler = logging.FileHandler("main.log")
zoll_level = logging.WARNING
zlg.set_level(zoll_level)
zlg.add_handler(zoll_handler)

Log messages from functions in the zolltools package will include a prefix in the following format:

<class name if in class>.<function name>: <message>

Development

Installation

To initialize the project for development, clone the repository and run the initialization script.

git clone https://github.com/Jython1415/zolltools.git # Clone the repo
cd zolltools         # Navigate to the project root
./scripts/install.sh # Initialize the project

Testing

To run tests, use the following command after activating the virtual environment:

python -m pytest

Building

To build and upload the project to test PyPI, use the following command:

bash scripts/new-build.sh

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

zolltools-0.2.tar.gz (56.5 kB view hashes)

Uploaded Source

Built Distribution

zolltools-0.2-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

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