Metadata-Version: 2.4
Name: anaconda-connector-conda
Version: 0.1.17
Summary: Plugin that exposes conda capabilities through a custom API.
Author: anaconda
License-File: LICENSE
Keywords: anaconda,connector
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: <4.0,>=3.10
Requires-Dist: anaconda-connector-core==0.1.17
Requires-Dist: anaconda-connector-utilities==0.1.17
Requires-Dist: attrs>=26.1.0
Requires-Dist: conda<26.3.0,>=25.11.1
Requires-Dist: frozendict<3.0.0a0,>=2.4.6
Requires-Dist: menuinst>=2
Requires-Dist: orjson>=3.11.7
Requires-Dist: pydantic<3.0.0a0,>=2.12.5
Requires-Dist: requests<3.0.0a0,>=2.33.1
Requires-Dist: typing-extensions<5.0.0a0,>=4.15.0
Provides-Extra: applications
Requires-Dist: anaconda-connector-applications==0.1.17; extra == 'applications'
Description-Content-Type: text/markdown

# Anaconda Connector Conda integration

Plugin that exposes conda capabilities through a custom API.


# Conda Endpoint Exceptions
## Overview
All exceptions ultimately inherit from EndpointError and follow a consistent, predictable coding scheme.
These exceptions are implemented using attrs (for immutable error objects) and Pydantic (for structured error records).

# Exception Code Format

Each exception has a machine-fiendly code, used for programmatic error handling.

## Codes:
* Must contain 1 to 3 components
* Components are separated by `:`
* Each component represents a progressively more specific category
* Codes must not exceed 3 components


### Examples of valid codes
| Description                            | Code                          |
| -------------------------------------- | ----------------------------- |
| Base Conda error                       | `conda`                       |
| Environment-related errors             | `conda:environment`           |
| Specific environment “not found” error | `conda:environment:not-found` |
| Solver-related conflict                | `conda:solver:spec-conflict`  |
| Validation error                       | `validation:invalid-input`    |

### Examples of invalid codes
| Invalid Code                     | Why                     |
| -------------------------------- | ----------------------- |
| `conda:environment:clone:failed` | 4 components (too many) |
| `conda::not-found`               | Empty component         |
| `very:long:deep:code`            | More than 3 components  |


## Exception Hierarchy
```python
EndpointError
 ├── ValidationError
 │     └── ValidationErrorRecord  (used inside ValidationError)
 │
 └── CondaError
        ├── CondaSolverError
        │      ├── CondaConflictingSpecError
        │      └── CondaUnsatisfiableError
        │
        ├── PackageError
        │      ├── PackageNotFoundError
        │      └── PackageNotAllowedError
        │
        └── CondaEnvironmentError
                └── CondaEnvironmentCloneError
```

## Validation Errors
### `ValidationErrorRecord`

A frozen Pydantic model describing a single invalid input.
```python
ValidationErrorRecord(
    location=("packages", 0),
    message="Package name must be a string"
)

```
#### Fields
* location: tuple[int | str, ...] — where in the request body the error occurred
* message: str — human-readable description

### `ValidationError`
Top-level error raised when a request contains invalid input data.

#### Code:
```
validation:invalid-input
```

#### Example:
```python
raise ValidationError(errors=(
    ValidationErrorRecord(
        location=("packages",),
        message="At least one package must be provided"
    ),
))
```