Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
Crear esquemas de solicitud Pydantic con dict en dict

esta pregunta sobre la solicitud.

 { number: 0, week:{ #day of week (0-monday, etc) 0:{ # hours 0 - 00:00, 1 - 01:00, etc 0: 1.5, 1: 3.99 } }

¿Cómo puedo crear una clase Pydantic para este esquema de solicitud? Intento esto:

 from typing import Dict class CoefficientForHour(BaseModel): hour: int coefficient: float class Week(BaseModel): week_day: int coefficients_for_hours: Dict[int, CoefficientForHour] class OneCreateRequest(BaseModel): number: int week: Dict[int, Week]

pero es incorrecto

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!