Skip to main content

The general utils library for neomedsys development

Project description

20200907_104224

NeoLibrary 🍦

neolibrary-Version: 0.4.1b1 PyPI status Coverage Flake8 Test

Documenation


The documentation describes the purpose and how to use the neolib. This documenation is also purposely written in a cute format to make it more fun to read. Ice cream to everyone who reads it.

Description


The neolib is a library for the common functions that is used in the NeoMedSystem projects.

Description


NeoLogger is the logger component that is compliant with Grafana Loki https://grafana.com/oss/loki/ and is used to log all events in the NeoMedSys projects. The logger is based on the python logging library and is easy to use.

The logger will save a logger file in the /logs directory for each file that uses the logger. These logfiles are deleted when the rotation day is reached. The default rotation day is 30 days. The logfiles are saved in the /logs directory.

The logger is imported as;

from neolibrary.monitoring.logger import NeoLogger

Utils


Utils contains all the utility functions that is used in the NeoMedSys projects. Such as hash functions, datetime cleanup, etc.

utils are imported as;

import neolibrary.utils as utils

Description


Decorators contains all the decorators that is used in the NeoMedSys projects. Such as timer, etc. These are special functions that can be used to decorate other functions such as shown below:

@timer
def my_function():
    pass

decorators are imported as;

from neolibrary.decorators import timer

Blazing


It is super easy to add logger to your project. Just add the following code to your project and you are good to go.

Use your favorite package manager. Here at NeoMedSys we use poetry.

$ poetry add neolibrary

Then add the following code below to your project. This enabled the logger with log rotation of 30 days (resets the logger for memory cleanup). The default is 30 days.

from neolibrary.monitoring import NeoLogger

logger = NeoLogger(__name__, rotate_days=30)

The library contains all functions that the the NeoMedSys pythonased project needs, such as:

from neolibrary.utils import my_function

something = my_function()

Neolibrary also contains functions for preprocessing data, such as:

from neolibrary.preproc import zscore

znorm = zscore(data)

See full documentation to see all functionality

Description


This package uses Github workflow for CI/CD. Publication to pypi happens if a new release is created, except if the version includes alpha at the end of the version number.

The version should be changed in the pyproject.toml file. The version number should follow the Semantic Versioning standard.

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

neolibrary-0.4.3b1.tar.gz (18.5 kB view hashes)

Uploaded Source

Built Distribution

neolibrary-0.4.3b1-py3-none-any.whl (19.1 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