How to Insert MongoDB Documents Using Python

Introduction Appending a MongoDB collection of documents is a basic part of document database management. Sometimes you’ll just need to insert one document; other times, you’ll need to insert many. The Python pymongo driver can help you efficiently accomplish either task. Now is a great time to learn the way to insert MongoDB document Python … Continued

How to Use the Cluster API in the Elasticsearch Python Client Library

Introduction If you’ve been working with Elasticsearch, you may have issued a few cURL requests to communicate with the service and get information about your cluster. For example, a simple GET request using cURL will return data on an Elasticsearch cluster’s health: 12345# get Elasticsearch cluster health curl -XGET "http://localhost:9200/_cluster/health?pretty=true" # get Elasticsearch cluster stats … Continued

How To Map An Elasticsearch Index Using The Python Client

Introduction Python dictionaries can be used to create an Elasticsearch mapping schema, however, you must use Python Version 2 or 3 in order to be able to map Elasticsearch index with Python. You will also need to confirm the Elasticsearch cluster is up and running prior to beginning mapping an index with Elasticsearch. Make sure … Continued

Get An Elasticsearch Cluster’s Indices Using Python

Introduction If you’re attempting to integrate Elasticsearch with Python one of the first challenges you’ll encounter will be how to get a list of your Elasticsearch Clusters indices through Python. It’s a small task but is the foundation that leads to much more advanced interactions. In this tutorial we’ll detail exactly how to get a … Continued

How To Iterate The Results Of An Elasticsearch Search Query Using Python

Introduction If you’re planning to use Python to communicate with Elasticsearch, you’ll find that it’s easy to create a search query and get your results returned. However, it’s important to remember that you’ll have to loop through your set of results in order to access each individual document and its fields. Fortunately, accomplishing that task … Continued

How To Get An Elasticsearch Cluster’s Information In Python

Introduction If you’re running an Elasticsearch cluster, you’ll occasionally need to get information about the cluster. The Elasticsearch client for Python makes this task quick and simple– all it takes is a few lines of code in Python to connect to Elasticsearch and retrieve the information you need. In this step-by-step tutorial, we’ll explain how … Continued

Make Curl Requests To Elasticsearch Using Python

Introduction If you’re using Elasticsearch to store data, you know that making cURL requests is a common way to communicate with your Elasticsearch cluster. Python’s requests library can be used to make cURL requests to an Elasticsearch cluster, making it easy to communicate with Elasticsearch from a Python script. In this step-by-step tutorial, we’ll explain … Continued

How to connect Python to MongoDB

Introduction If you’re working with data stored in MongoDB, you’ll probably need to access the database from Python. Luckily the MongoDB client library makes this task a simple one, allowing you to connect to MongoDB with just a few lines of code. In this step-by-step tutorial, we’ll explain how to connect Python to MongoDB using … Continued

How to Index Elasticsearch Documents Using the Python Client Library

Introduction This article will provide an overview on how to index Elasticsearch documents using python. It will also provide examples on how to create a nested JSON document and use Kibana to verify the document when indexing Elasticsearch documents using python. NOTE: To prevent namespace conflicts with the built-in Python keywords, the Elasticsearch client make … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.