@SukoFaultyArtLair · Post #4264 · 25.10.2019 г., 04:30
http://www.furaffinity.net/view/30724056/ #male#sfw#steampunk#red_panda
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
Пребарај: #steampunk
@SukoFaultyArtLair · Post #4264 · 25.10.2019 г., 04:30
http://www.furaffinity.net/view/30724056/ #male#sfw#steampunk#red_panda
Hashtags
@wildthemestelegram · Post #1182 · 21.02.2024 г., 05:00
Steampunk Cat #brown #biege #green #orange #steampunk #cat #art ᅠ𝐖𝐢𝐥𝐝 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐓𝐡𝐞𝐦𝐞𝐬 ᅠ═──═⌘═──═ᅠ
@sirojiddintaxirjonov · Post #653 · 07.08.2023 г., 09:17
Zulqarnayn Xo‘jamqulov tomonidan Olmaota shahrida bunyod etilgan “Qahramon” haykali. Qizig‘i shundaki, turk jangchisiga atab qo‘yilgan bu haykal o‘zida ilmiy fantastikaning steampunk elementlarini mujassam etgan. 🐎 #Steampunk#turk#Olmaota @insusambil
Hashtags
@animeactioz · Post #3298 · 14.07.2023 г., 00:34
Arcane: League of LegendsSeason 1 📅Año 2021 🎥DirecciónRiot Games (Creador), Christian Linke (Creador), Alex Yee (Creador), Pascal Charrue, Arnaud Delord, Jérôme Combe, Ash Brannon 📄Guion Christian Linke, Alex Yee 📖Historia Christian Linke, Alex Yee, Conor Sheehy, Ash Brannon. 🎮Videojuego Riot Games 🎼Música Alexander Temple, Alex Seaver 🎤Tema#ImagineDragons, #JID 🎬Productora Fortiche, Riot Games. 🚚Distribuidora Netflix Género#SeriedeTV#Animación#Fantástico#Drama#Distopía#Steampunk#Videojuego Reparto | Trailer | Sinopsis ⏱Duración 40min. 🖥Resolución 720x400 🗣Idioma Inglés Subtítulos Latino Season 1 Episodio01 - 02 - 03 - 04 - 05 - 06 - 07 - 08 - 09 Suscripción a esta Serie 👉🏻Aquí Índice de Animaciones 👉🏻Aquí
@animeactioz · Post #3992 · 26.05.2024 г., 02:57
Kuutei Dragons aka Drifting Dragons | Dragones a la Deriva | 空挺ドラゴンズ 📅Año 2020 País🇯🇵Japón 🎥Dirección#TadahiroYoshihira 📄Guion Makoto Uezu. 📚Manga#TakuKuwabara 🎼Música Masaru Yokoyama 🎬Productora Polygon Pictures. 🚚Distribuidora Netflix Género#SeriedeTV#Animación#Aventuras#Fantástico#Drama#Manga#Dragones#Steampunk#Seinen Reparto | Trailer | Sinopsis ⏱Duración 23min. 🖥Resolución 720x400 🗣Idioma Japonés Subtítulos Latino Episodio01 - 02 - 03 - 04 - 05 - 06 - 07 - 08 - 09 - 10 - 11 - 12 Suscripción a este Anime 👉🏻Aquí Índice de Animaciones 👉🏻Aquí
@animeactioz · Post #4177 · 14.09.2024 г., 16:21
Avril et le Monde Truqué aka April and the Extraordinary World 📅Año 2015 ⏱Duración 90min. País🇫🇷Francia 🎥Dirección#ChristianDesmares#FranckEkinci 📄Guion Franck Ekinci, Benjamin Legrand, Jacques Tardi 🎼Música Valentin Hadjadj 🎬Productora arte France Cinéma, Ciné+, Je Suis Bien Content Género#Animación#Aventuras#Cienciaficción#Intriga#Comedia #Steampunk#Gatos#Años40#Cinefamiliar#Familia Reparto | Trailer | Sinopsis | Premios Ver Aquí AnexoAnimación | Comedia | Intriga | SciFi | Aventura | Familiar | Familia | Premiadas
@animeactioz · Post #3551 · 03.11.2023 г., 03:29
Vanitas no CarteSeason 2 aka The Case Study of Vanitas | Vanitas no Shuki | Memoir of Vanitas 📅Año 2022 País🇯🇵Japon 🎥Dirección#TomoyukiItamura 📄Guion Deko Akao 📚Manga#JunMochizuki 🎼Música#YukiKajiura 🎬Productora BONES Género#Animación#Fantasía#Histórico#Shonen#Sobrenatural#Vampiros#Drama#Acción#Manga#Steampunk#SigloXIX#Medicina Reparto | Trailer ⏱Duración 24min. 🖥Resolución 720x400 🗣Idioma Japones Subtítulos Latino Season 2 Episodio 01 - 02 - 03 - 04 - 05 - 06 - 07 - 08 - 09 - 10 - 11 - 12 Season 1 Suscripción a este Anime 👉🏻Aquí Índice de Animaciones 👉🏻Aquí
@animeactioz · Post #3550 · 03.11.2023 г., 03:29
Vanitas no CarteSeason 1 aka The Case Study of Vanitas | Vanitas no Shuki | Memoir of Vanitas 📅Año 2021 País🇯🇵Japon 🎥Dirección#TomoyukiItamura 📄Guion Deko Akao 📚Manga#JunMochizuki 🎼Música#YukiKajiura 🎬Productora BONES Género#Animación#Fantasía#Histórico#Shonen#Sobrenatural#Vampiros#Drama#Acción#Manga#Steampunk#SigloXIX#Medicina Reparto | Trailer | Sinopsis ⏱Duración 24min. 🖥Resolución 720x400 🗣Idioma Japones Subtítulos Latino Season 1 Episodio 01 - 02 - 03 - 04 - 05 - 06 - 07 - 08 - 09 - 10 - 11 - 12 Season 2 Suscripción a este Anime 👉🏻Aquí Índice de Animaciones 👉🏻Aquí