julee.repositories.minio¶
Minio repository implementations for julee domain.
This module exports Minio-based implementations of all repository protocols for the Capture, Extract, Assemble, Publish workflow. These implementations use Minio for object storage and are suitable for production environments where persistent, scalable storage is required.
All implementations maintain the same async interfaces as their memory counterparts while providing durable, distributed storage capabilities.
Submodules¶
- julee.repositories.minio.assembly
- julee.repositories.minio.assembly_specification
- julee.repositories.minio.client
- julee.repositories.minio.document
- julee.repositories.minio.document_policy_validation
- julee.repositories.minio.knowledge_service_config
- julee.repositories.minio.knowledge_service_query
- julee.repositories.minio.policy
Classes¶
Minio implementation of AssemblyRepository using Minio for persistence. |
|
Minio implementation of AssemblySpecificationRepository using Minio for |
|
Minio implementation of DocumentPolicyValidationRepository using Minio for |
|
Minio implementation of DocumentRepository using Minio for persistence. |
|
Minio implementation of KnowledgeServiceConfigRepository using Minio for |
|
Minio implementation of KnowledgeServiceQueryRepository. |
|
Minio implementation of PolicyRepository using Minio for persistence. |
Package Contents¶
- class julee.repositories.minio.MinioAssemblyRepository(client)[source]¶
Bases:
julee.domain.repositories.assembly.AssemblyRepository,julee.repositories.minio.client.MinioRepositoryMixinMinio implementation of AssemblyRepository using Minio for persistence.
This implementation stores assembly data as JSON objects in the “assemblies” bucket.
- async get_many(assembly_ids)[source]¶
Retrieve multiple assemblies by ID.
- Parameters:
assembly_ids (list[str]) – List of unique assembly identifiers
- Returns:
Dict mapping assembly_id to Assembly (or None if not found)
- Return type:
dict[str, julee.domain.models.assembly.Assembly | None]
- assembly_bucket = 'assemblies'¶
- client¶
- logger¶
- class julee.repositories.minio.MinioAssemblySpecificationRepository(client)[source]¶
Bases:
julee.domain.repositories.assembly_specification.AssemblySpecificationRepository,julee.repositories.minio.client.MinioRepositoryMixinMinio implementation of AssemblySpecificationRepository using Minio for persistence.
This implementation stores assembly specifications as JSON objects in the “assembly-specifications” bucket. Each specification includes its complete JSON schema definition and knowledge service query mappings.
- async get_many(assembly_specification_ids)[source]¶
Retrieve multiple assembly specifications by ID.
- Parameters:
assembly_specification_ids (list[str]) – List of unique specification
identifiers
- Returns:
Dict mapping specification_id to AssemblySpecification (or None if not found)
- Return type:
dict[str, julee.domain.models.assembly_specification.AssemblySpecification | None]
- async list_all()[source]¶
List all assembly specifications.
- Returns:
List of all assembly specifications, sorted by assembly_specification_id
- Return type:
list[julee.domain.models.assembly_specification.AssemblySpecification]
- client¶
- logger¶
- specifications_bucket = 'assembly-specifications'¶
- class julee.repositories.minio.MinioDocumentPolicyValidationRepository(client)[source]¶
Bases:
julee.domain.repositories.document_policy_validation.DocumentPolicyValidationRepository,julee.repositories.minio.client.MinioRepositoryMixinMinio implementation of DocumentPolicyValidationRepository using Minio for persistence.
This implementation stores document policy validations as JSON objects in the “document-policy-validations” bucket. Each validation includes its complete status tracking, validation scores, transformation results, and metadata.
- async get_many(validation_ids)[source]¶
Retrieve multiple document policy validations by ID.
- Parameters:
validation_ids (list[str]) – List of unique validation identifiers
- Returns:
Dict mapping validation_id to DocumentPolicyValidation (or None if not found)
- Return type:
dict[str, julee.domain.models.policy.DocumentPolicyValidation | None]
- client¶
- logger¶
- validations_bucket = 'document-policy-validations'¶
- class julee.repositories.minio.MinioDocumentRepository(client)[source]¶
Bases:
julee.domain.repositories.document.DocumentRepository,julee.repositories.minio.client.MinioRepositoryMixinMinio implementation of DocumentRepository using Minio for persistence.
This implementation stores document metadata and content separately: - Metadata: JSON objects in the “documents” bucket - Content: Binary objects in the “documents-content” bucket
This separation allows for efficient metadata queries while supporting large content files without hitting Temporal’s 2MB payload limits.
- async get_many(document_ids)[source]¶
Retrieve multiple documents by ID using batch operations.
- Parameters:
document_ids (list[str]) – List of unique document identifiers
- Returns:
Dict mapping document_id to Document (or None if not found)
- Return type:
dict[str, julee.domain.models.document.Document | None]
Note
This implementation optimizes by batch-fetching metadata first, then batch-fetching unique content streams, then splicing them together.
- async list_all()[source]¶
List all documents.
- Returns:
List of all documents, sorted by document_id
- Return type:
- async save(document)[source]¶
Save a document with its content and metadata.
If the document has content_string, it will be converted to a ContentStream and stored. The content_string field should only be used for small content (few KB) when saving from workflows/use-cases. Call-sites in activities should always use the content stream.
- client¶
- content_bucket = 'documents-content'¶
- logger¶
- metadata_bucket = 'documents'¶
- class julee.repositories.minio.MinioKnowledgeServiceConfigRepository(client)[source]¶
Bases:
julee.domain.repositories.knowledge_service_config.KnowledgeServiceConfigRepository,julee.repositories.minio.client.MinioRepositoryMixinMinio implementation of KnowledgeServiceConfigRepository using Minio for persistence.
This implementation stores knowledge service configurations as JSON objects:
Knowledge Service Configs: JSON objects in the “knowledge-service-configs” bucket
Each configuration is stored with its knowledge_service_id as the object name for efficient retrieval and updates.
- async generate_id()[source]¶
Generate a unique knowledge service identifier.
- Returns:
Unique knowledge service ID string
- Return type:
str
- async get(knowledge_service_id)[source]¶
Retrieve a knowledge service configuration by ID.
- Parameters:
knowledge_service_id (str) – Unique knowledge service identifier
- Returns:
KnowledgeServiceConfig object if found, None otherwise
- Return type:
julee.domain.models.knowledge_service_config.KnowledgeServiceConfig | None
- async get_many(knowledge_service_ids)[source]¶
Retrieve multiple knowledge service configs by ID.
- Parameters:
knowledge_service_ids (list[str]) – List of unique knowledge service
identifiers
- Returns:
Dict mapping knowledge_service_id to KnowledgeServiceConfig (or None if not found)
- Return type:
dict[str, julee.domain.models.knowledge_service_config.KnowledgeServiceConfig | None]
- async list_all()[source]¶
List all knowledge service configurations.
- Returns:
List of all knowledge service configurations, sorted by knowledge_service_id
- Return type:
list[julee.domain.models.knowledge_service_config.KnowledgeServiceConfig]
- async save(knowledge_service)[source]¶
Save a knowledge service configuration.
- Parameters:
knowledge_service (julee.domain.models.knowledge_service_config.KnowledgeServiceConfig) – Complete KnowledgeServiceConfig to save
- bucket_name = 'knowledge-service-configs'¶
- client¶
- logger¶
- class julee.repositories.minio.MinioKnowledgeServiceQueryRepository(client)[source]¶
Bases:
julee.domain.repositories.knowledge_service_query.KnowledgeServiceQueryRepository,julee.repositories.minio.client.MinioRepositoryMixinMinio implementation of KnowledgeServiceQueryRepository.
This implementation stores knowledge service queries as JSON objects in Minio buckets, following the established patterns for Minio repositories in this system. Each query is stored as a separate object with deterministic naming.
- async generate_id()[source]¶
Generate a unique query identifier.
- Returns:
Unique string identifier for a new query
- Return type:
str
- async get(query_id)[source]¶
Retrieve a knowledge service query by ID.
- Parameters:
query_id (str) – Unique query identifier
- Returns:
KnowledgeServiceQuery object if found, None otherwise
- Return type:
julee.domain.models.assembly_specification.KnowledgeServiceQuery | None
- async get_many(query_ids)[source]¶
Retrieve multiple knowledge service queries by ID.
- Parameters:
query_ids (list[str]) – List of unique query identifiers
- Returns:
Dict mapping query_id to KnowledgeServiceQuery (or None if not found)
- Return type:
dict[str, julee.domain.models.assembly_specification.KnowledgeServiceQuery | None]
- async list_all()[source]¶
List all knowledge service queries.
- Returns:
List of all knowledge service queries, sorted by query_id
- Return type:
list[julee.domain.models.assembly_specification.KnowledgeServiceQuery]
- async save(query)[source]¶
Store or update a knowledge service query.
- Parameters:
query (julee.domain.models.assembly_specification.KnowledgeServiceQuery) – KnowledgeServiceQuery object to store
- bucket_name = 'knowledge-service-queries'¶
- client¶
- logger¶
- class julee.repositories.minio.MinioPolicyRepository(client)[source]¶
Bases:
julee.domain.repositories.policy.PolicyRepository,julee.repositories.minio.client.MinioRepositoryMixinMinio implementation of PolicyRepository using Minio for persistence.
This implementation stores policies as JSON objects in the “policies” bucket. Each policy includes its complete validation scores and optional transformation queries.
- async get_many(policy_ids)[source]¶
Retrieve multiple policies by ID.
- Parameters:
policy_ids (list[str]) – List of unique policy identifiers
- Returns:
Dict mapping policy_id to Policy (or None if not found)
- Return type:
dict[str, julee.domain.models.policy.Policy | None]
- client¶
- logger¶
- policies_bucket = 'policies'¶