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

Резултати

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

Пребарај: #arbitrum

当前筛选 #arbitrum清除筛选
Binance Alpha Airdrop Tracker

@BinanceAlphaAirdropTracker · Post #475 · 10.12.2025 г., 10:00

New Alpha Drop available 🎉 🪂 Airdrop: Lava Network 💎 Symbol: $LAVA 📅 Start: Wed, 10 Dec 2025 10:00:00 UTC ⏳ End: Thu, 11 Dec 2025 10:00:00 UTC 🎯 Threshold Priority/FCFS: 230/230 pts ⚖️ Deduct points: -15 pts 🎁 Airdrop: 165 $LAVA ($35) ⛓️ Chain: #ARBITRUM (42161) 📦 Contract: 0x11e969e9b3f89cb16d686a03cd8508c9fc0361af

Hashtags

Binance Alpha Airdrop Tracker

@BinanceAlphaAirdropTracker · Post #449 · 28.11.2025 г., 08:00

New Alpha Drop available 🎉 🪂 Airdrop: Vision 💎 Symbol: $VSN 📅 Start: Fri, 28 Nov 2025 08:00:00 UTC ⏳ End: Sat, 29 Nov 2025 08:00:00 UTC 🎯 Threshold Priority/FCFS: 252/252 pts ⚖️ Deduct points: -15 pts 🎁 Airdrop: 400 $VSN ($35) ⛓️ Chain: #ARBITRUM (42161) 📦 Contract: 0x6fbbbd8bfb1cd3986b1d05e7861a0f62f87db74b

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #173 · 19.04.2023 г., 03:53

High hope for another #Arbitrum hype still exists? Because we detect 2 whales that have just accumulated large amounts of $ARB: ✅ Whale 0x6b72 swapped 1.01M $USDT for 607,352 $ARB 4 hours ago. Average price: $1.66 ✅ Whale 0x0610 accumulated a total of 2.332M $ARB over the past 2 days. Average price: $1.68 👉 More details: https://twitter.com/spotonchain/status/1648532794103177217

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #141 · 01.04.2023 г., 02:34

🚨🚨2,693,961,178 $ARB (~$3.72B) were moved out of #Arbitrum vesting wallet 0x148440 and distributed to 145 addresses. Address 0x7ff89e received the most at 72,428,835 $ARB ($99.95M), now the 8th largest holder. The distribution process took place via middle wallet 0x1e7016. 4.17M $ARB (~$5.76M) remained undistributed in it. Addresses - Team ARB vesting contract: 0x148440E028565Db5f790fA3fbdbBcF0402A6a289 - Middle wallet: 0x1e7016f7c23859d097668c27b72c170ed7129a10 - Wallet the received the most: 0x7ff89e3c139a30fea7f0d0b079e0d17b95267137

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #139 · 31.03.2023 г., 07:16

This smart trader, who used to earn $671.6K from trading $GRAIL, started to touch on other #Arbitrum tokens: - 306.6K $JOE purchased at $0.59 (~$180K). Now staked and worth ~$195K. - 3.16M$RDNT amassed at $0.4 ($1.27M) from Mar 21-23. Now worth ~ $1.2M He once earned x2 his investment in $GRAIL by: ✅ Neatly accumulating 342 $GRAIL at only $1,815 (~$621.4K) during market downtime ✅ Sold all $GRAIL at an impressive price of $3,777 on Mar 22 when $GRAIL price surged due to the #Arbitrum airdrop 👉 More details: https://twitter.com/spotonchain/status/1641694153926144000

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #117 · 22.03.2023 г., 03:22

🚨🚨Arca has sold most of its #Arbitrum related tokens, maybe they are waiting for $ARB launch 🤔🤔 ➡️ Swapped 1.6M $RDNT to 712.78K USDT (sell at $0.445 vs buy at $0.274) 10 hours ago ➡️ Swapped 312,000 $SYN for 165.62 $ETH (~$267K) (sell at $0.8 vs buy at $1.21) 4 hours ago Currently, it clears all $DPX, $RDNT and still holds 20,198 $GMX ($1.6M) in staking and 548,779 $SYN ($510K) in two wallets Addresses: 0xa66f8Db3B8F1e4c79e52ac89Fec052811F4dbd19 0x23a5efe19aa966388e132077d733672cf5798c03

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #73 · 02.03.2023 г., 12:01

🔥 VC Arca & traders seem to bet on #Arbitrum token $DPX too! 👉 Arca piled 1,881 $DPX from Feb 17 to 23 at $394 per $DPX (total cost $741.3K). 👉 Trader 0x2761 bought 1,867 $DPX on Mar 1 with 450 $ETH (~$741K) at $396.9 per $DPX. He once made $66.7K by trading $DPX before!

Hashtags

Airdrop Strikers™

@airdropstrikers · Post #1466 · 10.10.2023 г., 20:20

🎉Get ready for an exclusive $SBT Token airdrop!🌟 🤩 Suitbot is a trading bot operating on #ETH and #Arbitrum, aiming to simplify and enhance your DEFI experience. We will be distributing 1 million tokens to our active community celebrating our token launch! 🫡 Is really easy to participate‼️ 🤖 Use our bot to participate. 💬 Join our Telegram for details. 🔗 Telegram group: https://t.me/SuitBotPort 🔗 Twitter: https://twitter.com/SuitBot_TG Don't miss out on this opportunity! 🚀

SpotOnChain | Announcement

@spotonchain · Post #152 · 07.04.2023 г., 05:51

With the ongoing hype #Arbitrum narrative, $GMX has become 🔥 than ever before. Let us review some of the top $GMX activites lately! 1. Address 0x426fc1 ❗️ Re-amassed 12K $GMX using 526 $ETH (~$994K) on Apr 06 (18hrs ago) 2. Address 0x297903 ❗️ Amassed 4.5K $GMX since Mar 07 at $74.3 (~$335K); just got 1.2K $GMX from #Binance at $80.2 (~$100K) on Apr 05 💰 Current holding: 8.6K $GMX (~$677K) 3. Address 0xde32e5 ❗️ Amassed 61K $GMX at $76.6 (~$4.7M) on Apr 05 in mid wallet 0xdf42be -> Staked all 💰 Holds 108.7K $GMX (~$8.7M) -> expected profit of $400K 👉 More details: https://twitter.com/spotonchain/status/1644213451001327616

Airdrop Gold : Crypto Airdrop

@airdropgoldchannel · Post #158061 · 17.03.2026 г., 14:50

🚀 Just dropped my special Variational Invite Code: OMNIGOLD https://omni.variational.io/?ref=OMNIGOLD Use it → get Silver tier on Omni for 90 days instantly (better points multiplier + loss refund odds)! Zero-fee perps DEX on #Arbitrum. Farming $VAR #airdrop just got easier 🔥 Connect wallet & sign up now!

Airdrop3 LTD

@airdrop3ltd · Post #382 · 07.04.2023 г., 17:05

🪂#Airdrop event for #Arbitrum💙 🏃 First come first served 🏃 🏆 Airdrop Portal 👉https://arb-claim.kepler.homes?code=71D03A 💙 Invitation code: 71D03A A total of 550,000 addresses are eligible for #airdrop and 5 types of AirDropbox with different scarcity can be issued.

ПретходнаСтраница 1 од 4Следна