Coder Social home page Coder Social logo

nasa-impact / pynequa Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 56 KB

A python library to handle communication with Sinequa's REST API.

License: MIT License

Shell 0.61% Python 97.37% Makefile 2.02%
enterprise-search knowledge-discovery sinequa

pynequa's Introduction

Pynequa

A python library to handle communication with Sinequa REST API.

Documentation Status Build

Sinequa is an enterprise search tool. It provides a cognitive search and analytics platform that helps organizations gain insights from their structured and unstructured data spread across various sources, including databases, documents, emails, websites, and more.

Installation

   $ pip install pynequa

Example Usage

import pynequa
from pynequa.models import QueryParams

# provide following config parameters
config = {
   "base_url": "",
   "app_name": "",
   "access_token":"",
   "query_name": ""
}

# initialize a Sinequa connector instance
sinequa=pynequa.Sinequa.from_config(config)

# OR
# you can directly instantiate Sinequa using
sinequa = pynequa.Sinequa(
     access_token: config["access_token"],
     base_url: config["base_url"],
     app_name: config["app_name"],
     query_name: config["query_name"],
)

params = QueryParams()
params.search_text = "<your_search_text>"
# other params

# perform a search query operation
results=sinequa.search_query(params)

Feature Roadmap

Implement following REST endpoints to manage requests with Sinequa API.

Search Endpoints:

  • search.app
  • search.dataset
  • search.query
  • queryintent
  • search.profile
  • search.usersettings
  • search.preview
  • search.queryexport
  • search.recentqueries
  • search.similardocuments
  • search.querylinks
  • search.ratings
  • search.profile.subtree
  • engine.sql
  • search.alerts
  • search.baskets
  • search.labels
  • serach.savedQueries
  • search.suggest
  • search.custom
  • suggestField

Indexing Endpoints

  • indexing.collection
  • indexing.customCollection
  • indexing.partition

Operating Task Endpoints

  • operation.actionStatus
  • operation.collectionStart
  • operation.commandStart
  • operation.jobStart
  • operation.partitionStart
  • operation.server
  • operation.serverstatus
  • operation.taskstatus

General Endpoints

  • audit.notify
  • admin.config
  • dev.plugin
  • multi

Development

Check DEVELOPERS GUIDE for details.

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the authors of this repository before making a change.

License

Distributed under the terms of the MIT license, pynequa is free and open source software.

pynequa's People

Contributors

anisbhsl avatar nish1001 avatar

Watchers

 avatar  avatar  avatar

Forkers

anisbhsl datanir

pynequa's Issues

Pynequa: Implement 2nd set of Search Endpoints

Implement all remaining search.* endpoint methods and fix tests.

The endpoints include:

  • search.alerts
  • search.baskets
  • search.labels
  • search.savedQueries
  • search.suggest
  • search.custom
  • suggestField
  • engine.sql

Tasks

Simplify the constructor for Sinequa class

Description

Currently pynequa.core.Sinequa class can only be initialized from a config dict. I propose moving the config-based construction to a new classmethod and use barebone parameters as a primary constructor

class Sinequa(API):
    def __init__(self, app_name=<default?>, query_name=<default?>, ..., debug: bool = False):
        pass

    @classmethod
    def from_config(cls, cfg: dict) -> Sinequa:
        pass

Why

Because we want more nuanced control of the construction without having to know what goes in the config. Normally config-based classes are initialized through secondary constructor

Pynequa: Add auto build and test scripts

Description

Add github workflows to perform build on new push to develop/master branch. Include tests files.

Acceptance Criteria:

  • Github build script
  • Unit tests for implemented methods

Tasks

Pynequa: Add documentation

Description

Add README, contributing docs, license and package docs.

Acceptance Criteria:

  • Proper README file
  • Proper contributing directions
  • License file
  • Add readthedocs

Restructuring Pynequa

This is an open issue to have discussions on restructuring pynequa hoping it will serve as documentation for future changes.

Currently, pynequa is organized as follows:

pynequa
|
|- core.py # contains main REST API method implementations for Sinequa
|- models.py # data models
|-api
   |-api.py # contains HTTP request implementations

This was the initial implementation of pynequa. With incoming changes, it is now time to think of re-structuring classes and separate search, index, collection, engine, extras implementations.

Tasks

  1. anisbhsl
  2. enhancement
    anisbhsl
  3. anisbhsl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.