Skip to main content

Baybin Sentinel: OpenSearch writer

Project description

Baybin Sentinel

baybin_sentinel is a Python utility package designed for the Baybin Sentiment Analysis System. It provides specialized writers to streamline the ingestion of social media data into OpenSearch.

Installation

(For Crawler Developers) Install Package

$ pip install -U baybin_sentinel

(For Package Developers) Create Virtual Environment

$ conda update -n base -c conda-forge conda
$ conda create -n sentinel python=3.13 pip -y
$ conda activate sentinel
$ cd E:\baybin_sentinel
$ pip install -r requirements.txt

Example (Threads)

from baybin_sentinel.platforms.threads import ThreadsWriter

# Initialize writer
writer = ThreadsWriter(
    host="192.168.x.x",
    port=9200,
    user="your_username",
    password="your_password",
    verify_certs=False
)

# Single post
post = crawled_threads(...)
writer.save(post)

# Multiple posts (bulk)
posts = crawled_threads_bulk(...)
writer.save_bulk(posts)

Example (Facebook)

from baybin_sentinel.platforms.facebook import FacebookWriter

# Initialize writer
writer = FacebookWriter(
    host="192.168.x.x",
    port=9200,
    user="your_username",
    password="your_password",
    verify_certs=False
)

# Single post
post = crawled_facebook(...)
writer.save(post)

# Multiple posts (bulk)
posts = crawled_facebook_bulk(...)
writer.save_bulk(posts)

Publishing to PyPI

If you are the maintainer, follow these steps to publish a new version:

  1. Update version in pyproject.toml (e.g., 0.2.0).

  2. Install build tools:

    pip install build twine
    
  3. Build the package:

    # Remove old builds
    rmdir /s /q dist build 2>nul
    # Build new artifacts
    python -m build
    
  4. Upload to PyPI:

    python -m twine upload dist/*
    
  5. Authentication: When prompted for a username and password:

    • Username: __token__
    • Password: pypi-your-api-token-here (including the pypi- prefix)

    Note: You can also configure this in a .pypirc file in your home directory to skip manual entry.

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

baybin_sentinel-2026.6.18.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

baybin_sentinel-2026.6.18.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file baybin_sentinel-2026.6.18.1.tar.gz.

File metadata

  • Download URL: baybin_sentinel-2026.6.18.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for baybin_sentinel-2026.6.18.1.tar.gz
Algorithm Hash digest
SHA256 535ad823180fc1e647dd7563019847c97efc1e7ddf7c1cf9d8b3ad06a36cdbd3
MD5 f846d15a65c6e713f5bdde184c0aa2ed
BLAKE2b-256 be6673b8f89d2d83055a52cd969a5bb01930721721f6e182f38a4c3a066864ec

See more details on using hashes here.

File details

Details for the file baybin_sentinel-2026.6.18.1-py3-none-any.whl.

File metadata

File hashes

Hashes for baybin_sentinel-2026.6.18.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0c30fe6cc362a2330c2f221f0836c7367179abe1691ea7d87e4c07d68280d7
MD5 5d2a721fe681c5e082b59d16ee78a202
BLAKE2b-256 118bec67696d5b1bdf26cb356878644f1528ef951a0e239d5beb6f3b0e59dcb9

See more details on using hashes here.

Supported by

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