class documentation
class TIBundle(TIFile): (source)
Constructors: TIBundle.bundle(files, name, model, comment, target_type, ...), TIBundle(name, data)
Interface for TI bundles
A bundle is a zip file with some metadata and a checksum.
| Class Method | get |
Determines the file extension for a targeted model based on its contents |
| Static Method | bundle |
Compress a list of TIFile objects into a bundle |
| Method | __init__ |
Creates an empty file with a specified name |
| Method | bytes |
No summary |
| Method | load |
Loads a byte string or bytestream into this file |
| Method | supported |
Determines whether this file supports a given model |
| Method | targets |
Determines whether this file targets a given model |
| Method | unbundle |
Unzips a bundle into a list of its files |
| Class Variable | magics |
Undocumented |
| Instance Variable | zipfile |
Undocumented |
| Property | checksum |
The checksum for the bundle |
| Property | comment |
This bundle's comment(s) |
| Property | metadata |
The metadata fields of the bundle |
| Property | model |
The model this bundle targets |
| Property | target |
This bundle's target type |
| Property | version |
This bundle's format version (which is usually 1) |
| Instance Variable | _buffer |
Undocumented |
Inherited from TIFile:
| Class Method | get |
Gets the subclass corresponding to file magic if one is registered |
| Class Method | open |
Creates a new file given a filename |
| Class Method | register |
Registers a subtype with this class for coercion |
| Method | __bool__ |
No summary |
| Method | __bytes__ |
No summary |
| Method | __copy__ |
No summary |
| Method | __eq__ |
Determines if two files are identical |
| Method | __format__ |
Undocumented |
| Method | __len__ |
No summary |
| Method | get |
Determines the filename based on the instance name and targeted model |
| Method | load |
Loads this file from a file pointer |
| Method | save |
Saves this file given a filename |
| Method | summary |
No summary |
| Instance Variable | name |
Undocumented |
| Property | is |
Whether this file is empty |
| Method | __init |
Undocumented |
| Class Variable | _magics |
Undocumented |
Inherited from Dock (via TIFile):
| Method | load |
Loads data into an instance by delegating to Loader methods based on the input's type |
| Class Variable | loaders |
Undocumented |
def bundle(files:
list[ TIFile], *, name: str = 'BUNDLE', model: TIModel = TI_84PCE, comment: str = 'Created with tivars_lib_py v1.1.0', target_type: str = 'CUSTOM', version: int = 1) -> TIBundle:
(source)
¶
Compress a list of TIFile objects into a bundle
| Parameters | |
files:list[ | The files to bundle |
name:str | The name of the bundle (defaults to BUNDLE) |
model:TIModel | The model this bundle should target (defaults to the TI-84+CE) |
comment:str | A comment to attach to this bundle (defaults to a simple lib message) |
targetstr | The target type for the bundle (defaults to CUSTOM) |
version:int | The format version of the bundle (defaults to 1) |
| Returns | |
TIBundle | A bundle containing files with the specified metadata |
overrides
tivars.file.TIFile.checksumThe checksum for the bundle
This is given as a sum of the CRC's of its files