Skip to main content

README

PyPI Latest Version pipeline status coverage report Documentation Status License: GPL v3

Lab Utils, a collection of useful Python modules

This package contains several useful modules to help build Python applications. All modules provide support for a configuration file using configparser and standard logging.

Available modules:

  • database: simple interface to manage connections to a PostgreSQL database
  • socket_comm: TCP server/client communication for daemon-like apps.

Dependencies

The package lab-utils has the following pre-requisites:

  • libpq, a C library that implements connections to the PostgreSQL backend server. The python package psycopg2 needed by the module database is built around this library, and it is strongly recommended to have it installed. If for some reason you can't install it or don't have access to it, a precompiled binary package is also available. Please notice that using precompiled binaries can lead to other problems.

  • Python 3.6 and pip 10.0 are the minimum required versions to build lab-utils and its dependencies. It is recommended to install and run lab-utils (and any other package, for that matter) under a virtual environment.

  • Pandas

Getting Started

These instructions will install the package lab-utils and let you import its modules in your own apps. It is assumed that you have successfully installed the prerequisites and are running inside a virtual environment.

  1. Install the package and its dependencies
    python -m pip install lab-utils
    
    If you don't have PostgreSQL and libpq installed, you can use
    python -m pip install lab-utils --only-binary psycopg2
    
  2. Run some examples to test that everything works
    cd examples
    python database/create_column.py
    

Import into your own app

To use a <module> from the lab_utils collection in your own Python app, simply add

from lab_utils import <module>

Modules

All the modules provided by the package provide support for:

database

This module is a simple interface to manage connections to a PostgreSQL database based on the psycopg2 library. The main features are:

  • Database connection and closing
  • Create a new TimescaleDB table
  • Check if column and/or table exist in a given database
  • Create a new column in a table, with optional constraints

socket_comm

This module implements a simple TCP server/client structure to develop daemon-like application.

Authors

Contributing

Please read our contributing policy for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use Git for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the GNU GPLv3 License

Built With

Acknowledgments

  • Nobody so far

Metadata

Release files for lab-utils 0.5.12

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

Source distribution (sdist)

Source distribution for lab-utils 0.5.12
File Size Uploaded Provenance Actions
lab-utils-0.5.12.tar.gz 41.2 kB Without provenance Details for lab-utils-0.5.12.tar.gz

Release files / lab-utils-0.5.12.tar.gz

Download URL lab-utils-0.5.12.tar.gz
Size 41.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5c2e4e8b343ba8d641b0e79a976a44e92132e403fd78f90881715eb593d88d00
BLAKE2b-256 checksum
How to use checksums
39e23e7f5ad411d0ef6f4eb5044e9c273718b8648389e78e0ce86a3de5bcc557
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5

Security for lab-utils 0.5.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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