Git now ignores private.* files
[diaspy.git] / README.md
CommitLineData
9cd5e2bd
MM
1#### Unofficial Python interface for Diaspora\* social network
2
3`diaspy` is a set of modules which form an Python interface to the API of
4Disapora\* social network.
f2eaa3c7 5
c8b0cc01
MM
6Test suite will cause problems when run with 2.x so testing should be done
7using python3 interpreter.
f2eaa3c7
MM
8
9Object oriented design of `diaspy` makes it easily reusable by other
9cd5e2bd
MM
10developers who want to use only part of the interface and create derivative
11works from it.
12
13Developrs who don't like the design of `diaspy` and want to create something better
14can use only `diaspy.connection.Connection()` object as it is capable of
15doing everything. Other modules are just layers that provide easier access to
16parts of the Diaspora\* API.
f2eaa3c7
MM
17
18----
19
20#### Quick intro
21
22#### 1. Posting text to your stream
23
24You only need two objects to do this: `Stream()` and `Connection()`.
25
26 >>> import diaspy
27 >>> c = diaspy.connection.Connection(pod='https://pod.example.com',
28 ... username='foo',
29 ... password='bar')
30 >>> c.login()
5c03fee4 31 >>> stream = diaspy.streams.Stream(c)
f2eaa3c7
MM
32 >>> stream.post('Your first post')
33
34
9cd5e2bd
MM
35#### 2. Reference implementation
36
37There is no official reference implementation of D\* client using `diaspy`.
38The `diaspy.client` module is no longer maintained and will be removed in the future.
f2eaa3c7 39
9cd5e2bd
MM
40However, there is a small script written that uses `diaspy` as its backend.
41Look for `diacli` in marekjm's repositories on GitHub.
f2eaa3c7
MM
42
43----
44
45To get more information about how the code works read
46documentation (`./doc/` directory) and manual (`./manual/` directory).