Search Engine DataBase utils
Project description
sedb
Search Engine DataBase utils
Install
pip install sedb --upgrade
Usage
Run example:
python example.py
See: example.py
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent / "src"))
import sedb
from sedb import MongoOperator, MongoConfigsType
if __name__ == "__main__":
mongo_configs = {
"host": "localhost",
"port": 27017,
"dbname": "test",
}
collection = "videos"
mongo = MongoOperator(configs=mongo_configs, indent=0)
cursor1 = mongo.get_cursor(
collection,
filter_index="pubdate",
filter_op="lte",
filter_range="2012-01-01",
sort_index="pubdate",
sort_order="asc",
)
print(cursor1.next())
cursor2 = mongo.get_cursor(
collection,
filter_index="pubdate",
filter_op="range",
filter_range=["2012-01-01", "2012-12-31"],
sort_index="pubdate",
sort_order="asc",
)
print(cursor2.next())
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
sedb-0.2.tar.gz
(3.8 kB
view details)
Built Distribution
sedb-0.2-py3-none-any.whl
(4.4 kB
view details)
File details
Details for the file sedb-0.2.tar.gz
.
File metadata
- Download URL: sedb-0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4dce1dfd759fae62288d6db676ec8a9c6788b2ac301a5c26bff02c4acb30a8c |
|
MD5 | 7fa2230b7f9c9949bdce21ebb4711653 |
|
BLAKE2b-256 | 483b130e2f9563f6dfa8c2606ae9963afdb12de87e7062bbf6510af94c2bd884 |
File details
Details for the file sedb-0.2-py3-none-any.whl
.
File metadata
- Download URL: sedb-0.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f506d6b4c210cd343883f442aa4771a9dae058ece8a6b1065cc5c592cc95189b |
|
MD5 | f826fc83848f18aa9713497bf534f945 |
|
BLAKE2b-256 | a828c5a54cfb27f5dc5c008d1a8a5476a92fcd916d97066720f03190e0ce4180 |