Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Lubepy

Lubepy is a library that provides a set of basic calculations related to machinery lubrication. It's thought to be used by machinery lubrication technicians and engineers to quickly solve urgent lubrication problems on field.

Installation

You might want to create a Python virtualenv before you install Lubepy. If so, you can run the following commands:

$ python3 -m venv venv
$ source venv/bin/activate
(venv) $

Once you have the virtualenv in place and activated, you can install Lubepy as follows:

On Linux systems:

(venv) $ pip install lubepy

Usage Examples

Say you need to find the viscosity index of an oil. The oil has a viscosity at 40ºC of 104.7 cSt and a viscosity at 100ºC of 13.9 cSt. You can do something like this:

from lubepy.lube.viscosity import viscosity_index
viscosity_index(104.7, 13.9)

# Output: 134

The viscosity index of an oil gives you an idea of how fast the viscosity diminishes when the temperature increases.

Now, suppose you have an oil with a viscosity index of 130 and a viscosity at 40ºC of 112 cSt. You need to know what will be the viscosity of your oil at 100ºC degrees. To solve this problem you can do something like this:

from lubepy.lube.viscosity import viscosity_at_100
viscosity_at_100(112, 130)

# Output: 14.38

Most engines work at 100ºC, so it's important to know what will be the viscosity of an engine oil at 100ºC to have an idea of how well this oil will protect your engine.

There are a lot more calculations that you can perform with Lubepy. Unfortunately, they're not documented yet. If you want to get some additional information about the calculations implemented by Lubepy, then you can do something like this:

>>> from lubepy.lube import viscosity
>>> help(viscosity)
# Output
Help on module lubepy.lube.viscosity in lubepy.lube:

NAME
    lubepy.lube.viscosity - This module provides viscosity calculations.

FUNCTIONS
    viscosity_at_100(viscosity40: float, index: float) -> float
        Calculate the Kinematic Viscosity (KV) at 100°C.

        Valid for viscosities between 2 and 500 cSt at 100°C.

    viscosity_at_40(viscosity100: float, index: float) -> float
...

Authors

  • Leodanis Pozo Ramos – Twitter: @lpozo78 – E-mail: lpozor78@gmail.com
  • Alexis Vega Jimenez: Provided formulas and theoretical support.

Contribute to the Code

  1. Make a fork (https://github.com/lpozo/lubepy/fork)
  2. Clone your fork locally (git clone https://github.com/your_user_name/lubepy.git)
  3. Create your feature branch (git checkout -b feature_awesome_feature)
  4. Commit your changes (git commit -am "Add some awesome feature")
  5. Push to the branch (git push -u origin feature_awesome_feature)
  6. Create a new Pull Request against the develop branch
  7. Wait for code review and feedback

License

Lubepy is distributed under the GNU General Pubic License, v2. See LICENSE for more information.

Release files for lubepy 1.0a0

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

Source distribution (sdist)

Source distribution for lubepy 1.0a0
File Size Uploaded
lubepy-1.0a0.tar.gz 19.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lubepy 1.0a0
File Interpreter ABI Platform
lubepy-1.0a0-py3-none-any.whl Python 3 none any Details

Total release size: 45.3 kB

Release files / lubepy-1.0a0.tar.gz

Download URL lubepy-1.0a0.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9c2720563e8aa6e1835849930a996ccebc19592933539e7d5f05da7f968ce53e
BLAKE2b-256 checksum
How to use checksums
fb3c587f7e76b009c6c69d4b3b44ff71b60e8ca64a757219975f8244edfb347b
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/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

Release files / lubepy-1.0a0-py3-none-any.whl

Download URL lubepy-1.0a0-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ae0baf78e4ce1e1c959b49a9ee5e7a35daa9883cdfbe8f10e8cd4d32848f124
BLAKE2b-256 checksum
How to use checksums
d879b5fe64edcee92d1c6178fe711a2987219739ba07047a4d7f1698f9be704a
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/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.0a0 This release

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