Commit | Line | Data |
---|---|---|
f2eaa3c7 MM |
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 3.x and is not Python 2.x compatible. | |
5 | ||
6 | Object oriented design of `diaspy` makes it easily reusable by other | |
7 | developers who want to use only part of the API. | |
8 | ||
9 | ---- | |
10 | ||
11 | #### Quick intro | |
12 | ||
13 | #### 1. Posting text to your stream | |
14 | ||
15 | You only need two objects to do this: `Stream()` and `Connection()`. | |
16 | ||
17 | >>> import diaspy | |
18 | >>> c = diaspy.connection.Connection(pod='https://pod.example.com', | |
19 | ... username='foo', | |
20 | ... password='bar') | |
21 | >>> c.login() | |
22 | >>> stream = diaspy.models.Stream(c) | |
23 | >>> stream.post('Your first post') | |
24 | ||
25 | ||
26 | #### 2. More features | |
27 | ||
28 | There is a special `client` module in diaspy which is an example client | |
29 | of D\* written using the `diapsy` API. It provides many features useful for | |
30 | interactions with social network like messages, mentions, likes etc. | |
31 | It is full of good, useful stuff. | |
32 | ||
33 | ---- | |
34 | ||
35 | To get more information about how the code works read | |
36 | documentation (`./doc/` directory) and manual (`./manual/` directory). |