NORTH GRAVITY PYTHON UTILS
This document describes the North Gravity Python Utils package which enables users to use the North Gravity platform tools and most common functions within their python scripts / tasks repositories.
The Python Utils can be used within:
-
a single python script that is ran thanks to the Python Runner task within a pipeline in the North Gravity application
-
a single Jupyter Notebook that is ran thanks to the Jupyter Runner task within a pipeline in the North Gravity application
-
an ensemble of python scripts that are part of a container, for a Task created by the user, used in a pipeline in the North Gravity application
NG_Utils cover most frequently used functions for data/files handling purposes.
The scope of the NG_Utils:
-
DataHandler - splitting data based on train/test labels, handling dates in datasets
-
FileHandler - downloading/uploading model-specific datasets from/to the data lake, handling datasets formats
-
BackTest - preparing short or extended backtest based on models results
-
StatTest - preparing report and running statistical tests for stationarity, autocorrelation and volatitity clustering
-TaskExecUtils - auxiliary functions used in executing tasks
How to install and set the package:
Install
pip3 install northgravity_utils==0.1.2
As the library is available from pip, it can be installed as a specific version within a Python Task from within requirements.txt just by adding:
northgravity_utils==0.1.2
The package relies on the requests library so, in the project, the user must install this library in the requirements.txt file.
pip3 install requests==2.27.1
Environment Variables
The package uses information from the environment variables. They are necessery for functionality of Nortygravity SDK package, used in Northgravity Utils Environment variables are automatically provided when running a script within a pipeline (as a Task or within the Python/Jupyter Runners). If running locally the script, users must set them in the project to be able to run the project locally.
Mandatory environment variables to set:
-
NG_API_ENDPOINT → the URL to the North Gravity platform API (by default, the url is set to https://api.northgravity.com)
-
LOGIN → login received from North Gravity
-
PASSWORD → password to log in,
-
or NG_API_KEY → API key to use instead of LOGIN and PASSWORD combination
Credentials are used to generate the token so that each request is authenticated.
Metadata
Release files for northgravity-utils 0.1.2
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 |
|---|---|---|---|---|
| northgravity_utils-0.1.2.tar.gz | 14.0 kB | Without provenance | Details for northgravity_utils-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| northgravity_utils-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for northgravity_utils-0.1.2-py3-none-any.whl |
Total release size: 28.7 kB
Release files / northgravity_utils-0.1.2.tar.gz
| Download URL | northgravity_utils-0.1.2.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ed16bee0bb333899921f79a79b03689e3b8317882b0be2b4b9fcc63f925f748
|
|
BLAKE2b-256 checksum How to use checksums |
cbe6f4e09811683b702dd60234dae8417d86542e00baf721fc01e5dcd15b902e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|
Release files / northgravity_utils-0.1.2-py3-none-any.whl
| Download URL | northgravity_utils-0.1.2-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6407181c9a0ba31ecfb2e7af8fda7ef274382fca415582d448b1ec3051da19f5
|
|
BLAKE2b-256 checksum How to use checksums |
59843b434d3adf909893114183992faa894646afed0e26cc3603b9091d49542f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|
Security for northgravity-utils 0.1.2
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.