GithubHelp home page GithubHelp logo

memas-python-client's Introduction

memas-client

This is the Data Plane client for MeMaS (Memory Management Service). See https://github.com/memas-ai/MeMaS for more details.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.1.1
  • Package version: 0.1.5
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >=3.7

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/memas-ai/MeMaS-python-client.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/memas-ai/MeMaS-python-client.git)

Then import the package:

import memas_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import memas_client

Getting Started

Please follow the installation procedure and then run the following:

import time
import memas_client
from pprint import pprint
from memas_client.apis.tags import dp_api
from memas_client.model.cited_document import CitedDocument
from memas_client.model.namespace_does_not_exist_error import NamespaceDoesNotExistError
from memas_client.model.namespace_illegal_name_error import NamespaceIllegalNameError
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = memas_client.Configuration(
    host = "http://localhost"
)


# Enter a context with an instance of the API client
with memas_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dp_api.DpApi(api_client)
    any_type = None # anyType | Request object for memorizing a document

    try:
        # Memorize information
        api_response = api_instance.memorize(any_type)
        pprint(api_response)
    except memas_client.ApiException as e:
        print("Exception when calling DpApi->memorize: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
DpApi memorize post /dp/memorize Memorize information
DpApi recall post /dp/recall Recalls information

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

[email protected]

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in memas_client.apis and memas_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from memas_client.apis.default_api import DefaultApi
  • from memas_client.model.pet import Pet

Solution 1: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import memas_client
from memas_client.apis import *
from memas_client.models import *

memas-python-client's People

Contributors

maxyu1115 avatar

Watchers

 avatar

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.