This repository has been archived by the owner on Apr 7, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sergio Ferraresi
committed
Oct 9, 2018
1 parent
106c48c
commit 39b61cb
Showing
10 changed files
with
754 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include README.md LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,55 @@ | ||
# pyops | ||
OpenSearch python client | ||
pyops: OpenSearch made easy | ||
=========================== | ||
|
||
OpenSearch python client. | ||
|
||
Examples: | ||
```python | ||
# simple example | ||
>>> import pyops | ||
>>> client = pyops.Client(repository_desx="https://example.org") | ||
>>> raw_results = client.search() | ||
|
||
# advanced search | ||
>>> raw_results = client.search(params={"{eop:instrument?}": {"value": "SAR"}}) | ||
|
||
# advandced results filtering | ||
>>> 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" | ||
>>> }]) | ||
``` | ||
|
||
TODO | ||
---- | ||
- APIs (search, ...) | ||
- documentation | ||
|
||
[HOW TO] DEPLOY | ||
--------------- | ||
Update `pyops.__version__.py` | ||
```bash | ||
# 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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .core import Client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
VERSION = (0, 0, 1) | ||
|
||
__version__ = '.'.join(map(str, VERSION)) |
Oops, something went wrong.