sopherapps / pydantic-redis

A simple Declarative ORM for Redis using pydantic Models
https://sopherapps.github.io/pydantic-redis
MIT License
39 stars 14 forks source link

Enhancement/pydantic v2 #26

Closed Tinitto closed 6 months ago

Tinitto commented 6 months ago

Why

Closes #25

Pydantic V2 was a major rewrite of pydantic. Pydantic V2 is much faster than pydantic v1; and more strict. Many other projects are expected to move on to pydantic V2. We should not be left behind.

What was done

How to test

git clone https://github.com/sopherapps/pydantic-redis.git
cd pydantic-redis
git checkout enhancement/pydantic-v2
virtualenv -p /usr/bin/python3.8 env
source env/bin/activate
pip install -r requirements.txt
pytest --benchmark-disable
pytest test/test_benchmarks.py --benchmark-columns=mean,min,max --benchmark-name=short