Pydantic
Description​
Pydantic is a data validation and settings management library for Python. It uses Python type annotations to validate data, automatically convert data types, and provide user-friendly error messages when data is invalid. Pydantic's primary use is in creating data models that automatically validate the data they encapsulate, making it particularly useful for data parsing in web frameworks, data science projects, and configuration management. It helps ensure that data conforms to specified formats and types, reducing the risk of bugs and inconsistencies in software applications.
General details​
- Developer(s): Samuel Colvin and various contributors.
- Open source: Yes
- Language(s): Python
- Repository: https://github.com/pydantic/pydantic
- License: MIT
- Operating system(s): OS Independent (can run on any operating system that supports Python)
- Actively maintained: Yes (less than a week ago)
Intended use on the device​
The SOUP is used in the medical device for the following specific purposes only:
- Define the data models and schemas for all incoming and outgoing information from the device's APIs and AI inference services.
- Define the data models for the configuration schemas of the device services.
Requirements​
For the integration and safe usage of this SOUP within a software system, it's important to outline both functional and performance requirements. These requirements help mitigate risks and ensure compatibility and performance standards are met.
Functional​
- Data validation: Validate data based on Python type annotations, ensuring that all data conforms to the specified structures and types. For this, it must provide data models to represent the structure of expected data.
- Error reporting: Provide detailed and user-friendly error reports when data validation fails, indicating the location and nature of data mismatches.
- Data conversion: Automatically convert input data types to the declared Python types, facilitating easy parsing and validation of complex structures.
- Settings management: Support the management of application settings using environment variables and
.env
files, allowing for easy configuration of applications. - JSON support: Offer comprehensive support for JSON data handling, including serialization and deserialisation of models.
Performance​
- Efficiency: Handle data validation and conversion without significantly impacting the performance of applications. For example, it must allow the disabling of the validation of the input data schema when it has already been checked in upstream services.
- Scalability: Capable of validating large and complex data models without a substantial decrease in performance, ensuring scalability for larger applications.
- Resource Utilisation: Maintain a reasonable memory footprint, even when dealing with large datasets or complex nested models.
System requirements​
Establishing minimum software and hardware requirements is important to mitigate risks, such as security vulnerabilities, performance issues, or compatibility problems, and to ensure that the SOUP functions effectively within the intended environment.
Software​
After evaluation, we find that there are no specific software requirements for this SOUP. It works properly on standard computing devices, which includes our environment.
Hardware​
After evaluation, we find that there are no specific hardware requirements for this SOUP. It works properly on standard computing devices, which includes our environment.
Documentation​
The official SOUP documentation can be found at https://docs.pydantic.dev/latest/
Additionally, a criterion for validating the SOUP is that all the items of the following checklist are satisfied:
- The vendor maintains clear and comprehensive documentation of the SOUP describing its functional capabilities, user guidelines, and tutorials, which facilitates learning and rapid adoption.
- The documentation for the SOUP is regularly updated and clearly outlines every feature utilised by the medical device, doing so for all integrated versions of the SOUP.
Related software items​
We catalog the interconnections between the microservices within our software architecture and the specific versions of the SOUP they utilise. This mapping ensures clarity and traceability, facilitating both the understanding of the system's dependencies and the management of SOUP components.
Although the title of the section mentions software items, the relationship with SOUP versions has been established with microservices (also considered software items, by the way) because each one is inside a different Docker container and, therefore, has its own isolated runtime environment.
SOUP version | Software item(s) |
---|---|
2.6.3 | WEB API GATEWAY REPORT BUILDER AGPPGA ALADIN APASI-API APASI-SEGMENTER APASI-CLASSIFIERAPULSI ASALT ASCORAD-API ASCORAD-SEGMENTERASCORAD-CLASSIFIER AUAS AIHS4 NSIL ICD MULTICLASS CLASSIFIER ICD BINARY CLASSIFIER BINARY REFERRER QUALITY VALIDATOR DOMAIN VALIDATOR |
Related risks​
The following are risks applicable to this SOUP from the table found in document R-TF-013-002 Risk management record_2023_001
:
- 58. SOUP presents an anomaly that makes it incompatible with other SOUPs or with software elements of the device.
- 59. SOUP is not being maintained nor regularly patched.
- 60. SOUP presents cybersecurity vulnerabilities.
Lists of published anomalies​
The incidents, anomalies, known issues or changes between versions for this SOUP can be found at:
History of evaluation of SOUP anomalies​
27 Feb 2024​
- Reviewer of the anomalies: Alejandro Carmena Magro
- Version(s) of the SOUP reviewed: 2.6.3
No anomalies have been found.
Record signature meaning​
- Author: JD-004
- Reviewer: JD-003
- Approver: JD-005