Merge branch 'master' into search
[diaspy.git] / README.md
1 #### Python API for Diaspora (unofficial)
2
3 `diaspy` is a set of modules which form API for D\* social network.
4 The API is written in Python and should be both 3.x and 2.x compatible.
5 Test suite will cause problems when run with 2.x so testing should be done
6 using python3 interpreter.
7
8 Object oriented design of `diaspy` makes it easily reusable by other
9 developers who want to use only part of the API.
10
11 ----
12
13 #### Quick intro
14
15 #### 1. Posting text to your stream
16
17 You only need two objects to do this: `Stream()` and `Connection()`.
18
19 >>> import diaspy
20 >>> c = diaspy.connection.Connection(pod='https://pod.example.com',
21 ... username='foo',
22 ... password='bar')
23 >>> c.login()
24 >>> stream = diaspy.models.Stream(c)
25 >>> stream.post('Your first post')
26
27
28 #### 2. More features
29
30 There is a special `client` module in diaspy which is an example client
31 of D\* written using the `diapsy` API. It provides many features useful for
32 interactions with social network like messages, mentions, likes etc.
33 It is full of good, useful stuff.
34
35 ----
36
37 To get more information about how the code works read
38 documentation (`./doc/` directory) and manual (`./manual/` directory).