This repo is outdated and archived, please use https://github.com/equinor/omnia-timeseries-python instead
Python software developer kit for the Omnia Timeseries API.
This is the Python SDK for developers and data scientists working with Omnia Timeseries. The package integrates with pandas to help you work easily and efficiently with the data.
Run the below command in a Python environment to install the latest release
pip install omnia_timeseries_sdk
.. or upgrade existing installation
pip install --upgrade omnia_timeseries_sdk
Import the Omnia client in your own scripts...
from omnia_timeseries_sdk import OmniaClient
... and get to work. Here is an introduction.
The SDK supports authentication by user impersonation and using a shared secret
When accessing Omnia from a service with a shared client secret you must set the following environmental variables. The values are provided by the Omnia administrators.
set omniaResourceId="omnia-resource-id"
set omniaClientId="your-client-id"
set omniaClientSecret="very-very-secret-shared-key"
Take a look at the resources listed below to learn more.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Install Python version 3.7 or later from either https://www.python.org or https://www.anaconda.com.
At the desired location, run:
git clone https://github.com/equinor/omnia-timeseries-sdk-python.git
To get the development environment running:
... create an isolated Python environment and activate it,
python -m venv /path/to/new/virtual/environment
/path/to/new/virtual/environment/Scripts/activate
... install the dev dependencies in requirements.txt,
pip install -r requirements.txt
.. and install the package in development mode.
python setup.py develop
You should now be able to import the package in the Python console,
import omnia_timeseries_sdk
help(omnia_timeseries_sdk)
We apply the unittest and pyteset frameworks.
Run the tests and check test coverage by
pytest --cov=omnia_timeseries_sdk --cov-report term-missing tests/
Build tarball and wheel distributions by:
python setup.py sdist bdist_wheel
The distribution file names adhere to the PEP 0427
convention {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl
.
The package releases are deployed to PyPi.
We use GitHub Actions to automate the build and deployment (CI-CD).
We apply the "major.minor.micro" versioning scheme defined in PEP 440.
We cut a new version by applying a Git tag like 0.1.0
at the desired commit and then
setuptools_scm takes care of the rest at build time.
See the tags on this repository.
- Per Voie - tovop
This project is licensed under the MIT License - see the LICENSE file for details.