Skip to content

Commit cac0a57

Browse files
committed
Adding analyzer documentation
1 parent b63709f commit cac0a57

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

docs/analyzer.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Analyzers
2+
---------
3+
4+
For more information on analyzers, refer to `ArangoDB Manual`_.
5+
6+
.. _ArangoDB Manual: https://docs.arangodb.com
7+
8+
**Example:**
9+
10+
.. code-block:: python
11+
12+
from arangoasync import ArangoClient
13+
from arangoasync.auth import Auth
14+
15+
# Initialize the client for ArangoDB.
16+
async with ArangoClient(hosts="http://localhost:8529") as client:
17+
auth = Auth(username="root", password="passwd")
18+
19+
# Connect to "test" database as root user.
20+
db = await client.db("test", auth=auth)
21+
22+
# Create an analyzer.
23+
await db.create_analyzer(
24+
name='test_analyzer',
25+
analyzer_type='identity',
26+
properties={},
27+
features=[]
28+
)
29+
30+
# Retrieve the created analyzer.
31+
analyzer = await db.analyzer('test_analyzer')
32+
33+
# Retrieve list of analyzers.
34+
await db.analyzers()
35+
36+
# Delete an analyzer.
37+
await db.delete_analyzer('test_analyzer', ignore_missing=True)
38+
39+
Refer to :class:`arangoasync.database.StandardDatabase` class for API specification.

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Contents
4545

4646
transaction
4747
view
48+
analyzer
4849

4950
**API Executions**
5051

0 commit comments

Comments
 (0)