Skip to content

Commit 3527914

Browse files
committed
Documentation cleanup for release 1.0.37
1 parent 376b324 commit 3527914

27 files changed

+795
-833
lines changed

README.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,21 @@ The following are dependencies for:
4545
sudo apt-get install python-dev
4646
sudo apt-get install libssl-dev
4747

48-
Mac OS X
48+
OS X
4949
~~~~~~~~
5050

51-
We recommend building Lua from source. To download the source code and
52-
build the library, follow the instruction provided in the *Lua* section
53-
of the `Aerospike C Client Installation
54-
Guide <http://aerospike.com/docs/client/c/install/macosx.html#lua>`__
51+
By default OS X will be missing command line tools. On Mavericks (OS X 10.9)
52+
and higher those `can be installed without Xcode <http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/>`__.
53+
54+
::
55+
56+
xcode-select --install # install the command line tools, if missing
57+
58+
The dependencies can be installed through the OS X package manager `Homebrew <http://brew.sh/>`__.
59+
60+
::
61+
62+
brew install openssl
5563

5664
Install
5765
-------

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.36
1+
1.0.37

doc/aggregate.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# aggregate
33

4-
aggregate - applies a stream UDF to a secondary index query.
4+
aggregate - applies a stream UDF to the results of a secondary index query.
55

66
## Description
77

@@ -70,12 +70,7 @@ We expect to see:
7070
5
7171
```
7272

73-
74-
7573
### See Also
7674

77-
78-
79-
- [Glossary](http://www.aerospike.com/docs/guide/glossary.html)
80-
8175
- [Aerospike Data Model](http://www.aerospike.com/docs/architecture/data-model.html)
76+
- [Key-Value Store](http://www.aerospike.com/docs/guide/kvs.html)

doc/append.md

Lines changed: 25 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,53 @@
11

2-
# aerospike.Client.append
3-
4-
aerospike.Client.append - Appends a string to the string value in a bin
2+
# aerospike.client.append
53

64
## Description
75

86
```
9-
status = aerospike.Client.append ( key, bin, value [, policies ] )
10-
7+
aerospike.client.append(key, bin, val[, meta[, policy]])
118
```
129

13-
**aerospike.Client.append()** will append a string *value* to the string value
10+
**aerospike.client.append()** will append a string *value* to the string value
1411
in a *bin*.
1512

1613
## Parameters
1714

18-
**key**, the key for the record. A tuple with keys
19-
['ns','set','key'] or ['ns','set','digest'].
20-
21-
```
22-
Tuple:
23-
key = ( <namespace>,
24-
<set name>,
25-
<the primary index key>,
26-
<a RIPEMD-160 hash of the key, and always present> )
27-
28-
```
15+
**key** the tuple (namespace, set, key) representing the key associated with the record
2916

30-
**bin**, the name of the bin.
17+
**bin** the name of the bin.
3118

32-
**value**, the string to append to the string value in the bin.
19+
**val**, the string to append to the string value in the bin.
3320

34-
**policies**, the dictionary of policies to be given while append.
21+
**meta** optional record metadata to be set. A dictionary with fields
22+
- **ttl** the [time-to-live](http://www.aerospike.com/docs/client/c/usage/kvs/write.html#change-record-time-to-live-ttl) in seconds
3523

36-
## Return Values
37-
Returns an integer status. 0(Zero) is success value. In case of error, appropriate exceptions will be raised.
24+
**policy** optional write policies. A dictionary with optional fields
25+
- **timeout** write timeout in milliseconds
26+
- **key** one of the [aerospike.POLICY_KEY_*](http://www.aerospike.com/apidocs/c/db/d65/group__client__policies.html#gaa9c8a79b2ab9d3812876c3ec5d1d50ec) values
27+
- **gen** one of the [aerospike.POLICY_GEN_*](http://www.aerospike.com/apidocs/c/db/d65/group__client__policies.html#ga38c1a40903e463e5d0af0141e8c64061) values
28+
- **retry** one of the [aerospike.POLICY_RETRY_*](http://www.aerospike.com/apidocs/c/db/d65/group__client__policies.html#gaa9730980a8b0eda8ab936a48009a6718) values
29+
- **commit_level** one of the [aerospike.POLICY_COMMIT_LEVEL_*](http://www.aerospike.com/apidocs/c/db/d65/group__client__policies.html#ga17faf52aeb845998e14ba0f3745e8f23) values
30+
- **consistency_level** one of the [aerospike.POLICY_CONSISTENCY_LEVEL_*](http://www.aerospike.com/apidocs/c/db/d65/group__client__policies.html#ga34dbe8d01c941be845145af643f9b5ab) values
31+
- **replica** one of the [aerospike_POLICY_REPLICA_*](http://www.aerospike.com/apidocs/c/db/d65/group__client__policies.html#gabce1fb468ee9cbfe54b7ab834cec79ab) values
3832

3933
## Examples
4034

4135
```python
42-
4336
# -*- coding: utf-8 -*-
4437
import aerospike
45-
config = {
46-
'hosts': [('127.0.0.1', 3000)]
47-
}
38+
config = { 'hosts': [('127.0.0.1', 3000)] }
4839
client = aerospike.client(config).connect()
4940

