Catalog PyPI
PACKAGE EXPLORERView in registry

AbstractDatabaseService

PyPI

Abstract base class for domain-specific database services

Versions collected1
Direct dependencies4From release 1.0.0
Last observed20 Oct, 17:40 UTC

README

Version 1.0.0 documentation

AbstractDatabaseService

Abstract base class for domain-specific database services. This package provides the foundation for building database services tailored to specific domains (Legal, Finance, etc.).

Installation

# From git
pip install git+https://github.com/NlpFisTeam/AbstractDBService.git

# From local
pip install -e ./modules/AbstractDBService

Usage

from AbstractDBService import AbstractDBService, ProcessingResult

class LegalDocumentService(AbstractDBService):
    """Legal document database service."""
    
    def _init_connections(self, **kwargs):
        # Initialize legal-specific connections
        self.arango_connector = kwargs.get("arango_connector")
    
    def process_document(self, file_path, doc_id, metadata, **kwargs):
        # Legal-specific document processing
        pass
    
    # ... implement other abstract methods

Abstract Methods

All inheriting classes must implement:

  • _init_connections(**kwargs) - Initialize domain-specific connections
  • process_document(file_path, doc_id, metadata, **kwargs) - Process a document
  • extract_metadata(document, raw_metadata) - Extract domain-specific metadata
  • create_chunks(document, doc_id, metadata) - Create chunks with domain-specific logic
  • embed_text(texts) - Create embeddings
  • create(file_path, metadata, **kwargs) - Create/ingest a new document
  • update(doc_id, updates, **kwargs) - Update an existing document
  • delete(doc_id, **kwargs) - Delete a document
  • init_databases(tenant_id) - Initialize databases for a new tenant
  • cleanup_databases(tenant_id) - Cleanup databases for a tenant

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.02 Feb 20264

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:fbadf4b0651a9d395a3497a62d428c7609d1b7748ee451879393e02238b144f8