pyops: OpenSearch made pythonically easy
OpenSearch python client.
Examples:
>>> import pyops
>>> 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"
>>> }])
TODO
- APIs (search, ...)
- documentation
[HOW TO] DEPLOY
Update 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/*
CHANGELOG
- v0.0.2 (2019-07-16):
- Added: authentication management
- Bugfix: removed unused parameters from search (added regex)
- Tests: added test_authentication (description_xml_url and authentication params not committed)
- Issue #1: included tests in packaging
Metadata
Release files for pyops 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyops-0.0.2.tar.gz | 14.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyops-0.0.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 25.2 kB
Release files / pyops-0.0.2.tar.gz
| Download URL | pyops-0.0.2.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86c14328f438d8744db0fbe7df2d6fd27ce2a98ccc3c27f81354ecf04bb81f0a
|
|
BLAKE2b-256 checksum How to use checksums |
9815428b5097f38aff104db81acd6fbaf51be39a682f6ca9cd053986b813c617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.8
|
Release files / pyops-0.0.2-py2.py3-none-any.whl
| Download URL | pyops-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a4172f3e4cb0f2c47f7c80760b3ddab2f2fae016b01ec811f521f19b70e1ab41
|
|
BLAKE2b-256 checksum How to use checksums |
8f52a181138af594315494d67ce704ca83e54501339526a6f8a8cac10b7cecb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.8
|