semvec/pypi-packages huggingface dataset:
artifact-lint-py 1.0.1
A python framework for developing artifact linters
Requires Python: >=3.9
Keywords: artifact, lint, py, linter

![artifact-lint-py](https://raw.githubusercontent.com/whatsacomputertho/artifact-lint-py/main/doc/source/_static/artifact-lint-py.png)

# artifact-lint-py

[![Test](https://github.com/whatsacomputertho/artifact-lint-py/actions/workflows/test.yaml/badge.svg)](https://github.com/whatsacomputertho/artifact-lint-py/actions/workflows/test.yaml) [![Sec](https://github.com/whatsacomputertho/artifact-lint-py/actions/workflows/sec.yaml/badge.svg)](https://github.com/whatsacomputertho/artifact-lint-py/actions/workflows/sec.yaml) [![Doc](https://github.com/whatsacomputertho/artifact-lint-py/actions/workflows/doc.yaml/badge.svg)](https://github.com/whatsacomputertho/artifact-lint-py/actions/workflows/doc.yaml) [![Build](https://github.com/whatsacomputertho/artifact-lint-py/actions/workflows/build.yaml/badge.svg)](https://github.com/whatsacomputertho/artifact-lint-py/actions/workflows/build.yaml)

A python framework for developing artifact linters

**Docs**: https://whatsacomputertho.github.io/artifact-lint-py/

**Contributing**: [CONTRIBUTING.md](https://github.com/whatsacomputertho/artifact-lint-py/blob/main/CONTRIBUTING.md)

## Quick Example

```python
from lint.rule import LintRule
from lint.result import LintResult
from lint.status import LintStatus

class IntegerIsEven(LintRule[int]):
    def lint(self, artifact: int) -> LintResult:
        if artifact % 2 == 0:
            return LintResult(
                status=LintStatus.INFO,
                message=f"({self.name()}) Integer was even: {artifact}"
            )
        return LintResult(
            status=LintStatus.ERROR,
            message=f"({self.name()}) Integer was odd: {artifact}"
        )
integer_is_even = IntegerIsEven()

# Lint an even integer
even_result = integer_is_even.lint(2)
print(even_result)

# Lint an odd integer
odd_result = integer_is_even.lint(337)
print(odd_result)
```

To run this example, simply execute the following from the root of this repository
```bash
python3 examples/quick-example.py
```

## Installation

### Using Pip

Run the following command to install the latest version of this package
```bash
pip install artifact-lint-py
```

### Local Install

1. Clone this repository
2. [Build the project from source](#build)
3. Locate the `.whl` (wheel) file in the `dist` folder
    - It should be named something like so: artifact_lint_py-1.0.1-py3-none-any.whl
4. Run the following command from the root of the repository, replacing the name of the `.whl` file if necessary
    ```bash
    pip install dist/artifact_lint_py-1.0.1-py3-none-any.whl
    ```

## Build

From the root of this repository, execute
```bash
make build
```

Under the hood, this will execute python3 -m build and produce a .whl (wheel) and .tgz (TAR-GZip archive) file in the dist subdirectory. For more on this project's make recipes, see [CONTRIBUTING.md](CONTRIBUTING.md).
cleanlab-codex 1.0.35
Python client library for developers to integrate Cleanlab Codex into RAG systems
Requires Python: >=3.9

# Cleanlab Codex - Closing the AI Knowledge Gap

[![Build Status](https://github.com/cleanlab/cleanlab-codex/actions/workflows/ci.yml/badge.svg)](https://github.com/cleanlab/cleanlab-codex/actions/workflows/ci.yml) [![PyPI - Version](https://img.shields.io/pypi/v/cleanlab-codex.svg)](https://pypi.org/project/cleanlab-codex) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cleanlab-codex.svg)](https://pypi.org/project/cleanlab-codex) [![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://help.cleanlab.ai/codex/api/)

Codex enables you to seamlessly leverage knowledge from Subject Matter Experts (SMEs) to improve your RAG/Agentic applications.

The `cleanlab-codex` library provides a simple interface to integrate Codex's capabilities into your RAG application.
See immediate impact with just a few lines of code!

## Demo

Install the package:

```console
pip install cleanlab-codex
```

Integrating Codex into your RAG application is as simple as:

```python
from cleanlab_codex import Project
project = Project.from_access_key(...)

# Your existing RAG code:
context = rag_retrieve_context(user_query)
prompt = rag_form_prompt(user_query, retrieved_context)
response = rag_generate_response(prompt)

# Detect bad responses and remediate with Cleanlab
results = project.validate(query=query, context=context, response=response,
    messages=[..., prompt])

final_response = (
    results["expert_answer"] # Codex's answer
    if results["expert_answer"] is not None
    else response # Your RAG system's initial response
)
```

<!-- TODO: add demo video -->
<!-- Video should show Codex added to a RAG system, question asked that requires knowledge from an outside expert, Codex used to ask an outside expert, and expert response returned to the user -->

## Why Codex?
- **Detect Knowledge Gaps and Hallucinations**: Codex identifies knowledge gaps and incorrect/untrustworthy responses in your AI application, to help you know which questions require expert input.
- **Save SME time**: Codex ensures that SMEs see the most critical knowledge gaps first.
- **Easy Integration**: Integrate Codex into any RAG/Agentic application with just a few lines of code.
- **Immediate Impact**: SME answers instantly improve your AI, without any additional Engineering/technical work.

## Documentation

Comprehensive documentation along with tutorials and examples can be found [here](https://help.cleanlab.ai/codex).

## License

`cleanlab-codex` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.