id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,287,600 | overview.py | pblottiere_QSA/qsa-api/qsa_api/raster/overview.py | # coding: utf8
import sys
from pathlib import Path
from qgis.core import QgsRasterLayer, Qgis
from ..config import QSAConfig
from ..utils import logger, s3_parse_uri, s3_bucket_upload
class RasterOverview:
def __init__(self, layer: QgsRasterLayer) -> None:
self.layer = layer
def is_valid(self):
... | 1,874 | Python | .py | 47 | 31.553191 | 85 | 0.616234 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,601 | __init__.py | pblottiere_QSA/qsa-api/qsa_api/raster/__init__.py | # coding: utf8
from .overview import RasterOverview
from .renderer import RasterSymbologyRenderer
| 99 | Python | .py | 3 | 31.666667 | 45 | 0.873684 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,602 | processing.py | pblottiere_QSA/qsa-api/qsa_api/api/processing.py | # coding: utf8
from jsonschema import validate
from flask import Blueprint, jsonify, request
from jsonschema.exceptions import ValidationError
from ..utils import logger
from ..project import QSAProject
from ..processing import RasterCalculator, Histogram
from .utils import log_request
processing = Blueprint("proc... | 3,235 | Python | .py | 88 | 26.613636 | 82 | 0.551504 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,603 | projects.py | pblottiere_QSA/qsa-api/qsa_api/api/projects.py | # coding: utf8
import shutil
import requests
from jsonschema import validate
from jsonschema.exceptions import ValidationError
from flask import send_file, Blueprint, jsonify, request
from qgis.PyQt.QtCore import QDateTime
from ..wms import WMS
from ..utils import logger
from ..project import QSAProject
from .utils... | 14,883 | Python | .py | 410 | 26.207317 | 67 | 0.545492 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,604 | utils.py | pblottiere_QSA/qsa-api/qsa_api/api/utils.py | # coding: utf8
import sys
import inspect
from ..utils import logger
def log_request():
caller_stack = inspect.stack()[1]
caller_fct = caller_stack.function
caller_frame = sys._getframe(1)
caller_mod = inspect.getmodule(caller_frame)
caller_fn = getattr(caller_mod, caller_fct)
req_type = c... | 553 | Python | .py | 14 | 35.285714 | 73 | 0.671698 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,605 | instances.py | pblottiere_QSA/qsa-api/qsa_api/api/instances.py | # coding: utf8
from flask import Blueprint
from flask import current_app
from datetime import datetime
from ..utils import logger
from .utils import log_request
instances = Blueprint("instances", __name__)
@instances.get("/")
def instances_list():
log_request()
try:
monitor = current_app.config["M... | 2,463 | Python | .py | 65 | 30.307692 | 76 | 0.631424 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,606 | symbology.py | pblottiere_QSA/qsa-api/qsa_api/api/symbology.py | # coding: utf8
from flask import Blueprint, jsonify
from qgis.core import (
QgsStyle,
QgsSimpleLineSymbolLayer,
QgsSimpleFillSymbolLayer,
QgsSingleBandGrayRenderer,
QgsMultiBandColorRenderer,
QgsSimpleMarkerSymbolLayer,
QgsSingleBandPseudoColorRenderer,
)
from ..utils import logger
from .... | 5,271 | Python | .py | 147 | 28.829932 | 88 | 0.618478 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,607 | histogram.py | pblottiere_QSA/qsa-api/qsa_api/processing/histogram.py | # coding: utf8
from multiprocessing import Process, Manager
from qgis.core import QgsProject, QgsRectangle
class Histogram:
def __init__(self, project_uri: str, layer: str) -> None:
self.layer = layer
self.project_uri = project_uri
def process(self, mini, maxi, count) -> (bool, dict):
... | 1,491 | Python | .py | 39 | 29.102564 | 75 | 0.5754 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,608 | raster_calculator.py | pblottiere_QSA/qsa-api/qsa_api/processing/raster_calculator.py | # coding: utf8
import rasterio
import tempfile
from pathlib import Path
from multiprocessing import Process, Manager
from qgis.PyQt.QtCore import QUrl, QUrlQuery
from qgis.analysis import QgsRasterCalcNode
from qgis.core import (
Qgis,
QgsProject,
QgsMapLayer,
QgsRasterPipe,
QgsRasterLayer,
Qg... | 7,298 | Python | .py | 190 | 27.052632 | 80 | 0.568053 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,609 | __init__.py | pblottiere_QSA/qsa-api/qsa_api/processing/__init__.py | # coding: utf8
from .histogram import Histogram
from .raster_calculator import RasterCalculator
| 97 | Python | .py | 3 | 31 | 47 | 0.860215 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,610 | renderer.py | pblottiere_QSA/qsa-api/qsa_api/vector/renderer.py | # coding: utf8
from pathlib import Path
from qgis.core import (
QgsSymbol,
QgsFeatureRenderer,
QgsReadWriteContext,
)
from qgis.PyQt.QtXml import QDomDocument, QDomNode
RENDERER_TAG_NAME = "renderer-v2" # constant from core/symbology/renderer.h
class VectorSymbologyRenderer:
@staticmethod
de... | 1,616 | Python | .py | 45 | 27.888889 | 78 | 0.605788 | pblottiere/QSA | 8 | 4 | 12 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,611 | pipeline.py | APAJanssen_KinaseDocker2/pipeline.py | # Pipeline imports
import argparse
import itertools
import os
import shutil
import time
import zlib
import docker
import pandas as pd
# from pymol import cmd
from rdkit import Chem
from rdkit.Chem import PandasTools
# Extra VinaGPU imports
import datetime
import re
import subprocess as sp
from meeko import MoleculeP... | 38,596 | Python | .py | 686 | 45.081633 | 242 | 0.609943 | APAJanssen/KinaseDocker2 | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,612 | __init__.py | APAJanssen_KinaseDocker2/__init__.py | '''
First two functions are pymol's plugin setup
'''
import logging
def __init_plugin__(app=None):
'''
Add an entry to the PyMOL "Plugin" menu
'''
from pymol.plugins import addmenuitemqt
addmenuitemqt('KinaseDocker\u00b2', run_plugin_gui)
# global reference to avoid garbage collection of the dial... | 23,118 | Python | .py | 439 | 38.14123 | 192 | 0.589001 | APAJanssen/KinaseDocker2 | 8 | 3 | 0 | GPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,613 | sshcm.py | Gyarbij_SSHConnectionMonitor/sshcm.py | import os
import time
import re
import subprocess
def check_ssh_connections(last_line):
log_files = ['/var/log/auth.log', '/var/log/secure'] # Add other log files if needed
new_last_line = last_line
for log_file in log_files:
if os.path.exists(log_file):
with open(log_file, 'r') as f:... | 2,852 | Python | .py | 60 | 33.616667 | 129 | 0.530605 | Gyarbij/SSHConnectionMonitor | 8 | 1 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,614 | .pylintrc-mandatory | OCA_automation/.pylintrc-mandatory |
[MASTER]
load-plugins=pylint_odoo
score=n
[ODOOLINT]
readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest-required-authors=Odoo Community Association (OCA)
manifest-required-keys=license
manifest-deprecated-keys=description,active
license-allowed=AGPL-3,GPL-2,G... | 2,649 | Python | .py | 93 | 24.16129 | 100 | 0.749118 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,615 | .pylintrc | OCA_automation/.pylintrc |
[MASTER]
load-plugins=pylint_odoo
score=n
[ODOOLINT]
readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest-required-authors=Odoo Community Association (OCA)
manifest-required-keys=license
manifest-deprecated-keys=description,active
license-allowed=AGPL-3,GPL-2,... | 3,512 | Python | .py | 115 | 26.269565 | 100 | 0.753024 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,616 | __init__.py | OCA_automation/automation_oca/__init__.py | from . import controllers
from . import models
from . import wizards
| 69 | Python | .py | 3 | 22 | 25 | 0.818182 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,617 | __manifest__.py | OCA_automation/automation_oca/__manifest__.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Automation Oca",
"summary": """
Automate actions in threaded models""",
"version": "16.0.1.1.1",
"license": "AGPL-3",
"category": "Automation",
"author": "Dixmit,Odoo Community Associatio... | 1,181 | Python | .py | 37 | 24.945946 | 64 | 0.581802 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,618 | automation_record.py | OCA_automation/automation_oca/models/automation_record.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
from collections import defaultdict
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class AutomationRecord(models.Model):
_name = "automation.record"
_description = "Automatio... | 6,619 | Python | .py | 172 | 26.976744 | 88 | 0.544648 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,619 | mail_mail.py | OCA_automation/automation_oca/models/mail_mail.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import re
import markupsafe
import werkzeug.urls
from odoo import api, fields, models, tools
class MailMail(models.Model):
_inherit = "mail.mail"
automation_record_step_id = fields.Many2one("automation.record.step")
... | 1,773 | Python | .py | 40 | 31.95 | 87 | 0.565621 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,620 | mail_thread.py | OCA_automation/automation_oca/models/mail_thread.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models, tools
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
@api.model
def _routing_handle_bounce(self, email_message, message_dict):
"""We want to mark the bounced ... | 2,639 | Python | .py | 61 | 33.065574 | 82 | 0.607629 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,621 | automation_configuration_step.py | OCA_automation/automation_oca/models/automation_configuration_step.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from collections import defaultdict
import babel.dates
from dateutil.relativedelta import relativedelta
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.osv import expression
from odo... | 19,321 | Python | .py | 481 | 28.546778 | 92 | 0.531179 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,622 | automation_filter.py | OCA_automation/automation_oca/models/automation_filter.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AutomationFilter(models.Model):
_name = "automation.filter"
_description = "Automation Filter"
name = fields.Char(required=True)
model_id = fields.Many2one(
"ir... | 706 | Python | .py | 19 | 31.473684 | 77 | 0.658358 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,623 | automation_tag.py | OCA_automation/automation_oca/models/automation_tag.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from random import randint
from odoo import api, fields, models
class AutomationTag(models.Model):
_name = "automation.tag"
_description = "Automation Tag"
@api.model
def _get_default_color(self):
retu... | 488 | Python | .py | 13 | 33.230769 | 68 | 0.720085 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,624 | __init__.py | OCA_automation/automation_oca/models/__init__.py | from . import automation_configuration
from . import automation_configuration_step
from . import automation_record
from . import automation_record_step
from . import mail_mail
from . import mail_thread
from . import link_tracker
from . import automation_filter
from . import automation_tag
from . import mail_activity
| 318 | Python | .py | 10 | 30.8 | 43 | 0.831169 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,625 | link_tracker.py | OCA_automation/automation_oca/models/link_tracker.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class LinkTrackerClick(models.Model):
_inherit = "link.tracker.click"
automation_record_step_id = fields.Many2one("automation.record.step")
automation_configuration_step_id = fie... | 1,745 | Python | .py | 40 | 31.5 | 86 | 0.567647 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,626 | mail_activity.py | OCA_automation/automation_oca/models/mail_activity.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MailActivity(models.Model):
_inherit = "mail.activity"
automation_record_step_id = fields.Many2one("automation.record.step")
def _action_done(self, *args, **kwargs):
if... | 470 | Python | .py | 10 | 41.5 | 73 | 0.705495 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,627 | automation_configuration.py | OCA_automation/automation_oca/models/automation_configuration.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from collections import defaultdict
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.tools.safe_eval import (
datetime as safe_datetime,
dateutil as safe_dateutil,
safe_eva... | 12,086 | Python | .py | 301 | 30.219269 | 93 | 0.565572 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,628 | automation_record_step.py | OCA_automation/automation_oca/models/automation_record_step.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import threading
import traceback
from io import StringIO
import werkzeug.urls
from dateutil.relativedelta import relativedelta
from odoo import _, api, fields, models, tools
from odoo.tools.safe_eval import safe_eval
class Aut... | 14,947 | Python | .py | 366 | 29.437158 | 87 | 0.554983 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,629 | main.py | OCA_automation/automation_oca/controllers/main.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import base64
from werkzeug.exceptions import NotFound
from odoo import http, tools
from odoo.http import Response, request
from odoo.tools import consteq
class AutomationOCAController(http.Controller):
# -----------------... | 2,355 | Python | .py | 57 | 32.807018 | 88 | 0.59607 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,630 | test_automation_mail.py | OCA_automation/automation_oca/tests/test_automation_mail.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import tools
from odoo.tests.common import Form, HttpCase
from odoo.addons.mail.tests.common import MockEmail
from .common import AutomationTestCase
MAIL_TEMPLATE = """Return-Path: <[email protected]... | 24,704 | Python | .py | 545 | 35.388991 | 95 | 0.616962 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,631 | __init__.py | OCA_automation/automation_oca/tests/__init__.py | from . import test_automation_action
from . import test_automation_activity
from . import test_automation_base
from . import test_automation_mail
from . import test_automation_security
| 185 | Python | .py | 5 | 36 | 38 | 0.833333 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,632 | test_automation_activity.py | OCA_automation/automation_oca/tests/test_automation_activity.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import Form
from .common import AutomationTestCase
class TestAutomationActivity(AutomationTestCase):
def test_activity_execution(self):
"""
We will check the execution of activity tasks (gene... | 6,385 | Python | .py | 136 | 37.330882 | 87 | 0.642846 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,633 | test_automation_action.py | OCA_automation/automation_oca/tests/test_automation_action.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from .common import AutomationTestCase
class TestAutomationAction(AutomationTestCase):
def test_activity_execution(self):
"""
We will check the execution of the tasks and that we cannot execute them again
... | 7,606 | Python | .py | 199 | 24.39196 | 88 | 0.472909 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,634 | test_automation_security.py | OCA_automation/automation_oca/tests/test_automation_security.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import users
from odoo.addons.mail.tests.common import mail_new_test_user
from .common import AutomationTestCase
class TestAutomationSecurity(AutomationTestCase):
@classmethod
def setUpClass(cls)... | 3,836 | Python | .py | 96 | 26.947917 | 85 | 0.511659 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,635 | test_automation_base.py | OCA_automation/automation_oca/tests/test_automation_base.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import datetime
from freezegun import freeze_time
from odoo.exceptions import ValidationError
from odoo.tests import Form
from odoo.tools.safe_eval import safe_eval
from .common import AutomationTestCase
class T... | 23,577 | Python | .py | 512 | 35.302734 | 88 | 0.60475 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,636 | common.py | OCA_automation/automation_oca/tests/common.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class AutomationTestCase(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env["automation.configuration"].search([]).toggle_active... | 3,558 | Python | .py | 87 | 28.333333 | 90 | 0.5114 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,637 | automation_configuration_test.py | OCA_automation/automation_oca/wizards/automation_configuration_test.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AutomationConfigurationTest(models.TransientModel):
_name = "automation.configuration.test"
_description = "Test automation configuration"
configuration_id = fields.Many2o... | 1,363 | Python | .py | 35 | 30.4 | 81 | 0.625 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,638 | mail_compose_message.py | OCA_automation/automation_oca/wizards/mail_compose_message.py | # Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MailComposeMessage(models.TransientModel):
_inherit = "mail.compose.message"
automation_record_step_id = fields.Many2one("automation.record.step")
def get_mail_values(self, re... | 612 | Python | .py | 14 | 35.142857 | 73 | 0.655405 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,639 | setup.py | OCA_automation/setup/_metapackage/setup.py | import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-automation",
description="Meta package for oca-automation Odoo addons",
version=version,
install_requires=[
'odoo-addon-automation_oca>=16.0dev,<16.1dev',
],
cla... | 447 | Python | .py | 16 | 22.8125 | 62 | 0.636364 | OCA/automation | 8 | 9 | 7 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,640 | ocr.py | Zipstack_unstract-sdk/src/unstract/sdk/ocr.py | from abc import ABCMeta
from typing import Optional
from deprecated import deprecated
from unstract.sdk.adapter import ToolAdapter
from unstract.sdk.adapters.constants import Common
from unstract.sdk.adapters.ocr import adapters
from unstract.sdk.adapters.ocr.ocr_adapter import OCRAdapter
from unstract.sdk.constants ... | 2,410 | Python | .py | 55 | 34.490909 | 87 | 0.646055 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,641 | prompt.py | Zipstack_unstract-sdk/src/unstract/sdk/prompt.py | import logging
from typing import Any, Optional
import requests
from requests import ConnectionError, RequestException, Response
from unstract.sdk.constants import LogLevel, PromptStudioKeys, ToolEnv
from unstract.sdk.helper import SdkHelper
from unstract.sdk.tool.base import BaseTool
from unstract.sdk.utils.common_u... | 6,457 | Python | .py | 158 | 30.424051 | 84 | 0.589107 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,642 | vector_db.py | Zipstack_unstract-sdk/src/unstract/sdk/vector_db.py | import logging
from collections.abc import Sequence
from typing import Any, Optional, Union
from deprecated import deprecated
from llama_index.core import StorageContext, VectorStoreIndex
from llama_index.core.indices.base import IndexType
from llama_index.core.node_parser import SentenceSplitter
from llama_index.core... | 8,636 | Python | .py | 200 | 33.725 | 85 | 0.653302 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,643 | constants.py | Zipstack_unstract-sdk/src/unstract/sdk/constants.py | from enum import Enum
class ToolEnv:
"""Environment variables used by tools.
The 'ToolEnv' class represents a set of environment variables that are
commonly used by tools.
Attributes:
PLATFORM_API_KEY (str): Platform service API key.
PLATFORM_HOST (str): Platform service host.
... | 4,038 | Python | .py | 120 | 28.441667 | 79 | 0.677769 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,644 | embedding.py | Zipstack_unstract-sdk/src/unstract/sdk/embedding.py | from typing import Any, Optional
from deprecated import deprecated
from llama_index.core.base.embeddings.base import Embedding
from llama_index.core.callbacks import CallbackManager as LlamaIndexCallbackManager
from llama_index.core.embeddings import BaseEmbedding
from unstract.sdk.adapter import ToolAdapter
from uns... | 4,856 | Python | .py | 108 | 35.037037 | 86 | 0.65072 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,645 | x2txt.py | Zipstack_unstract-sdk/src/unstract/sdk/x2txt.py | from abc import ABCMeta
from typing import Any, Optional
import pdfplumber
from deprecated import deprecated
from unstract.sdk.adapter import ToolAdapter
from unstract.sdk.adapters.constants import Common
from unstract.sdk.adapters.x2text import adapters
from unstract.sdk.adapters.x2text.constants import X2TextConsta... | 6,006 | Python | .py | 128 | 35.132813 | 87 | 0.621737 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,646 | cache.py | Zipstack_unstract-sdk/src/unstract/sdk/cache.py | from typing import Any, Optional
import requests
from unstract.sdk.constants import LogLevel
from unstract.sdk.platform import PlatformBase
from unstract.sdk.tool.base import BaseTool
class ToolCache(PlatformBase):
"""Class to handle caching for Unstract Tools.
Notes:
- PLATFORM_SERVICE_API_KEY env... | 3,621 | Python | .py | 96 | 26.958333 | 79 | 0.561073 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,647 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/__init__.py | __version__ = "0.52.0"
def get_sdk_version():
"""Returns the SDK version."""
return __version__
| 106 | Python | .py | 4 | 23 | 34 | 0.6 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,648 | platform.py | Zipstack_unstract-sdk/src/unstract/sdk/platform.py | from typing import Any, Optional
import requests
from unstract.sdk.constants import LogLevel, ToolEnv
from unstract.sdk.helper import SdkHelper
from unstract.sdk.tool.base import BaseTool
class PlatformBase:
"""Base class to handle interactions with Unstract's platform service.
Notes:
- PLATFORM_SE... | 2,602 | Python | .py | 64 | 31.359375 | 85 | 0.631788 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,649 | index.py | Zipstack_unstract-sdk/src/unstract/sdk/index.py | import json
import logging
from typing import Any, Callable, Optional
from deprecated import deprecated
from llama_index.core import Document
from llama_index.core.node_parser import SentenceSplitter
from llama_index.core.vector_stores import (
FilterOperator,
MetadataFilter,
MetadataFilters,
VectorSto... | 19,792 | Python | .py | 474 | 29.392405 | 88 | 0.56813 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,650 | helper.py | Zipstack_unstract-sdk/src/unstract/sdk/helper.py | import logging
from unstract.sdk.constants import PublicAdapterKeys
logger = logging.getLogger(__name__)
class SdkHelper:
def __init__(self) -> None:
pass
@staticmethod
def get_platform_base_url(platform_host: str, platform_port: str) -> str:
"""Make base url from host and port.
... | 1,580 | Python | .py | 40 | 29.45 | 82 | 0.599346 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,651 | exceptions.py | Zipstack_unstract-sdk/src/unstract/sdk/exceptions.py | class SdkError(Exception):
DEFAULT_MESSAGE = "Something went wrong"
def __init__(self, message: str = DEFAULT_MESSAGE):
super().__init__(message)
# Make it user friendly wherever possible
self.message = message
def __str__(self) -> str:
return self.message
class IndexingE... | 1,071 | Python | .py | 25 | 37.2 | 78 | 0.705825 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,652 | llm.py | Zipstack_unstract-sdk/src/unstract/sdk/llm.py | import logging
import re
from typing import Any, Callable, Optional
from deprecated import deprecated
from llama_index.core.base.llms.types import CompletionResponseGen
from llama_index.core.llms import LLM as LlamaIndexLLM
from llama_index.core.llms import CompletionResponse
from openai import APIError as OpenAIAPIEr... | 9,188 | Python | .py | 218 | 31.431193 | 88 | 0.601097 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,653 | adapter.py | Zipstack_unstract-sdk/src/unstract/sdk/adapter.py | import json
from typing import Any, Optional
import requests
from requests.exceptions import ConnectionError, HTTPError
from unstract.sdk.adapters.utils import AdapterUtils
from unstract.sdk.constants import AdapterKeys, LogLevel, ToolEnv
from unstract.sdk.exceptions import SdkError
from unstract.sdk.helper import Sd... | 4,833 | Python | .py | 111 | 33.612613 | 85 | 0.6331 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,654 | audit.py | Zipstack_unstract-sdk/src/unstract/sdk/audit.py | from typing import Any, Union
import requests
from llama_index.core.callbacks import CBEventType, TokenCountingHandler
from unstract.sdk.constants import LogLevel, ToolEnv
from unstract.sdk.helper import SdkHelper
from unstract.sdk.tool.stream import StreamMixin
from unstract.sdk.utils.token_counter import TokenCount... | 5,996 | Python | .py | 144 | 29.659722 | 86 | 0.561825 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,655 | validator.py | Zipstack_unstract-sdk/src/unstract/sdk/tool/validator.py | import re
from json import JSONDecodeError
from pathlib import Path
from typing import Any
from jsonschema import Draft202012Validator, ValidationError, validators
from unstract.sdk.constants import MetadataKey, PropKey
from unstract.sdk.tool.base import BaseTool
from unstract.sdk.tool.mime_types import EXT_MIME_MAP
... | 7,568 | Python | .py | 179 | 32.553073 | 80 | 0.61372 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,656 | executor.py | Zipstack_unstract-sdk/src/unstract/sdk/tool/executor.py | import argparse
import logging
import shutil
from json import loads
from pathlib import Path
from typing import Any
from unstract.sdk import get_sdk_version
from unstract.sdk.constants import Command
from unstract.sdk.tool.base import BaseTool
from unstract.sdk.tool.validator import ToolValidator
logger = logging.get... | 2,826 | Python | .py | 65 | 34.6 | 86 | 0.638251 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,657 | mixin.py | Zipstack_unstract-sdk/src/unstract/sdk/tool/mixin.py | import logging
from typing import Any
from unstract.sdk.utils import ToolUtils
logger = logging.getLogger(__name__)
class ToolConfigHelper:
"""Helper class to handle static commands for tools."""
@staticmethod
def spec(spec_file: str = "config/spec.json") -> dict[str, Any]:
"""Returns the JSON ... | 2,098 | Python | .py | 57 | 27.789474 | 68 | 0.606509 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,658 | stream.py | Zipstack_unstract-sdk/src/unstract/sdk/tool/stream.py | import datetime
import json
import os
from typing import Any
from deprecated import deprecated
from unstract.sdk.constants import Command, LogLevel, LogStage, ToolEnv
from unstract.sdk.utils import ToolUtils
class StreamMixin:
"""Helper class for streaming Unstract tool commands.
A utility class to make wr... | 7,741 | Python | .py | 218 | 25.619266 | 88 | 0.566297 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,659 | mime_types.py | Zipstack_unstract-sdk/src/unstract/sdk/tool/mime_types.py | # flake8: noqa
"""Contains a mapping of file extension to MIME types.
Multiple extensions can be mapped to the same MIME type Through
http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
"""
EXT_MIME_MAP = {
"123": "application/vnd.lotus-1-2-3",
"3dml": "text/vnd.in3d.3dml",
"3ds": "image... | 38,700 | Python | .py | 994 | 33.960765 | 88 | 0.644079 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,660 | base.py | Zipstack_unstract-sdk/src/unstract/sdk/tool/base.py | import datetime
import json
from abc import ABC, abstractmethod
from json import JSONDecodeError, loads
from pathlib import Path
from typing import Any, Union
from unstract.sdk.constants import (
Command,
LogLevel,
MetadataKey,
PropKey,
ToolEnv,
ToolExecKey,
)
from unstract.sdk.tool.mixin impor... | 10,668 | Python | .py | 238 | 35.445378 | 88 | 0.630393 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,661 | parser.py | Zipstack_unstract-sdk/src/unstract/sdk/tool/parser.py | import argparse
from typing import Optional
from dotenv import find_dotenv, load_dotenv
from unstract.sdk.constants import LogLevel
class ToolArgsParser:
"""Class to help with parsing arguments to a tool."""
@staticmethod
def parse_args(args_to_parse: list[str]) -> argparse.Namespace:
"""Helps ... | 1,696 | Python | .py | 49 | 25.102041 | 80 | 0.592186 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,662 | entrypoint.py | Zipstack_unstract-sdk/src/unstract/sdk/tool/entrypoint.py | from unstract.sdk.tool.base import BaseTool
from unstract.sdk.tool.executor import ToolExecutor
from unstract.sdk.tool.parser import ToolArgsParser
class ToolEntrypoint:
"""Class that contains methods for the entrypoint for a tool."""
@staticmethod
def launch(tool: BaseTool, args: list[str]) -> None:
... | 721 | Python | .py | 17 | 35.235294 | 68 | 0.695279 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,663 | tool_utils.py | Zipstack_unstract-sdk/src/unstract/sdk/utils/tool_utils.py | import json
from hashlib import md5, sha256
from pathlib import Path
from typing import Any
import magic
class ToolUtils:
"""Class containing utility methods."""
@staticmethod
def hash_str(string_to_hash: Any, hash_method: str = "sha256") -> str:
"""Computes the hash for a given input string.
... | 6,382 | Python | .py | 157 | 29.318471 | 86 | 0.553672 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,664 | common_utils.py | Zipstack_unstract-sdk/src/unstract/sdk/utils/common_utils.py | import functools
import logging
import time
import uuid
from unstract.sdk.constants import LogLevel
logger = logging.getLogger(__name__)
class CommonUtils:
@staticmethod
def generate_uuid() -> str:
"""Class method to get uuid."""
return str(uuid.uuid4())
# Mapping from python log level to ... | 1,106 | Python | .py | 36 | 23.722222 | 81 | 0.63327 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,665 | callback_manager.py | Zipstack_unstract-sdk/src/unstract/sdk/utils/callback_manager.py | import logging
from typing import Callable, Optional, Union
import tiktoken
from deprecated import deprecated
from llama_index.core.callbacks import CallbackManager as LlamaIndexCallbackManager
from llama_index.core.callbacks import TokenCountingHandler
from llama_index.core.embeddings import BaseEmbedding
from llama_... | 5,158 | Python | .py | 135 | 27.777778 | 85 | 0.617247 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,666 | usage_handler.py | Zipstack_unstract-sdk/src/unstract/sdk/utils/usage_handler.py | from typing import Any, Optional
from llama_index.core.callbacks import CBEventType, TokenCountingHandler
from llama_index.core.callbacks.base_handler import BaseCallbackHandler
from llama_index.core.embeddings import BaseEmbedding
from llama_index.core.llms import LLM
from unstract.sdk.audit import Audit
from unstra... | 4,762 | Python | .py | 112 | 32.866071 | 88 | 0.621901 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,667 | token_counter.py | Zipstack_unstract-sdk/src/unstract/sdk/utils/token_counter.py | from typing import Any, Union
from llama_index.core.callbacks.schema import EventPayload
from llama_index.core.llms import ChatResponse, CompletionResponse
class Constants:
DEFAULT_TOKEN_COUNT = 0
class TokenCounter:
prompt_llm_token_count: int
completion_llm_token_count: int
total_llm_token_count:... | 4,376 | Python | .py | 104 | 29.278846 | 79 | 0.573643 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,668 | enums.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/enums.py | from enum import Enum
class AdapterTypes(Enum):
UNKNOWN = "UNKNOWN"
LLM = "LLM"
EMBEDDING = "EMBEDDING"
VECTOR_DB = "VECTOR_DB"
OCR = "OCR"
X2TEXT = "X2TEXT"
| 184 | Python | .py | 8 | 18.75 | 27 | 0.637931 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,669 | constants.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/constants.py | class Common:
METADATA = "metadata"
MODULE = "module"
ADAPTER = "adapter"
SRC_FOLDER = "src"
ADAPTER_METADATA = "adapter_metadata"
ICON = "icon"
ADAPTER_ID = "adapter_id"
ADAPTER_TYPE = "adapter_type"
DEFAULT_ERR_MESSAGE = "Something went wrong"
| 282 | Python | .py | 10 | 23.6 | 48 | 0.654412 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,670 | adapterkit.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/adapterkit.py | import logging
from typing import Any
from singleton_decorator import singleton
from unstract.sdk.adapters import AdapterDict
from unstract.sdk.adapters.base import Adapter
from unstract.sdk.adapters.constants import Common
from unstract.sdk.adapters.embedding import adapters as embedding_adapters
from unstract.sdk.a... | 2,837 | Python | .py | 74 | 28.472973 | 76 | 0.605598 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,671 | utils.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/utils.py | from pathlib import Path
import filetype
import magic
from requests import Response
from requests.exceptions import RequestException
from unstract.sdk.adapters.constants import Common
class AdapterUtils:
@staticmethod
def get_msg_from_request_exc(
err: RequestException,
message_key: str,
... | 2,314 | Python | .py | 58 | 30.413793 | 78 | 0.620321 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,672 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/__init__.py | import logging
from logging import NullHandler
from typing import Any
logging.getLogger(__name__).addHandler(NullHandler())
AdapterDict = dict[str, dict[str, Any]]
| 167 | Python | .py | 5 | 31.8 | 53 | 0.811321 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,673 | base.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/base.py | import logging
from abc import ABC, abstractmethod
from unstract.sdk.adapters.enums import AdapterTypes
logger = logging.getLogger(__name__)
class Adapter(ABC):
def __init__(self, name: str):
self.name = name
@staticmethod
@abstractmethod
def get_id() -> str:
return ""
@staticm... | 985 | Python | .py | 38 | 19.763158 | 69 | 0.629947 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,674 | exceptions.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/exceptions.py | from unstract.sdk.exceptions import SdkError
class AdapterError(SdkError):
pass
class LLMError(AdapterError):
pass
class VectorDBError(AdapterError):
pass
class EmbeddingError(AdapterError):
pass
class ExtractorError(AdapterError):
pass
| 267 | Python | .py | 11 | 20.545455 | 44 | 0.817073 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,675 | registry.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/registry.py | from abc import ABC, abstractmethod
from typing import Any
class AdapterRegistry(ABC):
def __init__(self, name: str):
self.name = name
@staticmethod
@abstractmethod
def register_adapters(adapters: dict[str, Any]) -> None:
pass
| 262 | Python | .py | 9 | 24.222222 | 60 | 0.692 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,676 | constants.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/constants.py | class VectorDbConstants:
VECTOR_DB_NAME = "collection_name"
EMBEDDING_DIMENSION = "embedding_dimension"
DEFAULT_VECTOR_DB_NAME = "unstract"
DEFAULT_EMBEDDING_SIZE = 2
WAIT_TIME = "wait_time"
| 211 | Python | .py | 6 | 30.833333 | 47 | 0.721951 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,677 | vectordb_adapter.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/vectordb_adapter.py | from abc import ABC
from typing import Any, Union
from llama_index.core.schema import BaseNode
from llama_index.core.vector_stores import SimpleVectorStore
from llama_index.core.vector_stores.types import BasePydanticVectorStore, VectorStore
from unstract.sdk.adapters.base import Adapter
from unstract.sdk.adapters.en... | 2,330 | Python | .py | 67 | 26.955224 | 85 | 0.64203 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,678 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/__init__.py | from unstract.sdk.adapters import AdapterDict
from unstract.sdk.adapters.vectordb.register import VectorDBRegistry
adapters: AdapterDict = {}
VectorDBRegistry.register_adapters(adapters)
| 189 | Python | .py | 4 | 45.75 | 68 | 0.874317 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,679 | helper.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/helper.py | import logging
import os
from typing import Optional
from llama_index.core import (
MockEmbedding,
SimpleDirectoryReader,
StorageContext,
VectorStoreIndex,
)
from llama_index.core.llms import MockLLM
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from unstract.sdk.adapters.ex... | 4,241 | Python | .py | 94 | 33.361702 | 85 | 0.610977 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,680 | register.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/register.py | import logging
import os
from importlib import import_module
from typing import Any
from unstract.sdk.adapters.constants import Common
from unstract.sdk.adapters.registry import AdapterRegistry
from unstract.sdk.adapters.vectordb.vectordb_adapter import VectorDBAdapter
logger = logging.getLogger(__name__)
class Vec... | 1,992 | Python | .py | 41 | 38.073171 | 86 | 0.638046 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,681 | pinecone.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/pinecone/src/pinecone.py | import logging
import os
from typing import Any, Optional
from llama_index.core.schema import BaseNode
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from llama_index.vector_stores.pinecone import PineconeVectorStore
from pinecone import NotFoundException
from pinecone import Pinecone as LLam... | 6,372 | Python | .py | 146 | 32.869863 | 81 | 0.616562 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,682 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/pinecone/src/__init__.py | from .pinecone import Pinecone
metadata = {
"name": Pinecone.__name__,
"version": "1.0.0",
"adapter": Pinecone,
"description": "Pinecone VectorDB adapter",
"is_active": True,
}
| 198 | Python | .py | 8 | 21.125 | 47 | 0.640212 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,683 | qdrant.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/qdrant/src/qdrant.py | import logging
import os
from typing import Any, Optional
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from llama_index.vector_stores.qdrant import QdrantVectorStore
from qdrant_client import QdrantClient
from unstract.sdk.adapters.exceptions import AdapterError
from unstract.sdk.adapters.... | 3,060 | Python | .py | 74 | 32.891892 | 78 | 0.654882 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,684 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/qdrant/src/__init__.py | from .qdrant import Qdrant
metadata = {
"name": Qdrant.__name__,
"version": "1.0.0",
"adapter": Qdrant,
"description": "Qdrant VectorDB adapter",
"is_active": True,
}
| 188 | Python | .py | 8 | 19.875 | 45 | 0.620112 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,685 | weaviate.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/weaviate/src/weaviate.py | import logging
import os
from typing import Any, Optional
import weaviate
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from llama_index.vector_stores.weaviate import WeaviateVectorStore
from weaviate.classes.init import Auth
from weaviate.exceptions import UnexpectedStatusCodeException
fro... | 3,946 | Python | .py | 91 | 33.56044 | 88 | 0.642001 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,686 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/weaviate/src/__init__.py | from .weaviate import Weaviate
metadata = {
"name": Weaviate.__name__,
"version": "1.0.0",
"adapter": Weaviate,
"description": "Weaviate VectorDB adapter",
"is_active": True,
}
| 198 | Python | .py | 8 | 21.125 | 47 | 0.640212 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,687 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/postgres/src/__init__.py | from .postgres import Postgres
metadata = {
"name": Postgres.__name__,
"version": "1.0.0",
"adapter": Postgres,
"description": "Postgres VectorDB adapter",
"is_active": True,
}
| 198 | Python | .py | 8 | 21.125 | 47 | 0.640212 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,688 | postgres.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/postgres/src/postgres.py | import os
from typing import Any, Optional
from urllib.parse import quote_plus
import psycopg2
from llama_index.core.vector_stores.types import BasePydanticVectorStore
from llama_index.vector_stores.postgres import PGVectorStore
from psycopg2._psycopg import connection
from unstract.sdk.adapters.exceptions import Ada... | 4,283 | Python | .py | 103 | 31.631068 | 84 | 0.626622 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,689 | supabase.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/supabase/src/supabase.py | import os
from typing import Any, Optional
from urllib.parse import quote_plus
from llama_index.core.vector_stores.types import VectorStore
from llama_index.vector_stores.supabase import SupabaseVectorStore
from vecs import Client
from unstract.sdk.adapters.exceptions import AdapterError
from unstract.sdk.adapters.ve... | 3,630 | Python | .py | 88 | 32.022727 | 81 | 0.63755 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,690 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/supabase/src/__init__.py | from .supabase import Supabase
metadata = {
"name": Supabase.__name__,
"version": "1.0.0",
"adapter": Supabase,
"description": "Supabase VectorDB adapter",
"is_active": False,
}
| 199 | Python | .py | 8 | 21.25 | 47 | 0.642105 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,691 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/milvus/src/__init__.py | from .milvus import Milvus
metadata = {
"name": Milvus.__name__,
"version": "1.0.0",
"adapter": Milvus,
"description": "Milvus VectorDB adapter",
"is_active": True,
}
| 188 | Python | .py | 8 | 19.875 | 45 | 0.620112 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,692 | milvus.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/milvus/src/milvus.py | import os
from typing import Any, Optional
from llama_index.core.vector_stores.types import VectorStore
from llama_index.vector_stores.milvus import MilvusVectorStore
from pymilvus import MilvusClient
from unstract.sdk.adapters.exceptions import AdapterError
from unstract.sdk.adapters.vectordb.constants import Vector... | 2,935 | Python | .py | 73 | 31.547945 | 77 | 0.646294 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,693 | no_op_custom_vectordb.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/no_op/src/no_op_custom_vectordb.py | import time
from typing import Any
from llama_index.core.schema import TextNode
from llama_index.core.vector_stores.types import VectorStore, VectorStoreQueryResult
class NoOpCustomVectorDB(VectorStore):
stores_text: bool = True
stores_node: bool = True
is_embedding_query: bool = True
wait_time: floa... | 964 | Python | .py | 27 | 28.851852 | 84 | 0.649839 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,694 | no_op_vectordb.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/no_op/src/no_op_vectordb.py | import os
import time
from typing import Any
from llama_index.core.schema import BaseNode
from llama_index.core.vector_stores.types import VectorStore
from unstract.sdk.adapters.exceptions import AdapterError
from unstract.sdk.adapters.vectordb.constants import VectorDbConstants
from unstract.sdk.adapters.vectordb.he... | 2,675 | Python | .py | 66 | 32.69697 | 86 | 0.661141 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,695 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/vectordb/no_op/src/__init__.py | from unstract.sdk.adapters.vectordb.no_op.src.no_op_vectordb import NoOpVectorDB
metadata = {
"name": NoOpVectorDB.__name__,
"version": "1.0.0",
"adapter": NoOpVectorDB,
"description": "NoOpVectorDB",
"is_active": True,
}
| 243 | Python | .py | 8 | 26.75 | 80 | 0.683761 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,696 | __init__.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/embedding/__init__.py | from unstract.sdk.adapters import AdapterDict
from unstract.sdk.adapters.embedding.register import EmbeddingRegistry
adapters: AdapterDict = {}
EmbeddingRegistry.register_adapters(adapters)
| 191 | Python | .py | 4 | 46.5 | 70 | 0.876344 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,697 | helper.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/embedding/helper.py | import logging
from typing import Any, Optional
from llama_index.core.embeddings import BaseEmbedding
from unstract.sdk.adapters.exceptions import AdapterError
logger = logging.getLogger(__name__)
class EmbeddingConstants:
DEFAULT_EMBED_BATCH_SIZE = 10
EMBED_BATCH_SIZE = "embed_batch_size"
class Embeddin... | 1,323 | Python | .py | 34 | 29.088235 | 78 | 0.636222 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,698 | register.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/embedding/register.py | import logging
import os
from importlib import import_module
from typing import Any
from unstract.sdk.adapters.constants import Common
from unstract.sdk.adapters.embedding.embedding_adapter import EmbeddingAdapter
from unstract.sdk.adapters.registry import AdapterRegistry
logger = logging.getLogger(__name__)
class ... | 2,001 | Python | .py | 41 | 38.292683 | 86 | 0.639713 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |
2,287,699 | embedding_adapter.py | Zipstack_unstract-sdk/src/unstract/sdk/adapters/embedding/embedding_adapter.py | from abc import ABC, abstractmethod
from typing import Any
from llama_index.core import MockEmbedding
from llama_index.core.embeddings import BaseEmbedding
from unstract.sdk.adapters.base import Adapter
from unstract.sdk.adapters.enums import AdapterTypes
class EmbeddingAdapter(Adapter, ABC):
def __init__(self,... | 1,238 | Python | .py | 39 | 25.384615 | 84 | 0.666105 | Zipstack/unstract-sdk | 8 | 0 | 1 | AGPL-3.0 | 9/5/2024, 10:48:18 PM (Europe/Amsterdam) |