AnIML2
Description
Python package for working with AnIML data files.
Currently implements AnIML v0.90, as described per the xml schema ./schemas/animl-core.xsd, hope to upgrade to v1.0 in the near future.
Acknowledgements
The following repos have been used as inspiration for this project:
- https://github.com/FAIRChemistry/pyAnIML
- https://gitlab.com/opensourcelab/scientificdata/animl/animl_python
Scope
- Create, open & edit AnIML files
- Provide a simple interface to the AnIML schema and to assist users in avoiding common pitfalls
- The package does not check for logical inconsistencies in the files, e.g. missing references, duplicate IDs, etc. Instead this is left to the user and/or schema validation tools. (Might be addressed in a future version :)
Installation
Package is available on PyPI under the name animl2 and can be installed using pip.
Example
from xml.dom import minidom
from xml.etree import ElementTree as ET
from animl2.models import AnIMLDoc, Sample
doc = AnIMLDoc()
doc.append(Sample(name='sample1', sampleID="1"))
doc.append(Sample(name='sample2', sampleID="2"))
doc.append(Sample(name='sample3', sampleID="3"))
et = doc.dump_xml()
xml_string = minidom.parseString(ET.tostring(et)).toprettyxml(indent=" ")
print(xml_string)
<?xml version="1.0" ?>
<AnIML xmlns="urn:org:astm:animl:schema:core:draft:0.90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.90" xsi:schemaLocation="urn:org:astm:animl:schema:core:draft:0.90 http://schemas.animl.org/current/animl-core.xsd">
<SampleSet>
<Sample name="sample1" sampleID="1"/>
<Sample name="sample2" sampleID="2"/>
<Sample name="sample3" sampleID="3"/>
</SampleSet>
</AnIML>
Project Goals
The following MVP (minimum viable product) goals are defined for this project. They're not set in stone and may change as the project progresses but they should give a good idea of what to expect.
MVP1
- Possible to create, open & edit AnIML xml files.
- The following AnIML document features are supported:
- Samples
- Experiment Steps
- Helper function to simplify outputing the xml to a file or string.
MVP2
- TBC
Long term goals
- Document signing support
- Document diff feature support
Long term goals (maybe)
- Document validation
- Technique definitions helper functions
Metadata
Release files for animl2 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| animl2-0.1.2.tar.gz | 35.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| animl2-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.9 kB
Release files / animl2-0.1.2.tar.gz
| Download URL | animl2-0.1.2.tar.gz |
|---|---|
| Size | 35.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2cc1fc1f743ab1c7daf78ee3d800bda06e684ac5ff2cb7f7252085c75cf1b17
|
|
BLAKE2b-256 checksum How to use checksums |
e8a5266ae50f6219a8bbbce8e992704ec6882f0d5a9a010d8f7ebbc1e09097ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / animl2-0.1.2-py3-none-any.whl
| Download URL | animl2-0.1.2-py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4bb2ed29d2eeb194a0de166282defd2ef163908bcd5338dc89ba6304184ee0d3
|
|
BLAKE2b-256 checksum How to use checksums |
47da0eca29a3653f52450cac31933724e8d915b70a30e12d571d6adc3e851b77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|