Abstract base class for domain-specific database services
Project description
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 connectionsprocess_document(file_path, doc_id, metadata, **kwargs)- Process a documentextract_metadata(document, raw_metadata)- Extract domain-specific metadatacreate_chunks(document, doc_id, metadata)- Create chunks with domain-specific logicembed_text(texts)- Create embeddingscreate(file_path, metadata, **kwargs)- Create/ingest a new documentupdate(doc_id, updates, **kwargs)- Update an existing documentdelete(doc_id, **kwargs)- Delete a documentinit_databases(tenant_id)- Initialize databases for a new tenantcleanup_databases(tenant_id)- Cleanup databases for a tenant
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abstractdatabaseservice-1.0.0.tar.gz.
File metadata
- Download URL: abstractdatabaseservice-1.0.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e9e668d1a831afe224a9ebd96ac6d6cfeed8813adb4d72c828dcacdb9b05456
|
|
| MD5 |
709ef6bc9bf96e8fb0fc7f185b21e6c2
|
|
| BLAKE2b-256 |
c401f9c10664826a6fa26b960972f57f81845b1a1752280f0090e6ce3f5c7c84
|
File details
Details for the file abstractdatabaseservice-1.0.0-py3-none-any.whl.
File metadata
- Download URL: abstractdatabaseservice-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7e78414db97c4d084fbeb5217b1d59186c0875b8e8932d6c1a28b885d7cea23
|
|
| MD5 |
5e6195d9dd0ea7a87d2ef9ca172b127e
|
|
| BLAKE2b-256 |
f13ebb5a95a067c234311563c0a8e26a98bad7e85d572c81b6cc342c6de0cbeb
|