pysimultan
PySimultan is a Python library designed to facilitate the creation, manipulation, and management of SIMULTAN data models, taxonomies, and templates. It provides a structured way to define and interact with complex data structures, making it particularly useful for applications that require detailed data organization and templating.
Key Features:
- Data Models: Create and manage data SIMULTAN models with ease.
- Taxonomies: Define and use taxonomies to categorize and structure data.
- File and Directory Management: Handle files and directories within the data models.
- Mapping of Python objects to SIMULTAN data models: Map Python objects to SIMULTAN data models for easy data creation and manipulation.
- Simple integration in existing Python projects: Easily integrate PySimultan into existing Python projects to enhance data management capabilities.
Table of Contents
Installation
pip install PySimultan
License
PySimultan is distributed under the terms of the MIT license.
Usage
Data Models
Create a new data model:
from PySimultan2 import DataModel
# Create a new data model
data_model = DataModel.create_new_project(project_path='my_project.simultan',
user_name='admin',
password='admin')
Load an existing data model:
from PySimultan2 import DataModel
# Load an existing data model
data_model = DataModel(project_path='my_project.simultan',
user_name='admin',
password='admin')
save the data model:
data_model.save()
close and cleanup the data model:
data_model.cleanup()
Mapping python to SIMULTAN
Create a mapped class:
from PySimultan2 import DataModel, TaxonomyMap, Content, PythonMapper
mapper = PythonMapper()
class TestComponent(object):
def __init__(self, *args, **kwargs):
self.param_1 = kwargs.get('param_1')
self.param_2 = kwargs.get('param_2')
content0 = Content(text_or_key='param_1', # text or key of the content/parameter/property
property_name='param_1', # name of the generated property
type=None, # type of the content/parameter/property
unit=None, # unit of the content/parameter/property
documentation='param_1 to test')
content1 = Content(text_or_key='param_2', # text or key of the content/parameter/property
property_name='param_2', # name of the generated property
type=None, # type of the content/parameter/property
unit=None, # unit of the content/parameter/property
documentation='param_2 to test')
test_component_map = TaxonomyMap(taxonomy_name='PySimultan',
taxonomy_key='Test',
taxonomy_entry_name='test_component',
taxonomy_entry_key='test_component',
content=[content0, content1],
)
mapper.register(test_component_map.taxonomy_entry_key, TestComponent, taxonomy_map=test_component_map)
Create an instance of the mapped class:
# get the mapped class
mapped_test_component_cls = mapper.get_mapped_class('test_component')
# create an instance of the mapped class
mapped_test_component = mapped_test_component_cls(param_1='value1',
param_2='value2',
data_model=data_model)
# save the data_model
data_model.save()
# cleanup the data_model
data_model.cleanup()
Load an instance of the mapped class:
# load the data_model
data_model = DataModel(project_path='my_project.simultan',
user_name='admin',
password='admin')
# get the mapped class
mapped_test_component_cls = mapper.get_mapped_class('test_component')
# get the instances of the mapped class
instances = mapped_test_component_cls.cls_instaces
print(instances[0].param_1)
Change Log
[0.6.4] - 2025-06-06
Updated SIMULTAN version to 0.7.18
[0.5.9.7] - 2025-01-09
- Added default component support to Mapper: if a default component is not present in the datamodel, it is automatically added
- Fixed content naming bug: Content.name is now used for the name of the TaxonomyEntry in SIMULTAN
- Added typing for better code completion
[0.5.9.4] - 2024-12-31
- Fixed bug in DirectoryInfo where __dir_helper_file__ was not found if already existing
[0.5.8] - 2024-12-17
- Added FileInfo.from_existing_file method to create FileInfo object from existing file in ProjectUnpackFolder
[0.5.7] - 2024-12-09
- Added support for different taxonomy for content
- Added support for numpy np.float32, np.float64 and np.int32, np.int64
[0.4.20] - 2024-07-01
- Fixed Bug in nested dictionary creation
[0.4.19] - 2024-07-01
- Refactored dictionaries
Metadata
Release files for PySimultan 0.7.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pysimultan-0.7.5.tar.gz | 6.5 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pysimultan-0.7.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 MB
Release files / pysimultan-0.7.5.tar.gz
| Download URL | pysimultan-0.7.5.tar.gz |
|---|---|
| Size | 6.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c76d94cb60799e60b71f26214e66fdc9b5af1912c63b2aa56642509d7de7da33
|
|
BLAKE2b-256 checksum How to use checksums |
9894ac9e0817691407063912351d1a7b4b652df3c51bc9118d472e983fdb259b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / pysimultan-0.7.5-py3-none-any.whl
| Download URL | pysimultan-0.7.5-py3-none-any.whl |
|---|---|
| Size | 6.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4857a611ab61fd8ca42abb12da5a2abf5a98d5a31b416acc9c697b024ba1b631
|
|
BLAKE2b-256 checksum How to use checksums |
309b63cf0237d243b31fcf7c41dfa96b7f8991977397a7400e8c9b4d330a7408
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for PySimultan 0.7.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.