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-12-31", "2012-01-01"],
sort_index="pubdate",
sort_order="asc",
)
print(cursor2.next())
cursor3 = mongo.get_cursor(
collection,
filter_index="pubdate",
filter_op="range",
filter_range=["2012-01-01", None],
sort_index="pubdate",
sort_order="asc",
)
print(cursor3.next())
Project details
Release history Release notifications | RSS feed
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.6.tar.gz
(11.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
sedb-0.6-py3-none-any.whl
(14.1 kB
view details)
File details
Details for the file sedb-0.6.tar.gz.
File metadata
- Download URL: sedb-0.6.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2b616065f8f9f0f27a6e556dee9a009bcc36efd2175e83f090a196512773a53
|
|
| MD5 |
30dbd539879cd5bd15b1edd564bd52b3
|
|
| BLAKE2b-256 |
08a396b7fe49fe69b2e82831ab9aec320e3a19972e1c64941c6f62e0863d1e1b
|
File details
Details for the file sedb-0.6-py3-none-any.whl.
File metadata
- Download URL: sedb-0.6-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7da256325acff596d1ffdcdb280d0afc40be73dcce199f5148658f77a026992d
|
|
| MD5 |
3a7e2ce3fe9ac71b5f00e04a52522619
|
|
| BLAKE2b-256 |
ce5110385d8887428e704be0792728338b834d0bdc8b3bfa52407a6869d49aa9
|