Skip to main content

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


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.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

sedb-0.2.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file sedb-0.2.2.tar.gz.

File metadata

  • Download URL: sedb-0.2.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for sedb-0.2.2.tar.gz
Algorithm Hash digest
SHA256 284aa26388ae26ef433929d7ccc0a8f6747f664a4ccc8fa74848fcf3f9a4ecd0
MD5 85e7b008ffd7df332cd81d27d3fde941
BLAKE2b-256 96ef769483a7e0e5132160b18ffdf166a9bb0384c5df9165319ed6e86a25c389

See more details on using hashes here.

File details

Details for the file sedb-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: sedb-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for sedb-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7cf3e23f8aa42e53af2a6161aee64977d8788359d3369b9384bd48d32e0e1ae0
MD5 c5e1762d34517638aabfda872afd557a
BLAKE2b-256 42e8392c4b5e88923cd19019ee3a1f0718c60e406693e4444bac5e611a58bc4b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page