mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 22:40:12 +01:00
b7fc7f2228
Python is heavily based on its core data types, and dict is one of the more important ones. Even classes are basically a wrapper around a dict. This converts metadata.App to be a subclass of dict so it can behave like a dict when being dumped and loaded. This makes its drastically easier to use different data formats for build metadata and for sending data to the client. This approach will ultimately mean we no longer have to maintain custom parsing and dumping code. This also means then that the YAML/JSON field names will not have spaces in them, and they will match exactly what it used as the dict keys once the data is parsed, as well as matching exactly the instance attribute names: * CurrentVersion: 1.2.6 * app['CurrentVersion'] == '1.2.6' * app.CurrentVersion == '1.2.6' Inspired by: https://goodcode.io/articles/python-dict-object/ |
||
---|---|---|
.. | ||
dump | ||
info.guardianproject.checkey.txt | ||
info.guardianproject.urzip.txt | ||
obb.main.oldversion.txt | ||
obb.main.twoversions.txt | ||
obb.mainpatch.current.txt | ||
org.adaway.json | ||
org.fdroid.ci.test.app.txt | ||
org.smssecure.smssecure.txt | ||
org.videolan.vlc.yml | ||
raw.template.txt |