redis-om-python icon indicating copy to clipboard operation
redis-om-python copied to clipboard

Object mapping, and more, for Redis and Python

Results 199 redis-om-python issues
Sort by recently updated
recently updated
newest added

``` results = [] if name: results = BaseProductPy.find(BaseProductPy.name % f"{name}*") if tags: results = results.find(BaseProductPy.tag.value == tags) if city: results = results.find(BaseProductPy.address.city == city) return results ``` how can...

I got this issue when updating a Model and then finding the same model that I updated. this is my code `def get_campaign_by_id_and_client_id(id, client_id): try: return InterviewRedisModel.find( InterviewRedisModel.pk == id,...

I'm sorry I think I made a mistake in #533. I misunderstood that FastAPI (v0.100.0) has a compatibility in Pydantic v1 & v2 and it can use both versions as...

Currently we are able to set an expiry after saving the model. ``` class Like(HashModel): user_id: str liked_user_id: str @root_validator() def assign_pk(cls, values): values["pk"] = f"{values['user_id']}:{values['liked_user_id']}" return values class Meta:...

It would be nice if redis\_om would run pydantic validation (to allow things like '`@validator`') before updating the model (when .update is called) so that it would prevent from using...

While indexing a field of bool type eg: ``` class SomeModel(JsonModel): ...somefields is_delelted: bool = Field(index=True) class Meta: ... ``` and while trying to list all entity `SomeModel.find().all()` return []

reference: model.model (1251) ```python if not getattr(new_class._meta, "model_key_prefix", None): # Don't look at the base class for this. new_class._meta.model_key_prefix = ( f"{new_class.__module__}.{new_class.__name__}" ) ``` so the property default to the...

**Environment:** redis-om: 0.2.1 pydantic: 2.4.2 pydantic-core: 2.11.0 fastapi: 0.104.0 **Description:** When using the check method in the custom RedisModel which internally calls the validate_model function from pydantic v1, the validation...

### OS: Ubuntu 22.04.3 LTS (WSL2) ### Python: 3.11.6 ### Redis: 7.2.2 Code sample: from pydantic import HttpUrl, BaseModel from redis_om import JsonModel class Crush(BaseModel): http: HttpUrl class Test(JsonModel): http:...