Microsoft Azure
AzureBlobDocumentVersion
Bases: DocumentVersion
row_count
property
row_count
Total number of row artefacts across all sheets.
status
property
status
Derived from artefact presence on this document version.
- COMPLETED: a results artefact exists on the document, any sheet, or any child item (chunk/image/row). Any completed result anywhere in the tree is enough to mark the document completed.
- PROCESSING: at least one chunk/image/row artefact is bound on any sheet, but no results artefact has been observed.
- DRAFT: otherwise.
AzureBlobDocumentVersionSheet
Bases: DocumentVersionSheet
AzureBlobMetadataProperty
Bases: MetadataProperty
get
get()
Reads the metadata property definition from storage, overriding lazy load.
set
set(data=None)
Merges the updated metadata property into the session standard and writes to Azure Blob Storage.
AzureBlobMetadataSpecification
Bases: MetadataSpecification
The session's metadata standard, read from its session_standard.json blob.
standard_override substitutes a caller-supplied standard for the blob's content,
so a session can be analysed against a trial standard (a different picklist or
definition) without publishing it. It is strictly read-only: the blob is still the
source of identity/audit fields, and :meth:_set_standard refuses to write while an
override is active, so a trial standard can never overwrite the real one.
get
get()
Reads the session standard and workflow definition from storage, overriding lazy load
set
set(data=None)
Writes the updated metadata properties and workflow definition to Azure Blob Storage.
AzureBlobPropertyValue
Bases: PropertyValue
get
get()
Reads the property value from storage, overriding lazy load.
set
set(data=None)
Merges the updated metadata property into the session standard and writes to Azure Blob Storage.
AzureBlobResults
Bases: Results
get
get()
Reads the results from storage, overriding lazy load
AzureBlobSession
Bases: Session
custom_properties
property
custom_properties
Custom columns (ungoverned, edit-only) surfaced from the session edit files.
Reads the session-level aiEdits.json / userEdits.json once (cached), collects
every *-custom column key across both files, and returns a
:class:CustomMetadataProperty per key (id = full key, name = the key without the
-custom suffix, title-cased, free-text definition). Keys already governed by the
metadata specification are excluded. Absent edit files (no edits yet) yield {}.
__init__
__init__(session_id, workspace, organization, user_id=None, include_blobs=None, max_workers=8, batch_size=50, standard_override=None)
Bind to a Hoppa session in Azure Blob Storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
standard_override
|
dict | None
|
A metadata standard to analyse this session against in place
of its own published |
None
|
get_processing_status
get_processing_status()
Check if all files in the session have completed processing.
Returns:
| Type | Description |
|---|---|
str
|
|
initialize
initialize(bind_sources=True, load_children=True)
Build the document-version graph for this session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bind_sources
|
bool
|
When True (default), fully bind each source — download
per-file settings and resolve connector download URLs — as
needed for analysis. When False, take the lean results-read path
( |
True
|
load_children
|
bool
|
When True (default), index every child blob and build
each document's sheets, chunks, images and rows. When False,
skip the index and build documents with no children. A
document's |
True
|
preload_results
preload_results(documents)
Download the results of many documents in one pass.
Reads the session's two edit files once and the documents' results
blobs in parallel. Each document's next read of results.body then
needs no download. Reads after that go to storage as usual.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
documents
|
Sequence[DocumentVersion]
|
The documents whose results are about to be read. |
required |
refresh_status
refresh_status()
Reconcile cached session summary from a LIST + pointer-JSON reads.
Cheap path: one LIST to enumerate blobs and classify each by artefact-suffix presence (status, row_count, per-file status and row_count all fall out here).
Follow-up cost: for SharePoint/Autodesk source files whose display
name isn't already cached in session_properties.json, download the
pointer JSON to read name. Subsequent refreshes skip this for
unchanged files, so it amortises to zero.
Writes status, file_count, row_count, sources, document_summaries and status_last_updated_at back to session_properties.json.
results_to_df
results_to_df()
Transmute all document version results to a Pandas dataframe:
- Inserting results to the correct dataframe columns according to their field names
- Merging user edits and AI edits into their correct cell positions
Returns:
| Type | Description |
|---|---|
DataFrame
|
Each row in the dataframe is a document version. |
set_file_count
set_file_count(new_file_count)
Set the file count in the session properties JSON.
Also updates the in-memory cache.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_file_count
|
int
|
The count of files |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if operation successful, else false. |
set_processing_status
set_processing_status(new_status)
Set the processing status in the session properties JSON.
Also updates the in-memory cache and status timestamp so that
subsequent reads of session.status reflect the new value without
needing a full refresh_status().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_status
|
str
|
The status to set. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if operation successful, else false. |
AzureBlobSheetItem
Bases: SheetItem
set
set(data=None)
Writes the updated blob to Azure Blob Storage.
AzureBlobWorkflow
Bases: Workflow
get
get()
Reads the workflow definition from storage, overriding lazy load
set
set(data=None)
Writes the updated workflow definition to Azure Blob Storage.
HasBlobClient
Bases: Protocol
Protocol for classes with blob storage attributes
json_serializer
json_serializer(obj)
Custom JSON serializer for objects not serializable by default