Skip to main content

MongoDB to Elasticsearch. Through this you can import data from mongoDB to elasticsearch.

Project description

mongoDB to elasticsearch

PyPI

mongoelastic stands for MongoDB to Elasticsearch. Through this you can import data from mongoDB to elasticsearch.


Installation

Install mongoelastic from PyPI:

pip install mongoelastic

Usage

  • Here is the sample code
from mongoelastic.mongoelastic import MongoElastic
from elasticsearch import Elasticsearch


es_connection_object = Elasticsearch(['localhost'],use_ssl=False)

config = {
    'mongo_host': 'YOUR_MONGO_HOST',
    'mongo_port': YOUR_MONGO_PORT,
    'mongo_db_name': 'YOUR_MONGO_DB_NAME',
    'mongo_document_name': 'YOUR_MONGO_DOCUMENT_NAME',
    'es_connection': es_connection_object
    'es_index_name':'TEST_INDEX'
    'es_doc_type':'test_doc_type'
}
obb = MongoElastic(config)
obb.start()


# You can also filter query MongoDB like:
m_filter = {'mongo_condition':{"_id" : "5d9740bc245fb21097e82c11"}}
obb.start(m_filter)  

License

Licence

If you like the project, support by star

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

mongoelastic-0.0.9.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

mongoelastic-0.0.9-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file mongoelastic-0.0.9.tar.gz.

File metadata

  • Download URL: mongoelastic-0.0.9.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.5

File hashes

Hashes for mongoelastic-0.0.9.tar.gz
Algorithm Hash digest
SHA256 c88e0c41629edfd73686d60e4054fa9149949debb7ef263f269cc38d834ce562
MD5 b36aeb1061654d1de5ff816e59af03ba
BLAKE2b-256 0aad6caefa7ce19504ea3ab66c03113eb51e154ed4352c0ee1964e4bd8200c87

See more details on using hashes here.

File details

Details for the file mongoelastic-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: mongoelastic-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.5

File hashes

Hashes for mongoelastic-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b0379ed81af619530bd969a1f8b9adaf7c2a412790f431ebb6e27910bf90af21
MD5 8672ac4e89677c1b2481c7cd35e584ef
BLAKE2b-256 7d51da3b6f952bb504038572d7fc5821b9f75c6322eadaa852664e77c02bc3b5

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