nortech-python
The official Python library for Nortech AI.
Table of Contents
Overview
The nortech-python library is the official Python client for interacting with the Nortech AI platform. It provides a comprehensive interface to access and manage various components of the Nortech ecosystem, including metadata, data tools, and derivers.
The Nortech class serves as the primary entry point for the library. It encapsulates the core functionalities and provides a unified interface to interact with the Nortech API. It has 3 main components:
- Metadata: Access and manage metadata such as workspaces, assets, divisions, units and signals.
- Datatools: Fetch and manipulate signal data, supporting both Pandas and Polars DataFrames, time window queries, and signal filtering.
- Derivers: Create and manage derivers, which allow computation of new signals based on existing ones. This includes creating deriver schemas, deploying derivers, managing configurations, and testing locally.
The Nortech class is designed to be flexible, allowing customization of API settings such as the base URL, API key, pagination behavior, and user agent. This makes it easy to integrate the library into various environments and workflows.
Dependencies
This package relies heavily in the following packages, and it is recommended that users have basic knowledge of them:
- Pydantic - Used for schema validation and manipulation.
- Pandas or Polars - Used for managing signal datasets.
Installation
You can install using pip:
pip install nortech
Or if you are using poetry:
poetry add nortech
Or if you are using UV:
uv add nortech
Config
Setup your environment variables with your NortechAPI Key:
export NORTECH_API_KEY="<NORTECH_API_KEY>"
Alternatively you can create a .env file in the root directory of your project with the content:
NORTECH_API_KEY="<NORTECH_API_KEY>"
The Nortech class can also recieve all configurations during initialization.
Pagination
This feature is implemented like in the API. By default it is disabled. To enable it add the following line to your config:
NORTECH_API_IGNORE_PAGINATION=False
Listing functions, mostly present in the nortech.metadata section, have an optional PaginationOptions input object.
This object has 4 fields:
- size - Defines the maximum number of items to be returned by the function.
- sort_by - Defines which item field should be used for sorting.
- sort_order - Defines the sorting order, ascending or descending.
- next_token - Used to fetch the next page. Obtained from a previous request.
These functions return a PaginatedResponse object containing 3 functions:
- size - Number of items returned.
- data - List of items returned.
- next.token - Token that can be used in the
PaginationOptionsto fetch the next page.
PaginatedResponse also has a next_pagination_options method that returns a PaginationOptions, which can also be used to fetch the next page.
For comprehensive documentation including all available methods, parameters, and detailed examples, see the Documentation.
Metadata
Release files for nortech 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nortech-0.11.0.tar.gz | 28.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nortech-0.11.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.1 kB
Release files / nortech-0.11.0.tar.gz
| Download URL | nortech-0.11.0.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e06bbb98af766b0b4acd32b4f6bb1f6ea0f9e506468cf4f8d22f986a3c49269
|
|
BLAKE2b-256 checksum How to use checksums |
eb873e651eae8fa9f26efdb18986675d581a0cf30db3ef60ccc3a1cc944ffc66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.21
|
Release files / nortech-0.11.0-py3-none-any.whl
| Download URL | nortech-0.11.0-py3-none-any.whl |
|---|---|
| Size | 39.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd7c5a3a95ebb3a8fce70ac0497ab765760de1bb2c4e1d22a9d22a8626531bfc
|
|
BLAKE2b-256 checksum How to use checksums |
75f07970708af839811ad320e068ce09b47b53d44854583e73aa139e6fb4c465
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.21
|