Skip to content

Switch from Poetry to UV for dependency management#781

Merged
abrookins merged 7 commits intomainfrom
docs-material-theme-and-1.0-updates
Jan 23, 2026
Merged

Switch from Poetry to UV for dependency management#781
abrookins merged 7 commits intomainfrom
docs-material-theme-and-1.0-updates

Conversation

@abrookins
Copy link
Collaborator

Summary

Switch dependency management from Poetry to UV for faster, more reliable builds.

Changes

Build System

  • Convert pyproject.toml from Poetry format to PEP 621 standard with hatchling backend
  • Update Makefile to use uv commands instead of poetry
  • Add uv.lock lockfile

CI/CD Workflows

  • Update CI workflow to use astral-sh/setup-uv@v5
  • Update PyPI publish workflow with UV and trusted publishing
  • Update docs workflow with UV

Documentation

  • Update all docs referencing Poetry to use UV
  • Add comprehensive example apps (FastAPI async, Flask sync)
  • Add example app tests

Example Applications

New examples/ directory with:

  • fastapi_app.py - Comprehensive async FastAPI example demonstrating all Redis OM features
  • flask_app.py - Comprehensive sync Flask example
  • README.md - Documentation for running examples

Features demonstrated in examples:

  • HashModel and JsonModel
  • EmbeddedJsonModel for nested data
  • All field types (str, int, float, bool, datetime, List, Enum)
  • Field options (index, sortable, full_text_search)
  • CRUD operations, queries, sorting, pagination
  • TTL/expiration
  • FastAPI lifespan pattern and Flask before_request pattern for migrations

Testing

  • All existing tests pass
  • New test_examples.py added (10 tests async + 10 sync)
  • Example apps self-test successfully
  • uv build creates valid wheel and sdist

- Switch to Material for MkDocs theme with Redis branding
- Combine connections.md and redis_modules.md into redis_setup.md
- Recommend Redis 8 over Redis Stack
- Update all code examples for 1.0:
  - Add model-level index=True to indexed models
  - Update Pydantic validators to v2 syntax
  - Update error message formats to Pydantic v2 style
  - Replace @app.on_event with lifespan pattern in FastAPI examples
  - Replace Migrator().run() with om migrate CLI reference
- Convert pyproject.toml to PEP 621 format with hatchling backend
- Update Makefile to use uv commands
- Update CI, PyPI publish, and docs workflows for UV
- Update documentation references to UV
- Add example apps (FastAPI, Flask) demonstrating all Redis OM features
- Add tests for example app patterns
- Add uv.lock, remove poetry.lock reference from pre-commit
@jit-ci

This comment has been minimized.

@jit-ci

This comment has been minimized.

- Add 'uv' to spellcheck wordlist
- Add safe_float() helper to reject NaN/Inf values in Flask app
@abrookins abrookins merged commit 700e512 into main Jan 23, 2026
15 checks passed
@abrookins abrookins deleted the docs-material-theme-and-1.0-updates branch January 23, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant