semvec/pypi-packages huggingface dataset:
pydantic-translations 0.4.1
Translations for pydantic errors.
Requires Python: >=3.9
Keywords: mypy, typing, annotations, type annotations

# pydantic-translations

Translations for pydantic errors.

## Languages

Currently, we have translated pydantic v1.10.2 errors to the following languages:

* `de`: German. 87/87.
* `es`: Spanish. 87/87.
* `fr`: French. 87/87.
* `it`: Italian. 87/87.
* `nl`: Dutch. 87/87.
* `ru`: Russian. 82/87.

Need more languages? Contributions are welcome!

## Installation

```bash
python3 -m pip install pydantic-translations
```

## Usage

Let's say you have a pydantic model `User`:

```python
from pydantic import BaseModel

class User(BaseModel):
    age: int
```

The translations are managed by the `Translator` class that is instantiated with the locale (language) you want the messages to be translated to:

```python
from pydantic_translations import Translator

tr = Translator('ru')
```

You can use translator as a context manager to translate pydantic exceptions raised from the context:

```python
with tr:
    User.parse_obj({'age': 'idk'})
# ValidationError: 1 validation error for User
# age
#   значение должно быть целым числом (type=type_error.integer)
```

Or use the `translate_exception` method to directly translate an exception instance:

```python
from pydantic import ValidationError

try:
    User.parse_obj({'age': 'idk'})
except ValidationError as exc:
    exc = tr.translate_exception(exc)
    raise exc
```

Or use the `translate_error` method to translate a specific error:

```python
try:
    User.parse_obj({'age': 'idk'})
except ValidationError as exc:
    err = exc.errors()[0]
    err = tr.translate_error(err)
    print(err)
# {'loc': ('age',), 'msg': 'значение должно быть целым числом', 'type': 'type_error.integer'}
```

## Custom translations

If you have translated the errors to a new language, the best you can do is contribute it back here. If, for some (legal?) reason, you can't, you may pass into the Translated as a locale a [l10n](https://github.com/orsinium-labs/l10n) locale with your translations:

```python
from l10n import Locales

locales = Locales()
locale = locales['ua']
tr = Translator(locale)
```

## Contributors

1. The original error messages provided by [@samuelcolvin](https://github.com/samuelcolvin) and [pydantic contributors](https://github.com/pydantic/pydantic/graphs/contributors).
1. The Russian translation is provided by [@orsinium](https://github.com/orsinium).
1. The German, Spanish, French, Italian, and Dutch translations are provided by [Andovar](https://andovar.com/) translation agency.

Minor corrections and improvements are provided by [the project contributors](https://github.com/orsinium-labs/pydantic-translations/graphs/contributors).
alignment-memory 0.1.55
Session-based conversation log CLI (JSONL).
Requires Python: >=3.9

﻿# ALIGNMENT MEMORY (CLI)

가벼운 **세션 기반 대화 로그** 저장/검색 툴입니다. 각 세션은 **12자리 hex ID**로 생성되며(JSONL 라인 저장), 검색/요약/내보내기 등을 지원합니다.

## Install

```bash
pip install -U alignment_memory
# 실행 명령: alm
alm --help

Class1.filter_events(..., tz='local'|'utc'|'+09:00') 지원

AB_TZ_OFFSET="+09:00" 환경변수로 기본 로컬 오프셋 오버라이드 가능

## [0.1.53] - 2025-08-17
### Added
- SBOM 생성(syft) 워크플로우
### Security
- setuptools 취약점 제거(>=78.1.1)
### Tests
- 커버리지 게이트 80% 유지, CI에서 자동 측정(pyproject addopts)
### Misc
- 릴리스 스모크(휠 설치 + alm --help) 통과