Utilities for i.ai to use
Project description
i.AI Utility Code
i-dot-ai-utilities is a python package used and developed by the i.AI team within DSIT.
It provides common features used in many of our applications.
Features
Current features:
Structured Logging
The structured logging library is used to generate logs in a known format so they can be further processed into logging systems downstream. It also provides the ability to easily enrich log messages with useful data, and in some cases does this automatically.
You can find information on usage of the logging library in the logging library readme.
Metrics Collection
The metrics collection library provides the ability to write time-series metrics out to useful destinations. In the case of i.AI, this is CloudWatch Metrics.
There's also a handy interface provided which can be used in your code to allow for modularity if the swapping out of implementations is desired.
You can find information on usage of the metrics collection library in the metrics library readme.
Future features:
- keycloak authentication
- s3
- langfuse and litellm
- logging/observability
- opensearch
Settings
This is where some of the above can be found:
How to use
Unit Testing
All modules contained within this repo include robust test suites. You can run tests for all modules in this package using make test.
Tests and linting runs on every push and merge to main.
When making changes or adding tests, please ensure tests run in isolation, as failures of external dependencies will impact the CI tests for all packages. Please also make sure that tests pass before merging, as failing tests will impact every package in the application.
CI/CD & Releases
Releases must be manually created, after which the specified package version will be released to PyPI. As such, release names must adhere to semantic versioning. They must not be prefixed with a v.
You may release a pre-release tag to the test version of PyPI by specifying the release as a pre-release on creation. This allows for the testing of a tag in a safe environment before merging to main.
To test a pre-release tag, you can follow these steps in a repo of your choice:
- Update pyproject.toml:
[[tool.poetry.source]]
name = "test-pypi"
url = "https://test.pypi.org/simple/"
priority = "supplemental"
- Load the specific version into the environment (replacing version number as required)
poetry add --source test-pypi i-dot-ai-utilities==0.1.1rc202506301522
Licence
MIT
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 i_dot_ai_utilities-0.3.0.tar.gz.
File metadata
- Download URL: i_dot_ai_utilities-0.3.0.tar.gz
- Upload date:
- Size: 77.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
127f1c2eef1d007e8fce08c20b6dc172985e148364d576b0db39133c0715a4d2
|
|
| MD5 |
656bf9f1d48e94665e0e67b8e60083f6
|
|
| BLAKE2b-256 |
46f6947ab2024706e40b8ce2d789a2e1d3e6c0947e544dd678b8ee70dcd12a19
|
Provenance
The following attestation bundles were made for i_dot_ai_utilities-0.3.0.tar.gz:
Publisher:
deploy.yaml on i-dot-ai/i-dot-ai-utilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
i_dot_ai_utilities-0.3.0.tar.gz -
Subject digest:
127f1c2eef1d007e8fce08c20b6dc172985e148364d576b0db39133c0715a4d2 - Sigstore transparency entry: 537224721
- Sigstore integration time:
-
Permalink:
i-dot-ai/i-dot-ai-utilities@b140642263cc1bbeec066c3f221195813285889e -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/i-dot-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@b140642263cc1bbeec066c3f221195813285889e -
Trigger Event:
release
-
Statement type:
File details
Details for the file i_dot_ai_utilities-0.3.0-py3-none-any.whl.
File metadata
- Download URL: i_dot_ai_utilities-0.3.0-py3-none-any.whl
- Upload date:
- Size: 31.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b4c61daae3e6139e8285766b1d6fbf6a721c4d4c73a9a49aa1d8b4cb22ce5c9
|
|
| MD5 |
602c5ce28e836c942d8f7169bc914210
|
|
| BLAKE2b-256 |
70ed0cb13dc7cecc43629676e004ecc79f96d4643e01b3d4c6e95971a6de9c43
|
Provenance
The following attestation bundles were made for i_dot_ai_utilities-0.3.0-py3-none-any.whl:
Publisher:
deploy.yaml on i-dot-ai/i-dot-ai-utilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
i_dot_ai_utilities-0.3.0-py3-none-any.whl -
Subject digest:
7b4c61daae3e6139e8285766b1d6fbf6a721c4d4c73a9a49aa1d8b4cb22ce5c9 - Sigstore transparency entry: 537224741
- Sigstore integration time:
-
Permalink:
i-dot-ai/i-dot-ai-utilities@b140642263cc1bbeec066c3f221195813285889e -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/i-dot-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@b140642263cc1bbeec066c3f221195813285889e -
Trigger Event:
release
-
Statement type: