Library with Python models derived from the page package world.opensemantic.quantities
Project description
opensemantic.quantities
Pydantic models for physical quantities, units and prefixes from world.opensemantic.quantities.
Provides typed Python classes for working with units of measure, unit prefixes, composed units, and quantity kinds based on the QUDT ontology. Includes SI, CGS, and commonly used non-SI units (bar, atm, calorie, etc.).
Installation
pip install opensemantic.quantities
Usage
from opensemantic.quantities import QuantityUnit, ComposedUnit, UnitPrefix, QuantityKind
# Pydantic v1 models
from opensemantic.quantities.v1 import QuantityUnit as QuantityUnitV1
Models
| Class | Description |
|---|---|
UnitPrefix |
SI unit prefixes (kilo, milli, micro, etc.) |
QuantityUnit |
Base units with prefix variants (metre, second, pascal, bar, etc.) |
ComposedUnit |
Units composed of multiple factors (m/s, kg*m/s^2, etc.) |
QuantityKind |
Physical quantities (Length, Mass, Pressure, etc.) |
PrefixUnit |
Prefixed variant of a unit (subobject of QuantityUnit) |
ComposedUnitElement |
Prefixed variant of a composed unit (subobject of ComposedUnit) |
Dependencies
opensemantic.core- base entity models (Entity, Item, Label, etc.)
Schema source
Generated from world.opensemantic.quantities using osw-python-package-generator with manual fixes for known code generator issues (see oold-python#84).
Note
This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opensemantic_quantities-0.4.0.post1000002005000.tar.gz.
File metadata
- Download URL: opensemantic_quantities-0.4.0.post1000002005000.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9140e301f40cf964e59c3610c6d3fd10d9803ecdc680bacc3da96426551d61a
|
|
| MD5 |
a7f52fdb680903e44d1b4b425431f500
|
|
| BLAKE2b-256 |
0a6e53b0c8980f646cce5d35672b0eb488ee9d8a4884a5fdbe47dbc44689f42c
|
File details
Details for the file opensemantic_quantities-0.4.0.post1000002005000-py3-none-any.whl.
File metadata
- Download URL: opensemantic_quantities-0.4.0.post1000002005000-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1a8d7a28d4a266fa49d3e3b7d120aa0c5a1ecdfe9e003f4b056c09892910315
|
|
| MD5 |
4fa714e7c8a65953ef8a92219abddea2
|
|
| BLAKE2b-256 |
ba42b52b349af11e55034fdc8b869fb2142d4533e8e3cb04cda0a773814f0089
|