This release is a pre-release and may not be stable for production use.
OML4PY
This is a Python module for the OML measurement library based on the OML text protocol: http://mytestbed.net/projects/oml/wiki/Description_of_Text_protocol
Installation
Install using pip:
pip install oml4py
or download the package and run:
python setup.py install
Usage
This module provides the OMLBase class, which contains the following methods:
init start addmp inject close
To use OML in a python project, import the OMLBase class:
from oml4py import OMLBase
Start by initializing an OMLBase object. The init method takes up to four arguments: * the name of the application, * the name of the experiment, * the name of the node, * and the OML server URI in the form tcp:hostname:port
For example:
x=OMLBase("app", "an-exp","r","tcp:myomlserver.com:3003")
The only mandatory argument is the first one (the name of the application). If you skip any of the others, they may be defined by environment variables (OML_EXP_ID, OML_NAME, OML_SERVER). If these environment variables are not defined and they are not passed in explicitly, then the application will run with OML disabled, and the measurements that would have been sent to OML will be printed on stdout instead.
Next, add one or more measurement points. Pass the name of the measurement point and a schema string to the start method. The schema string should be in the format measurement_name1:measurement_type1 measurement_name2:measurement_type2 for example:
x.addmp("fft", "freq:long amplitude:double fft_val:double")
When you have set up all your measurement points, call start():
x.start()
When you have a measurement point to send to OML, store them in a list. Then pass the name of the measurement point and list of values to inject, as follows:
x.inject("fft", [259888, 15, -38])
At the end of your program, call close to gracefully close the database:
x.close()
Metadata
Release files for oml4py 2.9.pre.110-1a34
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oml4py-2.9.pre.110-1a34.tar.gz | 3.5 kB | Without provenance | Details for oml4py-2.9.pre.110-1a34.tar.gz |
Release files / oml4py-2.9.pre.110-1a34.tar.gz
| Download URL | oml4py-2.9.pre.110-1a34.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dafbf4cebc93df2a993df8cab1ab8ed4feb89dc2bbf8e2c8208ca40b255be6b6
|
|
BLAKE2b-256 checksum How to use checksums |
2d584173086b2616a7ea92d8e4c3474d4db191e33a3c4306e8616da35b616cb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for oml4py 2.9.pre.110-1a34
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.