@WorldNews · Post #73913 · 06.04.2026 г., 12:05
French central bank nets €13bn by pulling gold out of US reserves [Read FullArticle] @WorldNews#FranceNews#GoldReserves#WorldEconomy
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
Пребарај: #goldreserves
@WorldNews · Post #73913 · 06.04.2026 г., 12:05
French central bank nets €13bn by pulling gold out of US reserves [Read FullArticle] @WorldNews#FranceNews#GoldReserves#WorldEconomy
@CryptoM · Post #64603 · 09.04.2026 г., 10:24
🚀 Czech Central Bank Increases Gold Reserves to 76.6 Tons As of the end of March 2026, the Czech Central Bank's gold reserves have reached nearly 77 tons, specifically 76.6 tons, according to data from the Czech Central Bank. According to Jin10, the World Gold Council reported that in February, the Czech Central Bank's gold reserves were approximately 75 tons, indicating an increase of 2 tons in February. The Czech Central Bank aims to increase its gold reserves to 100 tons by 2028. #CzechCentralBank#GoldReserves#Gold#MonetaryPolicy#Finance#Economy#PreciousMetals
@CryptoM · Post #64660 · 09.04.2026 г., 13:03
🚀 PRECIOUS METALS | Russia's Central Bank Reserves Increase to $767.5 Billion Russia's central bank reported an increase in its gold and foreign exchange reserves, reaching $767.5 billion for the week ending April 3. According to Jin10, this marks a rise from the previous value of $755.4 billion. The growth in reserves reflects ongoing adjustments in Russia's financial strategy amid global economic fluctuations. #Russia#CentralBank#GoldReserves#ForeignExchange#Finance#Economy#GlobalEconomy
@CryptoM · Post #65442 · 13.04.2026 г., 08:59
🚀 U.S. Dollar's Share in Global Reserves Hits Lowest Since 1994 The U.S. dollar currently represents approximately 46% of global foreign exchange and gold reserves, according to NS3.AI, citing data from the International Monetary Fund (IMF). When excluding gold, the dollar accounts for 57% of global reserve currencies, marking its lowest share since 1994. #USDollar#GlobalReserves#IMF#ForeignExchange#GoldReserves#ReserveCurrency #1994
@CryptoM · Post #64663 · 09.04.2026 г., 13:13
🚀 PRECIOUS METALS | Poland's Central Bank Holds 580 Tons of Gold Poland's Central Bank Governor, Adam Glapiński, has announced that the central bank currently holds 580 tons of gold. According to Jin10, this substantial reserve underscores Poland's strategic approach to strengthening its financial security and diversifying its assets. The gold holdings are part of a broader effort to ensure economic stability and safeguard against global market fluctuations. Poland's commitment to maintaining a robust gold reserve reflects its proactive measures in navigating the complexities of the international financial landscape. #Poland#CentralBank#GoldReserves#FinancialSecurity#EconomicStability#GlobalMarket#AssetDiversification#GoldHoldings#InternationalFinance