opensearch python客户端。
pyops的Python项目详细描述
pyops:opensearch使pythonical变得简单
opensearch python客户端。
示例:
>>>importpyops>>>client=pyops.Client(description_xml_url="https://example.org")# simple search>>>raw_results=client.search()# authenticated search>>>raw_results=client.search(auth=('username','password'))# advanced search>>>raw_results=client.search(params={"{eop:instrument?}":{"value":"SAR"}})# results filtering>>>raw_results=client.search()>>>entry_fields=client.get_available_fields()>>>filtered_results=client.filter_entries([{>>>"tag":"{http://www.w3.org/2005/Atom}id",>>>"name":"id">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}title",>>>"name":"title">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}summary",>>>"name":"summary">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}published",>>>"name":"published">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}updated",>>>"name":"updated">>>},{>>>"tag":"{http://www.w3.org/2005/Atom}link",>>>"name":"link",>>>"rel":"enclosure">>>}])
待办事项
- API(搜索,…)
- 文档
[如何]展开
更新pyops.__version__.py
# create packages python3 setup.py sdist bdist_wheel # upload on test.pypi twine upload --repository-url https://test.pypi.org/legacy/ dist/* # test install python3 -m pip install --index-url https://test.pypi.org/simple/ pyops # upload on pypi twine upload dist/*
更改日志
- V0.0.2(2019年7月16日):
- 添加:身份验证管理
- 错误修复:从搜索中删除了未使用的参数(添加了正则表达式)
- 测试:添加了测试身份验证(说明XML URL和身份验证参数未提交)
- 问题1:包装中包含测试