TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Резултати

Пронајдени 73 слични објави

Пребарај: #futures

当前筛选 #futures清除筛选
Crypto.inv

@crypto_1nv · Post #66 · 16.04.2024 г., 10:03

#Futures Сигнал💵 📈 Futures: $DYDX 🟢 LONG 25x 📌 Kirish: 2.134 ➕ TP: ✅ 2.156 ✅ 2.182 ✅ 2.252 Men 40$ blan kirdim Deposit: 465.79$

Hashtags

Crypto.inv

@crypto_1nv · Post #50 · 12.04.2024 г., 15:45

#Futures Сигнал💵 📈 Futures: $GMT 🟢 LONG 25x 📌 Kirish: 0.2844 ➕ TP: ✅ 0.2872 ✅ 0.2920 ✅ 0.3015 Deposit: 452.72$ ⛔️ Stop-Lose: 0.2706

Hashtags

Crypto.inv

@crypto_1nv · Post #38 · 11.04.2024 г., 10:02

#Futures 📈 Futures: SOL/USDT 🟢kirish: 173.62 - 175.38 🟢 BUY • LONG ➕ TP: ✅176.97 ✅178.72$ ❗️Stop-Lose: Likvidatsiya-dan 5% oldin

Hashtags

Crypto.inv

@crypto_1nv · Post #37 · 11.04.2024 г., 09:18

#Futures 📈 Futures: $MANA • 0.6267 🟢 BUY • LONG 25x ➕ TP: ✅0.6329 ✅0.6415 ✅0.6621 ❗️Stop-Lose: 0.5962 Men 40$ bilan kirdim Deposit: 417.64$

Hashtags

Crypto.inv

@crypto_1nv · Post #36 · 11.04.2024 г., 08:28

#Futures 📈 Futures: $PIXEL • 0.6845 🟢 BUY • LONG 10x 📌 Kirish • HOZIR ➕ TP: 1. 0.75 2. 0.80 3. 0.90 4. 1.00

Hashtags

🚨#Bitcoin Liquidations Incoming! 🚨 This chart shows where $BTC traders could get REKT if price makes a big move. 🔥 Red/Green lines going up to the sides: Total $ liquidated so far. 📊 Colorful vertical bars: Aggregated view of where most traders will get liquidated. Taller bars = more pain! Ouchies around $59.3k and $61.6k. 🤔 Possible trades: 🚨 Longs look juicy: The Kingfishers find 59.2k would be a good $BTC long Let's fish them and resume up-only Don't fight the trend: Shorts could be risky here. If those upper zones get hit, it could trigger a massive squeeze. Wait for confirmation: Maybe wait for $BTC to break a key level before jumping in. Patience is key! 🔑 ⚠️ Pro tip: This is from TheKingfisher, the OG liquidation map. Don't trust the fakes, their data is sus! 🕵️‍♂️ #Crypto#Trading#Futures#BTC (Disclaimer: Not financial advice, DYOR! Leverage trading is risky AF)

🚨#Bitcoin Liquidations Incoming! 🚨 This chart shows where $BTC traders could get REKT if price makes a big move. 🔥 Red/Green lines up to the sides: Total $ liquidated so far. Notice how it goes almost straight up? That means HUGE liquidations if we pump! 🚀 📊 Green/Yellow vertical bars: Show where most traders will get liquidated. Taller bars = more pain! Ouchies around $63k and $73k. 🤔 Possible trades: Longs look juicy: With so much to liquidate ABOVE the current price, a pump seems likely. But set stops! Don't fight the trend: Shorts could be risky here. If those upper zones get hit, it could trigger a massive squeeze. Wait for confirmation: Maybe wait for $BTC to break a key level before jumping in. Patience is key! 🔑 ⚠️ Pro tip: This is from TheKingfisher, the OG liquidation map. Don't trust the fakes, their data is sus! 🕵️‍♂️ #Crypto#Trading#Futures#BTC (Disclaimer: Not financial advice, DYOR! Leverage trading is risky AF)

Propheta Indicator Signals

@propheta_indicator · Post #23749 · 18.04.2026 г., 11:08

💹MARKET OVERVIEW - APRIL 18, 2026 ▫️Current Situation: • BTC is trading in the $73,800 – $75,200 range. We've seen some upward movement in recent days, but the price has returned to consolidation. ETH is holding around $2,320 – $2,380. - Overall market capitalization is stable, but volatility remains elevated. Key Influencing Factors: • US tax season (April 15) is over, but its effects are still impacting liquidity. • Geopolitical tensions and oil prices continue to weigh on risky assets. • Institutions continue to carefully accumulate on dips (BlackRock and MicroStrategy are active). ▫️Key levels for futures traders: • Support: $72,800 – $71,500 (critical zone) • Resistance: $75,800 – $76,500 ▫️Trading recommendations: • The market is in a phase of accumulating tension. It's best to work with reduced volume. • Avoid aggressive positions without a clear breakout of $76,000+. • The $72,800–71,500 zone is potentially interesting for longs with a hard stop. • For futures, favor strategies with a good risk/reward ratio (1:2 or 1:3). Our channels have already been fully adapted to the current structure and continue to provide high-quality filtered signals. Choose a product that suits your trading style. #Futures#ProphetaCommunity#Trading

Propheta Indicator Signals

@propheta_indicator · Post #23285 · 19.01.2026 г., 16:01

Propheta Community: Futures Digest (Jan 19) 🔥 What's happening in the market? · BTC: Dropped from $95.5K to $92.5K. The key level is $92,000. Holding above it offers a chance for recovery; a breakdown risks a fall towards $88K. · ETH: Weak, hovering around $3,200. A breakdown could target $3,000. A sustained move above $3,400 is needed for growth. · Liquidations: Nearly $900 million (mostly longs) in the past 24 hours. 💡 Key Market Shift: Bitcoin options open interest ($74.1B) has surpassed futures ($65.2B) for the first time. This is a game-changer—expect volatility to be more tied to US market hours and major options expiries. 🎯 Quick Trading Takeaways: · Reduce leverage — the market is unpredictable. · Range (flat) strategies: Be cautious—range boundaries are more easily broken by news spikes. · Trend strategies: Confirm breakouts with volume; false breaks are becoming more common. · Watch for regulatory news (CLARITY Act) and options expiries. Right now, discipline and risk management are more important than ever. Trade your plan! #ProphetaCommunity#Futures#Trading#Bitcoin

123•••67
ПретходнаСтраница 1 од 7Следна