@cryptobull_360 · Post #49765 · 12.05.2026 г., 12:45
🇺🇸📈 U.S. April seasonally adjusted Core CPI rose 0.4% MoM, above market expectations of 0.3%. This marks the highest reading since January 2025. #macro
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
Пребарај: #macro
@cryptobull_360 · Post #49765 · 12.05.2026 г., 12:45
🇺🇸📈 U.S. April seasonally adjusted Core CPI rose 0.4% MoM, above market expectations of 0.3%. This marks the highest reading since January 2025. #macro
Hashtags
@cryptobull_360 · Post #49764 · 12.05.2026 г., 12:44
⚡️🇺🇸#macro USA: - consumption (CPI; Apr): - m/m: 0.6% (prog: 0.6%; prev: 0.9%) - y/y: 3.8% (prog: 3.7%; pre: 3.3%); – Baseline (CPI) (YoY): 2.8% (Prog: 2.7%; Prev: 2.6%).
Hashtags
@cryptobull_360 · Post #49630 · 30.04.2026 г., 13:05
🇺🇸📝#macro USA - Initial Jobless Claims = 189K (exp 213K / prev 214K) - Continuing Jobless Claims = 1.785M (exp 1.820M / prev 1.821M)
Hashtags
@cryptobull_360 · Post #49305 · 14.04.2026 г., 14:38
🔮 IMF Raises Its 2026 Global Headline Inflation Forecast to 4.4% Amid Conflict-Driven Energy Shocks. #macro
Hashtags
@cryptobull_360 · Post #49140 · 09.04.2026 г., 12:59
🇺🇸👀#macroUSA: – PCE Price index (Feb): - m/m: 0.4% (prog: 0.4%; prev: 0.3%) - y/y: 2.8% (prog: 2.8%; pre: 2.8%) – Baseline PCE (YoY): 3% (prog: 3.0%; pre: 3.1%); – Initial Jobless Claims: 219 thousand (previous: 202 thousand); – GDP (Q4): 0.5% (prev: 4.4%)
Hashtags
@cryptobull_360 · Post #49120 · 07.04.2026 г., 23:53
🇺🇸 Trump said he decided to suspend attacks on Iran for 2 weeks. #macro
Hashtags
@cryptobull_360 · Post #48980 · 30.03.2026 г., 15:07
🇺🇸#macro Powell (post may be supplemented): - Politics is in a position that allows for a wait-and-see attitude; - DKP is in an advantageous position; - the economy is stable.
Hashtags
@cryptobull_360 · Post #48865 · 23.03.2026 г., 03:32
📉 Gold fell below $4350. 📉🇯🇵 Japanese Nikkei 225 stock index futures fell 4% after Iran threatened to “completely close” the Strait of Hormuz. #macro
Hashtags
@cryptobull_360 · Post #48847 · 19.03.2026 г., 12:30
🇺🇸👀#macro Initial Jobless Claims: 205 thousand (previous: 213 thousand)
Hashtags
@cryptobull_360 · Post #48845 · 18.03.2026 г., 12:36
🇺🇸👀#macro US: - Producer Price Index (PPI; Feb): - m/m: 0.7% (prior: 0.5%) - y/y: 3.4% (prior: 2.9%); - Core PPI: 3.9% y/y (prior: 3.6%).
Hashtags
@cryptobull_360 · Post #48739 · 13.03.2026 г., 12:44
🇺🇸👀#macroUSA: – GDP (Q4): 0.7% (prev: 4.4%); – PCE Price index (Jan): - m/m: 0.3% (prog: 0.3%; prev: 0.4%) - y/y: 2.8% (prog: 2.9%; pre: 2.9%) – Baseline PCE (YoY): 3.1% (prog: 3.1%; pre: 3%)
Hashtags
@cryptobull_360 · Post #48629 · 05.03.2026 г., 13:35
🇺🇸👀#macro Initial Jobless Claims: 213 thousand (previous: 212 thousand).
Hashtags