sphobjinv.enum
Helper enums for sphobjinv.
sphobjinv is a toolkit for manipulation and inspection of
Sphinx objects.inv files.
- Author
Brian Skinn (brian.skinn@gmail.com)
- File Created
4 May 2019
- Copyright
(c) 2016-2026 Brian Skinn and community contributors
- Source Repository
- Documentation
- License
Code: MIT License
Docs & Docstrings: CC BY 4.0 International License
See LICENSE.txt for full license terms.
Members
- class HeaderFields(*values)
Enumfor various inventory-level data items.A subset of these
Enumvalues is used in various Regex, JSON, and string formatting contexts within class:~sphobjinv.inventory.Inventory andschema.json_schema.- Count = 'count'
Number of objects contained in the inventory
- Metadata = 'metadata'
The
strvalue of thisEnummember is accepted as a root-level key in adictto be imported into anInventory. The corresponding value in thedictmay contain any arbitrary data. Its possible presence is accounted for inschema.json_schema.The data associated with this key are ignored during import into an
Inventory.
- Project = 'project'
Project name associated with an inventory
- Version = 'version'
Project version associated with an inventory
- class SourceTypes(*values)
Enumfor the import mode used in instantiating anInventory.Since
Enumkeys iterate in definition order, the definition order here defines the order in whichInventoryobjects attempt to parse a source object passed toInventory.__init__()either as a positional argument or via the generic source keyword argument.This order DIFFERS from the documentation order, which is alphabetical.
- DictJSON = 'dict_json'
Instantiation from a
dictvalidated againstschema.json_schema.
- FnamePlaintext = 'fname_plain'
Instantiation from a plaintext objects.inv file on disk.
- FnameZlib = 'fname_zlib'
Instantiation from a zlib-compressed objects.inv file on disk.
- Manual = 'manual'
No source;
Inventorywas instantiated withprojectandversionas empty strings andobjectsas an emptylist.
- URL = 'url'
Instantiation from a zlib-compressed objects.inv file downloaded from a URL.