@testflightynoti · Post #38037 · 10.05.2026 г., 08:34
#sunos Join the sunos beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/P52DbTEe Shared by Dimitri
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
Пребарај: #sunos
@testflightynoti · Post #38037 · 10.05.2026 г., 08:34
#sunos Join the sunos beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/P52DbTEe Shared by Dimitri
Hashtags
@OnePlus13Series · Post #289 · 13.07.2025 г., 00:38
📱SunOS-Project - Official | Android 15 | OnePlus 13 (dodge) 🗒Details: • Version: #varuna (A15) • Codename: #dodge • Released: 09/07/25 🆘Support: Telegram 📸Screenshots: Click Here 💵Donate: Paypal | UPI: dyavanapellichandu@ybl (If you like our work and want to support development, it helps pay server bills and infrastructure) 🔖Tags: #ROM#SunOS#Android15#Official#OnePlus13#dodge ✨SourceChangelogs: • Initial A15 Release based on CPH2653_15.0.0.831(EX01) firmware blobs ✅Working: • Camera & Flashlight • WiFi, Bluetooth • Telephony (Calls & Data) • IMS (VoLTE, VoWiFi, RCS) • Audio (Playback & Record) • Video Playback • GPS, Sensors • WiFi Display ❌Broken: • eSIM (WIP) 📦Compatibility: • All variants supported: EU / IN / CN / NA 📔Note: Make sure both slots have the same firmware to avoid critical issues! 🧩FlashInstructions: ⚠️ Ensure both slots have the same firmware before flashing! • Download images from here. fastboot flash init_boot init_boot.img fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash vendor_boot vendor_boot.img fastboot -w fastboot reboot recovery ➡️Inrecovery: • Factory reset (wipe/format data) • ADB sideload the SunOS zip • Reboot and enjoy 🌞 📥Download: 🔗Sourceforge | Mirror
@OnePlus13Series · Post #346 · 13.11.2025 г., 15:51
SunOS Project | Android 16 | Oneplus 13 ✍️ Details: - Version: bienor - Codename: #dodge - Type: #user#gapps - Released: 29/09/25 🔽 Download : ROM [ Gdrive | Mirror | SF ] // Images 🆘 Support group: Here ✨ Changelogs: Here 🌳 Source: Here | DT | sm8750 📸Screenshots: Here 💰 Donate: Here (Server) 🔖 Tags : #SunOS#AOSP#ROM#Official#A16#QPR0 ⚙️Installation: 🚨 Firmware is not included with this rom. Please flash fw on both slots to avoid potential issues ➡️ CMDs: fastboot flash init_boot init_boot.img fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash vendor_boot vendor_boot.img fastboot -w fastboot reboot recovery ➡️Recovery: • Factory reset (wipe/format data) • ADB sideload the rom zip & Reboot 📔Note: - Clean flash is mandatory coming from SunOS A15 and make sure remove google accounts and lockscreen password to avoid frp lock - ESIM support is dropped 👤 Developer: @Chandu_078 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom