Skip to main content

FS2Elastic

Python based CLI for Syncing File System based Data (CSV file etc.) to Elasticsearch.

alt text

Features

  • Real time csv file to Elasticsearch dataset syncing
  • Configurable with custom config file

Installation

pip install fs2elastic

Configuration

configuration file present at ~/.fs2elastic/fs2elastic.conf.

  • please create configuration file if not present.
  • replace values with correct values
  • remove configs that does not require

default configuration:

[AppConfig]
app_home = "/home/john/.fs2elastic"
app_config_file_path = "/home/john/.fs2elastic/fs2elastic.conf"

[DatasetConfig]
dataset_source_dir = "/home/john/csv_data_set"
dataset_supported_file_extensions = [ "csv", "xlsx", "xls", "json"]
dataset_max_workers = 1
dataset_threads_per_worker = 10
dataset_chunk_size = 200

[ESConfig]
es_hosts = [ "https://localhost:9200",]
es_username = "elastic"
es_password = ""
es_timeout = 300
es_index_prefix = "fs2es-"
es_ssl_ca = ""
es_verify_certs = false

[LogConfig]
log_file_path = "/home/john/.fs2elastic/fs2elastic.log"
log_max_size = 10485760
log_backup_count = 5

Usage

with Default config file

fs2elastic

with Custom config file

fs2elastic -c <config file path>
eg: fs2elastic -c ~/Documents/fs2elastic_custom_config.conf
Help
fs2elastic -h
Version
fs2elastic -v

Use as a system service

NOTE: Required sudo permission

# install Package
sudo pip install fs2elastic
# Create fs2elastic home directory somewhere. for eg /tmp/fs2elastic/
mkdir /tmp/fs2elastic/
# create config file at /tmp/fs2elastic/fs2elastic.conf inside fs2elastic home directory created above
[AppConfig]
app_home = "/home/john/.fs2elastic"
app_config_file_path = "/home/john/.fs2elastic/fs2elastic.conf"

[DatasetConfig]
dataset_source_dir = "/home/john/csv_data_set"
dataset_supported_file_extensions = [ "csv", "xlsx", "xls", "json"]
dataset_max_workers = 1
dataset_threads_per_worker = 10
dataset_chunk_size = 200

[ESConfig]
es_hosts = [ "https://localhost:9200",]
es_username = "elastic"
es_password = ""
es_timeout = 300
es_index_prefix = "fs2es-"
es_ssl_ca = ""
es_verify_certs = false

[LogConfig]
log_file_path = "/home/john/.fs2elastic/fs2elastic.log"
log_max_size = 10485760
log_backup_count = 5

# replace with correct values
# create service file at /etc/systemd/system/fs2elastic.service  with following content

[Unit]
Description=FS2Elastic Service
After=network.target

[Service]
User=root
Group=root
ExecStart=/usr/bin/fs2elastic -c /tmp/fs2elastic/fs2elastic.conf
Restart=always

[Install]
WantedBy=multi-user.target
# Reloading Change to Systemd Unit Files
sudo systemctl daemon-reload
# Start service
sudo systemctl start fs2elastic
# Enable service to start on boot
sudo systemctl enable fs2elastic
# check status
sudo systemctl status fs2elastic
# check logs
sudo tail -f /var/log/fs2elastic.log
# To stop service
sudo systemctl stop fs2elastic
# To remove service
sudo systemctl disable fs2elastic
sudo rm /etc/systemd/system/fs2elastic.service

Uninstall

pip uninstall fs2elastic

Who do I talk to?

  • Repo owner or admin
  • Other community or team contact

Metadata

Release files for fs2elastic 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fs2elastic 0.1.2
File Size Uploaded Provenance Actions
fs2elastic-0.1.2.tar.gz 14.5 kB Without provenance Details for fs2elastic-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fs2elastic 0.1.2
File Interpreter ABI Platform Actions
fs2elastic-0.1.2-py3-none-any.whl Python 3 none any Details for fs2elastic-0.1.2-py3-none-any.whl

Total release size: 29.8 kB

Release files / fs2elastic-0.1.2.tar.gz

Download URL fs2elastic-0.1.2.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
edfb815bc69728c0de4bd5702478804b49e253711a6f8e90df176c7eb77b8aa9
BLAKE2b-256 checksum
How to use checksums
42630795f57e27f45f704b5add755baaa7151d04bffa67dfbe0e173de44d21ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / fs2elastic-0.1.2-py3-none-any.whl

Download URL fs2elastic-0.1.2-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0967f66d95fd7cf57f6fd5fcae045cf0fb78c92ee80afc9e14cb234426182979
BLAKE2b-256 checksum
How to use checksums
51b3bc25399e7b1f124ef722d98ce69b351c7e4692f27397eb628ded4a339c63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Security for fs2elastic 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page