Skip to main content

Python SDK for OpenSearch of Ali Cloud

Project description

[![Build Status](https://travis-ci.org/yanheven/ali-opensearch-sdk.svg?branch=master)](https://travis-ci.org/yanheven/ali-opensearch-sdk)
[![Coverage Status](https://coveralls.io/repos/yanheven/ali-opensearch-sdk/badge.svg?branch=master&service=github)](https://coveralls.io/github/yanheven/ali-opensearch-sdk?branch=master)
[![PyPI version](https://badge.fury.io/py/ali-opensearch.svg)](https://badge.fury.io/py/ali-opensearch)

### Aliyun OpenSearch Python SDK

ali-opensearch-sdk is a python SDK for [Aliyun OpenSearch](http://www.aliyun.com/product/opensearch) Product.
Based on OpenSearch API version v2. This SDK supports both python2.x and python3.x.
Pypi link:[https://pypi.python.org/pypi/ucloudclient](https://pypi.python.org/pypi/ali-opensearch/2.0.0)
Project manage [Launchpad](https://launchpad.net/ali-opensearch-python-sdk)

#### 1 Design
##### 1.1 SDK structure
There are 7 type of resources provided by opensearch, they are:

1, app: Application
2, data: Data Process
3, search: Search Related Action
4, suggest: Suggestion for Search
5, index: Index Reconstruction
6, quota: Quota Management
7, log: Error Log Query

There are 5 Operation for almost all resources, they are CURD as follow:

1, list: list all of this type of resources.
2, show: show detail information of a specific resource.
3,4,5, CUD: create, update and delete a specific resource.

###### 1.1.1 app Operation:

#### 2, Installation:

You can install via pip:

#pip install ali-opensearch

Or, From Source code:

#git clone https://git.oschina.net/yanhyphen/ali-opensearch-sdk.git
#cd ali-opensearch-sdk
#python setup.py install

#### 3, Getting Started :

from opensearchsdk.client import Client as osclient
client = osclient(base_url, key, key_id)
apps = client.app.list()
print apps

output:

{
u'status': u'OK',
u'total': u'1',
u'result': [
{
u'description': u'test',
u'created': u'1447753400',
u'id': u'119631',
u'name': u'test'
}
],
u'request_id': u'1447866418002866600607068'
}

More examples can be found in `opensearchsdk/demo.py`.
Note: All return data from server were remained.

#### 4, Contribute and BUG:
This project was managed via [Launchpad](https://launchpad.net/ali-opensearch-python-sdk).
Welcome to log bugs and commit patch.
Code style follow the PEP8 rules.

#### 5, License:
Apache License Version 2.0

#### 6, Release Note:
1, V2.0.0-dev Provide only few functions of opensearch, not yet cover all functions.
2, V2.0.0 completed all api functions.
3, V2.0.1 add compatibility for python3.5.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ali-opensearch-2.0.4.tar.gz (11.6 kB view details)

Uploaded Source

Built Distributions

ali_opensearch-2.0.4-py3.5.egg (44.3 kB view details)

Uploaded Source

ali_opensearch-2.0.4-py2.7.egg (42.3 kB view details)

Uploaded Source

File details

Details for the file ali-opensearch-2.0.4.tar.gz.

File metadata

File hashes

Hashes for ali-opensearch-2.0.4.tar.gz
Algorithm Hash digest
SHA256 6f84fe98e3114b5046d5a8c58bfc9f4aca96adadd92dfd94fa211111b1d8c03c
MD5 b27627c2b18c1be8a6ee018cbaa52c86
BLAKE2b-256 a9afa2190d40ad3f314ac80141f72498f5882b5e9d89b00a1bdac218c822cee2

See more details on using hashes here.

File details

Details for the file ali_opensearch-2.0.4-py3.5.egg.

File metadata

File hashes

Hashes for ali_opensearch-2.0.4-py3.5.egg
Algorithm Hash digest
SHA256 1e6747c55419671049c811740e5b486ae5952e49b02124fc6efaa65c9ec7ca36
MD5 143b3487a8d0cedec6f59ee266a66bca
BLAKE2b-256 70af086ff5182f2f1d70477b8c7d950326e58704c429ca6c6af7b6d96f8e2b80

See more details on using hashes here.

File details

Details for the file ali_opensearch-2.0.4-py2.7.egg.

File metadata

File hashes

Hashes for ali_opensearch-2.0.4-py2.7.egg
Algorithm Hash digest
SHA256 b9bbc1a95db9ee32c3492b7bf8a24475d472a7c26f4fb68a136762cc2ad37afb
MD5 96360cf4ba58488a86ea794560afde4e
BLAKE2b-256 71de55e324e187e6f1a56f2f935fa816f2f44672c5e17fb2ce3dc1feba6c9878

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page