50-
key = ('test', 'demo', 1)
51-
52-
options = {
53-
'timeout' : 5000
54-
}
55-
56-
status = client.append( key, bin, value, options)
57-
58-
print status
59-
60-
61-
```
62-
63-
We expect to see:
64-
65-
```python
66-
0
41+
try:
42+
key = ('test', 'demo', 1)
43+
client.append(key, 'name', ' jr.', policy={'timeout': 1200})
44+
except Exception as e:
45+
print("error: {0}".format(e), file=sys.stderr)
46+
sys.exit(1)
6747
```
6848

69-
70-
7149
### See Also
7250

73-
74-
75-
- [Glossary](http://www.aerospike.com/docs/guide/glossary.html)
76-
7751
- [Aerospike Data Model](http://www.aerospike.com/docs/architecture/data-model.html)
52+
- [Key-Value Store](http://www.aerospike.com/docs/guide/kvs.html)
53+

doc/close.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,26 @@
11

2-
# aerospike.Client.close
2+
# aerospike.client.close
33

4-
aerospike.Client.close - closes already opened connection to the database.
54

65
## Description
76

87
```
9-
aerospike.Client.close()
10-
8+
aerospike.client.close()
119
```
1210

13-
**aerospike.Client.close()** will close already opened connection to the Aerospike database.
11+
**aerospike.client.close()** will close already opened connection to the Aerospike database.
1412
Returns *None* on successful connection close.
1513

16-
17-
## Return Values
18-
Returns *None*
19-
2014
## Examples
2115

2216
```python
2317

2418
# -*- coding: utf-8 -*-
2519
import aerospike
26-
config = {
27-
'hosts': [('127.0.0.1', 3000)]
28-
}
29-
client = aerospike.client(config).close()
3020

21+
config = { 'hosts': [('127.0.0.1', 3000)] }
22+
client = aerospike.client(config).close()
3123
client.close()
3224

3325
```
3426

35-
### See Also
36-
37-
38-
39-
- [Glossary](http://www.aerospike.com/docs/guide/glossary.html)
40-
41-
- [Aerospike Data Model](http://www.aerospike.com/docs/architecture/data-model.html)

doc/connect.md

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,51 @@
11

2-
# aerospike.Client.connect
3-
4-
aerospike.Client.connect - establishes a connection to the Aerospike database instance.
2+
# aerospike.client.connect
53

64
## Description
75

86
```
9-
client = aerospike.Client(config).connect(<username>, <password>)
7+
client = aerospike.client(config).connect([username[, password]])
108
119
```
12-
**config**, is configuration parameter used while creating aerospike.Client's instance.
10+
**config** is a dictionary holding configuration info for the client
1311
```
14-
Dict:
15-
{
16-
'hosts': [
17-
('127.0.0.1', 3000)
18-
],
19-
'policies': {
20-
'timeout' : 0
21-
}
22-
}
23-
12+
Dict:
13+
'hosts': a list of (address, port) tuples identifying the cluster
14+
'policies': a dictionary of policies
15+
'timeout' : default timeout in milliseconds
16+
'key' : default key policy for this client
17+
'exists' : default exists policy for this client
18+
'gen' : default generation policy for this client
19+
'retry' : default retry policy for this client
20+
'consistency_level': default consistency level policy for this client
21+
'replica' : default replica policy for this client
22+
'commit_level' : default commit level policy for this client
2423
```
2524

26-
27-
**aerospike.Client.connect()** will open a new connection to the Aerospike database and returns
28-
aerospike.Client's object.
25+
**aerospike.client.connect()** will connect the client to the cluster described
26+
by the *hosts* configuration.
2927

3028
##Parameters
3129

32-
**username** and **password** are self explanatory. They are used for establishing connection with security enabled Aerospike database instance.
33-
Skip them while connecting to security disabled Aerospike database instance.
34-
35-
## Return Values
36-
Returns an instance of aeropspike.Client, which can be used later to do usual database operations.
30+
**username** and **password** are self explanatory. They are used for
31+
establishing connection to a security enabled Aerospike cluster
32+
(enterprise edition feature). Skip these when connecting to a community
33+
edition cluster.
3734

3835
## Examples
3936

4037
```python
41-
4238
# -*- coding: utf-8 -*-
4339
import aerospike
40+
4441
config = {
45-
'hosts': [('127.0.0.1', 3000)]
46-
}
42+
'hosts': [ ('127.0.0.1', 3000) ],
43+
'policies': { 'timeout': 1000}}
4744
client = aerospike.client(config).connect()
4845

4946
```
5047

5148
### See Also
5249

50+
- [Client Policies](http://www.aerospike.com/apidocs/c/db/d65/group__client__policies.html)
5351

54-
55-
- [Glossary](http://www.aerospike.com/docs/guide/glossary.html)
56-
57-
- [Aerospike Data Model](http://www.aerospike.com/docs/architecture/data-model.html)

doc/deserializer.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)