@venturevillagewall · Post #3632 · 21.12.2024 г., 10:23
DuckChain Raises $5M DuckChain successfully secured $5M in funding, with the round closing on December 20, 2024. For more details, visit DuckChain. #DuckChain#Funding#Crypto
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
Пребарај: #duckchain
@venturevillagewall · Post #3632 · 21.12.2024 г., 10:23
DuckChain Raises $5M DuckChain successfully secured $5M in funding, with the round closing on December 20, 2024. For more details, visit DuckChain. #DuckChain#Funding#Crypto
Hashtags
@tonevents_en · Post #968 · 02.11.2024 г., 11:55
🚜First farming pool from Tomarket While we are all waiting for the $TOMA listing and watching the price on the TOMA/USDT premarket, the team launched a farming pool with its first partner — DuckChain. About farming $DUCK Points By staking $TOMA in the Farming Pool, you will secure a spot in the TGE #DuckChain airdrop and will farm $DUCK Points faster than through their mini-app. Not Bad. 🥚 Collect eggs in DuckChain. After staking, head to DuckChain to start farming eggs — these eggs are rare and valuable, so don't miss your chance. 🍅Stake TOMA in the Tomarket farming pool. Once staked, join DuckChain to collect eggs: ✅Join the DuckChain app ✅Subscribe to DuckChain channel ✅Subscribe to DuckChain on X ⚠️Note: If you have trouble with TOMA distribution, don't worry — there will be plenty of time to join after the team completes the review. Rewards will not be affected by whether you enter the pool early or late. 🧐Does it worth to participate? This is probably just the beginning of the project's journey towards onboarding in #GameFi and #memecoins. If the #Tomarket team is really interested in playing for the long term, they should thank early adopters, for their support — give a fat drop to the first pool. If the community does not support the project, this will probably be the end of it. And our $TOMA will be worth nothing. So it's up to you to decide. #fun#belong#money Farming pool DuckChain 🦆
@centralchanel · Post #15821 · 04.01.2025 г., 20:20
January Listing 🔥 ✅#Nodepay: 6 January ✅#MomoAi: 6 January ✅#Xterio: 8 January ✅#Sidekick : 8 January ✅ $Vertus :13 January ✅#Seed : 15 January ✅#Xcoin : 20 January ✅#Tapswap : 23 January ✅#Wcoin : 25 January ✅#CommunityGaming : 28 January Unofficial Listing ✅#PAWS ✅#UXUY ✅#Yuligo ✅#MemeWar ✅#DuckChain ✅#Celia Stay connected
@venturevillagewall · Post #3599 · 20.12.2024 г., 15:25
DuckChain Raises $5M for Web3 DuckChain, a consumer layer for Web3, successfully secured $5M in funding from notable investors including dao5, Offchain Labs, Kenetic, and others. #DuckChain#Web3#Funding#dao5#OffchainLabs#Kenetic#DWFVentures#OakGroveVentures#SkylandVentures#GeekCartel#GateLabs#PrestoLabs#Camelot#Quantstamp
@venturevillagewall · Post #3600 · 20.12.2024 г., 16:00
DuckChain Secures $5M Funding TON’s consumer layer for Web3 DuckChain has successfully raised $5 million in a funding round with participation from multiple investors including dao5, Offchain Labs, DWF Ventures, and others. #DuckChain#Web3#Funding#TON#dao5#OffchainLabs#DWF#Investors#Ventures#Kenetic#Skyland#GeekCartel#GateLabs#PrestoLabs#Camelot#Quantstamp#Blockchain#Finance#Investment#Technology