i-dot-ai-utilities


Namei-dot-ai-utilities JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryUtilities for i.ai to use
upload_time2025-10-20 15:20:01
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.10
licenseMIT
keywords package python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # 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.

## Installation

When installing the package, the base package comes with only the `logger` module, to install more use `extras`. The following extras are available:

- auth
- file_store
- litellm
- metrics
- all

To install the package, use your package manager of choice:

```bash
pip install "i-dot-ai-utilities[all]"

poetry add "i-dot-ai-utilities[all]"

uv pip install "i-dot-ai-utilities[all]"
```

Replace `[all]` with any extras from the list above, comma separated, or remove entirely to install just the base package.

## 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](./src/i_dot_ai_utilities/logging/README.md).

#### 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](./src/i_dot_ai_utilities/metrics/README.md).

#### File store

The file store library currently only supports aws s3 as this is the main/only file store that we use in anger.

It can be used to upload and download files, and generate file download links for end-users to use.

The aim is to be able to plug more file storage destinations into this module so it can be swapped out easily.

You can find out information on usage of the file store library in the [file store library readme](./src/i_dot_ai_utilities/file_store/README.md).

#### LiteLLM

This library currently supports LLM proxy through LiteLLM, for chat and embedding functions.

The hope for this library is to easily swap between proxies for whichever is best-in-market at the time.

As the end-user, you'll have to make sure that the API key issued to you by LiteLLM will support the models you're trying to use.

More information on usage and setup can be found in the [litellm library readme](./src/i_dot_ai_utilities/litellm/README.md).

### Future features:

- authentication
- authorisation
- vector stores

## 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:
1. Update pyproject.toml:
```
[[tool.poetry.source]]
name = "test-pypi"
url = "https://test.pypi.org/simple/"
priority = "supplemental"
```
2. 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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "i-dot-ai-utilities",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "package, python",
    "author": null,
    "author_email": "i-dot-ai-packages <packages@cabinetoffice.gov.uk>",
    "download_url": "https://files.pythonhosted.org/packages/1c/cc/5eb6e038e26a68af5dd240d9d90a2e72d7c580c175cd480b4db3d502325d/i_dot_ai_utilities-0.4.0.tar.gz",
    "platform": null,
    "description": "# i.AI Utility Code\n\n`i-dot-ai-utilities` is a python package used and developed by the i.AI team within DSIT.\nIt provides common features used in many of our applications.\n\n## Installation\n\nWhen installing the package, the base package comes with only the `logger` module, to install more use `extras`. The following extras are available:\n\n- auth\n- file_store\n- litellm\n- metrics\n- all\n\nTo install the package, use your package manager of choice:\n\n```bash\npip install \"i-dot-ai-utilities[all]\"\n\npoetry add \"i-dot-ai-utilities[all]\"\n\nuv pip install \"i-dot-ai-utilities[all]\"\n```\n\nReplace `[all]` with any extras from the list above, comma separated, or remove entirely to install just the base package.\n\n## Features\n\n### Current features:\n\n#### Structured Logging\n\nThe 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.\n\nYou can find information on usage of the logging library in the [logging library readme](./src/i_dot_ai_utilities/logging/README.md).\n\n#### Metrics Collection\n\nThe 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.\n\nThere'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.\n\nYou can find information on usage of the metrics collection library in the [metrics library readme](./src/i_dot_ai_utilities/metrics/README.md).\n\n#### File store\n\nThe file store library currently only supports aws s3 as this is the main/only file store that we use in anger.\n\nIt can be used to upload and download files, and generate file download links for end-users to use.\n\nThe aim is to be able to plug more file storage destinations into this module so it can be swapped out easily.\n\nYou can find out information on usage of the file store library in the [file store library readme](./src/i_dot_ai_utilities/file_store/README.md).\n\n#### LiteLLM\n\nThis library currently supports LLM proxy through LiteLLM, for chat and embedding functions.\n\nThe hope for this library is to easily swap between proxies for whichever is best-in-market at the time.\n\nAs the end-user, you'll have to make sure that the API key issued to you by LiteLLM will support the models you're trying to use.\n\nMore information on usage and setup can be found in the [litellm library readme](./src/i_dot_ai_utilities/litellm/README.md).\n\n### Future features:\n\n- authentication\n- authorisation\n- vector stores\n\n## Settings\n\nThis is where some of the above can be found:\n\n\n## How to use\n\n### Unit Testing\n\nAll modules contained within this repo include robust test suites. You can run tests for all modules in this package using `make test`.\n\nTests and linting runs on every push and merge to main.\n\nWhen 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.\n\n### CI/CD & Releases\n\nReleases 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`.\n\nYou 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.\n\nTo test a pre-release tag, you can follow these steps in a repo of your choice:\n1. Update pyproject.toml:\n```\n[[tool.poetry.source]]\nname = \"test-pypi\"\nurl = \"https://test.pypi.org/simple/\"\npriority = \"supplemental\"\n```\n2. Load the specific version into the environment (replacing version number as required)\n```\npoetry add --source test-pypi i-dot-ai-utilities==0.1.1rc202506301522\n```\n\n\n\n## Licence\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Utilities for i.ai to use",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/i-dot-ai/i-dot-ai-utilities"
    },
    "split_keywords": [
        "package",
        " python"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "971ab91b085b75afe1ecd86c2d87532425d0c9a9b4770a08e6a243afebe076fd",
                "md5": "25abb478516f0e20b7c09613088c5826",
                "sha256": "9b08dd4c06095c16456c19550683cd20118af3efcf916011c7302522e78dc314"
            },
            "downloads": -1,
            "filename": "i_dot_ai_utilities-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "25abb478516f0e20b7c09613088c5826",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 50605,
            "upload_time": "2025-10-20T15:20:00",
            "upload_time_iso_8601": "2025-10-20T15:20:00.068677Z",
            "url": "https://files.pythonhosted.org/packages/97/1a/b91b085b75afe1ecd86c2d87532425d0c9a9b4770a08e6a243afebe076fd/i_dot_ai_utilities-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1ccc5eb6e038e26a68af5dd240d9d90a2e72d7c580c175cd480b4db3d502325d",
                "md5": "91789754ebadc2fb1aca0272f3a9c9f4",
                "sha256": "8c150ae81dd7e6fe9e59ebac310e1a0148d49f0e6799cae9ab673969df683532"
            },
            "downloads": -1,
            "filename": "i_dot_ai_utilities-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "91789754ebadc2fb1aca0272f3a9c9f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 213650,
            "upload_time": "2025-10-20T15:20:01",
            "upload_time_iso_8601": "2025-10-20T15:20:01.767553Z",
            "url": "https://files.pythonhosted.org/packages/1c/cc/5eb6e038e26a68af5dd240d9d90a2e72d7c580c175cd480b4db3d502325d/i_dot_ai_utilities-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-20 15:20:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "i-dot-ai",
    "github_project": "i-dot-ai-utilities",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "i-dot-ai-utilities"
}
        
Elapsed time: 1.44267s