Catalog PyPI
PACKAGE EXPLORERView in registry

acdh-obj2xml-pyutils

PyPI

Utility functions to serialize xml from object

Versions collected1
Direct dependencies2From release 0.0.7
Last observed20 Oct, 18:05 UTC

README

Version 0.0.7 documentation

flake8 Lint Test codecov

acdh-obj2xml-pyutils

python library to parse BaseRowClient of acdh-baserow-pyutils or any array of objects.

HowTo developer

  • create python environment python -m venv env
  • install pip install acdh_obj2xml_pyutils (not yet published)
  • install pip install acdh_baserow_pyutils (not yet published)
  • create python file e.g. run.py

add code

from acdh_obj2xml_pyutils import ObjectToXml


br_input = [{"id": "test1", "filename": "test1"},{"id": "test2", "filename": "test2"}]
tei = ObjectToXml(br_input=br_input)
output = [x for x in tei.make_xml(save=True)]
print(output)

with BaseRowClient

from acdh_obj2xml_pyutils import ObjectToXml
from acdh_baserow_pyutils import BaseRowClient

br_client = BaseRowClient(br_base_url="add url", br_table_id='add id', br_token='add token')
br_input = [x for x in br_client.yield_rows()]
tei = ObjectToXml(br_input=br_input)
output = [x for x in tei.make_xml(save=True)]
print(output)

both versions will create an 'out' directory containing xml files. Important Note! To create filenames the data input must contain a variable with filennames. Default variable is called 'filename' but can be customized by providing an argument to class ObjectToXml().

Arguments

  • br_input data input as array of objects
  • save_dir default out as string
  • filename variable for filenames as string
  • template_path path for jinja2 template

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.728 Jun 20242

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
acdh-oeaw/acdh-obj2xml-pyutils

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:05 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:bdde5bee994fb6dd6525ade0240c274fc3b5d16bdd0c0e8ba919de67b531a5cd