@luxury_lifestyle_billionaire_hub · Post #6902 · 10.07.2020 г., 15:30
🌈Only 19 Sian Roadster will be made 💰 . All sold out 💰😍 #Luxury#Goals 📷octavius_92 ❤️🔜 LuxurySuperCars ✅🔜@R_Group_Official ━━━━━━━━━━━━━━━━━
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #397 · 12 ное.
Использование Pydantic сегодня стало нормой, и это правильно. Но иногда на ревью вижу, что используют его не всегда корректно. Например, метод BaseModel.model_dump() по умолчанию не преобразует стандартные типы, такие как datetime, UUID или Decimal, в простой сериализуемый для JSON вид. Тогда пишут кастмоный сериализатор для этих типов чтобы функция json.dump() не падала с ошибкой. import uuid from datetime import datetime from decimal import Decimal from uuid import UUID from pydantic import BaseModel class MyModel(BaseModel): id: UUID date: datetime value: Decimal obj = MyModel( id=uuid.uuid4(), date=datetime.now(), value='1.23' ) print(obj.model_dump()) # не подходит для json.dump # { # 'id': UUID('4f8c1bc4-25fd-40cd-9dbe-2c73639b0dc1'), # 'date': datetime.datetime(2025, 12, 12, 12, 12, 12, 111111), # 'value': Decimal('1.23') # } # добавляем свой кастомный сериализатор json.dumps(obj.model_dump(), cls=MySerializer) # { # 'id': '4f8c1bc4-25fd-40cd-9dbe-2c73639b0dc1', # 'date': '2025-12-12T12:12:12.111111', # 'value': '1.23' # } В данном случае класс MySerializer обрабатывает datetime, UUID и Decimal. Например так: class MySerializer(json.JSONEncoder): def default(self, o): if isinstance(o, Decimal): return str(o) elif isinstance(o, datetime): return o.isoformat() elif isinstance(o, UUID): return str(o) return super().default(o) Специально для тех, кто всё еще так делает - в этом нет необходимости! Pydantic может это сделать сам, просто нужно добавить параметр mode="json". json.dumps(obj.model_dump(mode="json")) # { # 'id': '4f8c1bc4-25fd-40cd-9dbe-2c73639b0dc1', # 'date': '2012-12-12T12:12:12.111111', # 'value': '1.23' # } #pydantic#libs
Пребарај: #goals
@luxury_lifestyle_billionaire_hub · Post #6902 · 10.07.2020 г., 15:30
🌈Only 19 Sian Roadster will be made 💰 . All sold out 💰😍 #Luxury#Goals 📷octavius_92 ❤️🔜 LuxurySuperCars ✅🔜@R_Group_Official ━━━━━━━━━━━━━━━━━
@PensivePost · Post #5365 · 17.08.2021 г., 04:45
When it's time to reach my goal it requires so many sacrifices so my heart always whispers to my soul. But one thing I would like to remind myself is Nothing changes, if Nothing changes...! #review #goals
@venturememes · Post #454 · 02.11.2025 г., 10:01
POV: После $5B TGE слил свою залоканную фаундерскую аллокацию хедж-фонду через OTC с 40% дисконтом #winning#goals
@luxury_lifestyle_billionaire_hub · Post #6903 · 10.07.2020 г., 15:30
🌈Pet like this? 😍 #Luxury#Goals#Travel#UAE#Dubai 📷humaidalbuqaish ❤️🔜 LuxurySuperCars ✅🔜@R_Group_Official ━━━━━━━━━━━━━━━━━
@testflightynoti · Post #37935 · 09.05.2026 г., 19:50
#Pocket#Goals#Savings#Tracker Join the Pocket Goals: Savings Tracker beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/4vA79n6n Shared by Dimitri
@googlefactss · Post #40613 · 31.01.2026 г., 23:01
As you may have noticed one month into the new year, traditional New Year’s resolutions often fail because people set vague or too big goals, rely only on willpower, and don’t have a clear plan. Small, specific changes and building habits step by step are supposed to work better. 🔄 [Read more] @googlefactss #NewYearsResolutions#Habits#Goals#SelfImprovement
@googlefactss · Post #40880 · 30.03.2026 г., 22:01
Self-control is not just about willpower. 🧠 Building habits and routines makes it easier to stick to your goals. Repeating small positive actions regularly strengthens your ability to maintain self-discipline over time. Setting up your environment to make good choices easier and temptations harder also helps. After about three months, actions that once felt difficult can start to feel natural. 🔁🏃♂️🧩📊 [Read more] @googlefactss #psychology#selfcontrol#habits#goals#science#mindset If you have ideas or feedback contact us: @Googlefactss_Feedback_bot