Questions tagged [pydantic]
Package for data validation and settings management.
6 questions
2
votes
1
answer
130
views
ABC/XYZ business process analysis
I have written a code that deals with ABC/XYZ analysis. I want to use it in my application and would like to find out how the code can be improved, its readability and it will be better to implement ...
5
votes
1
answer
114
views
A generic mapping class targeting many job source
Problem
The challenge is to create a flexible system for mapping job data from various external sources (such as Workable) into a standardised internal format. The system needed to handle:
Diverse ...
3
votes
2
answers
178
views
Check for key in dictionary without magic value comparison
I'm using pydantic in a project to check file formatting for an object, as well as pylint for linting. Whenever I read a file with an invalid format, I want to raise an exception with a descriptive ...
2
votes
1
answer
107
views
Python Runtime Config
I am implementing runtime configuration for a python package. I am doing this in mypkg.config.__init__.py. The idea is to load the configuration from a JSON file ...
-2
votes
2
answers
163
views
Applying the __add__ operator on all fields of a Python object
I have a class for which I want to overload __add__ to mean adding all fields between obj1 and ...
1
vote
0
answers
809
views
Restaurant Open Hours - Converting Json to human readable format
I am seeking a general code review.
Task:
Write a program that takes JSON-formatted opening hours of a restaurant as an input and outputs hours in more human readable format.
Input:
Input JSON ...