Skip to content

Commit d5f1f27

Browse files
committed
Group Python scripting
Let's group these pages and we'll update them later! Signed-off-by: Igor Zubiaurre García <[email protected]>
1 parent 74f195e commit d5f1f27

21 files changed

Lines changed: 79 additions & 4 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
layout: default
3+
title: ElasticSearch DSL
4+
nav_order: 2
5+
parent: Python scripting
6+
has_children: false
7+
has_toc: false
8+
---
9+
10+
111
## ElasticSearch DSL
212

313
The `elasticsearch` Python module may seem good enough to query ElasticSearch via its REST API. But for using it, we need to write full JSON documents with the intended queries. And these documents may become large, complex, and a burden to maintain and understand. Here is where the [`elasticsearch_dsl` Python module](http://elasticsearch-dsl.readthedocs.io) comes to the rescue.

python/es.md renamed to docs/python/es.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
layout: default
3+
title: Persistent storage in ElasticSearch
4+
nav_order: 3
5+
parent: Python scripting
6+
has_children: false
7+
has_toc: false
8+
---
9+
10+
111
# Persistent storage in ElasticSearch
212

313
The data produced by Perceval can be stored in persistent storage. For example, it can be uploaded to (and later retrieved from) a database. In this section we'll learn to do it with ElasticSearch.

docs/python/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: default
3+
title: Python scripting
4+
permalink: /python
5+
nav_order: 11
6+
has_children: true
7+
has_toc: true
8+
---
9+
10+
# Python scripting
11+
12+
This describes the usage of Python scripts for data access and
13+
manipulation.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
layout: default
3+
title: Querying grimoire-elk indexes
4+
nav_order: 6
5+
parent: Python scripting
6+
has_children: false
7+
has_toc: false
8+
---
9+
10+
111
## Querying grimoire-elk indexes
212

313
As we discussed in section
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
layout: default
3+
title: Pandas for GrimoireLab indexes
4+
nav_order: 7
5+
parent: Python scripting
6+
has_children: false
7+
has_toc: false
8+
---
9+
10+
111
## Pandas for GrimoireLab indexes
212

313
[Pandas](http://pandas.pydata.org/) is one of the most common libraries used in data analytics with Python. It can be very useful when dealing with GrimoireLab indexes. In this section, we will explore how to create dataframes (one of the most interesting data structures provided by Pandas) from GrimoireLab indexes, and how to work with them.
@@ -162,4 +172,4 @@ The `to_csv` method of dataframes just dump them in a file, using the CSV conven
162172
2015-12-31 19:16:25,Jesus M. Gonzalez-Barahona
163173
2015-09-30 18:15:16,Alvaro del Castillo
164174
2015-08-18 18:08:27,Santiago Dueñas
165-
```
175+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
layout: default
3+
title: Querying ElasticSearch
4+
nav_order: 5
5+
parent: Python scripting
6+
has_children: false
7+
has_toc: false
8+
---
9+
10+
111
# Querying ElasticSearch
212

313
In the previous section we learned how to store Perceval data in ElasticSearch. Let's learn now how to query it. For this, we're going to use data from mailing lists. First, let's upload some messages to a fresh ElasticSearch index using the Perceval mbox backend \(script [perceval\_elasticsearch\_mbox\_1.py](scripts/perceval_elasticsearch_mbox_1.py)):

docs/python/scripting.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: default
3+
title: Python scripting
4+
nav_order: 1
5+
parent: Python scripting
6+
has_children: false
7+
has_toc: false
8+
---
9+
10+
# Python scripting
11+
GrimoireLab is written in Python, and provides many Python modules that
12+
can be used from your scripts. We already saw how Perceval can be used
13+
from Python scripts. Now let's explore how we can walk that way into
14+
more detail.
15+
File renamed without changes.

0 commit comments

Comments
 (0)