@degenpump_crypto_pump_signals · Post #504435 · 11.05.2026 г., 15:25
#NATGAS/USDT Take-Profit target 2 ✅ Profit: 31.5223% 📈 Period: 13 hr 44 min ⏰
Hashtags
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
Пребарај: #natgas
@degenpump_crypto_pump_signals · Post #504435 · 11.05.2026 г., 15:25
#NATGAS/USDT Take-Profit target 2 ✅ Profit: 31.5223% 📈 Period: 13 hr 44 min ⏰
Hashtags
@degenpump_crypto_pump_signals · Post #504429 · 11.05.2026 г., 13:03
#NATGAS/USDT Take-Profit target 1 ✅ Profit: 21.7837% 📈 Period: 11 hr 21 min ⏰
Hashtags
@cryptobull_360 · Post #48993 · 01.04.2026 г., 17:28
🆕🛢#CL#BZ#NATGAS Binance officially launches oil and natural gas futures trading.
@degenpump_crypto_pump_signals · Post #504551 · 12.05.2026 г., 12:14
📈 CORNIX NO.1 PUMP SIGNAL PROVIDER ❗️ Limited slots available ❤️ 👑 841.7% PROFIT RESULTS FOR 2026-05-11 🤑 #xau – 21.8085% % within 4 days 4 hr #portal – 31.1203% % within 5 hr 19 min #bnb – 27.8712% % within 9 hr 2 min #space – 17.9839% % within 29 min #dash – 19.3548% % within 2 hr 43 min #bananas31 – 18.778% % within 40 min #twt – 18.0616% % within 2 hr 5 min #agld – 17.7646% % within 1 hr 13 min #super – 30.901% % within 7 hr 53 min #sapien – 32.1038% % within 1 hr 49 min #cyber – 19.6164% % within 2 hr 55 min #ogn – 21.9959% % within 12 hr 11 min #order – 17.6768% % within 1 hr 34 min #meme – 22.0228% % within 4 hr 44 min #btc – 21.8047% % within 10 hr 24 min #4 – 27.4245% % within 1 hr 51 min #elsa – 18.0723% % within 1 hr 4 min #raysol – 21.1516% % within 11 hr 13 min #fil – 22.6667% % within 2 hr 5 min #natgas – 31.5223% % within 13 hr 44 min #goat – 21.5414% % within 2 hr 26 min #acu – 26.9737% % within 46 min #gmttoken – 27.49% % within 1 hr 49 min #aio – 17.9863% % within 30 min #movr – 27.7226% % within 43 min #sun – 21.4921% % within 2 days 3 hr #huma – 31.6925% % within 7 hr 45 min #avax – 17.982% % within 1 hr 41 min #turtle – 23.0352% % within 3 hr 9 min #storj – 17.3797% % within 1 hr 16 min #akt – 17.9314% % within 12 min #xpd – 21.8375% % within 4 hr 24 min #bio – 17.8676% % within 15 min #bsv – 27.8746% % within 2 hr 35 min #mstr – 31.6187% % within 1 day 5 hr #crcl – 31.5523% % within 1 day 4 hr 👑 DegenPump™ 2022‑2026 monthly profit results 👀👇 https://t.me/degenpump_crypto_pump_signals/133203 Total profit 841.7% 💵🔥 Total Loss: -9.76% 📉 🎯 Net Profit: 831.94% 💹 👉 No other channel can give you so much profit in one day. 👉 As you can see, you can earn back fees within 1 day. 🤤 You don’t want to miss your profit longer? 💵 Contact now @degeninvestor for premium membership