Updated docs
[diaspy.git] / README.md
CommitLineData
74edacee 1## Unofficial Python interface for Diaspora\* social network
9cd5e2bd
MM
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 17
74edacee
MM
18----
19
20### Dependencies
21
22List of software `diaspy` requires to run.
23Versions used by maintainer are the ones available in stock Arch x86\_64 repositories.
24
25**`python`**
26
27Version: 3.3.3
28[Website](https://www.python.org/)
29
30
31**`python-requests`**
32
33Version: 2.1.0
34[Website](http://docs.python-requests.org/en/latest/)
35
36
f2eaa3c7
MM
37----
38
39#### Quick intro
40
41#### 1. Posting text to your stream
42
43You only need two objects to do this: `Stream()` and `Connection()`.
44
45 >>> import diaspy
46 >>> c = diaspy.connection.Connection(pod='https://pod.example.com',
47 ... username='foo',
48 ... password='bar')
49 >>> c.login()
5c03fee4 50 >>> stream = diaspy.streams.Stream(c)
f2eaa3c7
MM
51 >>> stream.post('Your first post')
52
74edacee 53----
f2eaa3c7 54
9cd5e2bd
MM
55#### 2. Reference implementation
56
57There is no official reference implementation of D\* client using `diaspy`.
58The `diaspy.client` module is no longer maintained and will be removed in the future.
f2eaa3c7 59
9cd5e2bd
MM
60However, there is a small script written that uses `diaspy` as its backend.
61Look for `diacli` in marekjm's repositories on GitHub.
f2eaa3c7
MM
62
63----
64
65To get more information about how the code works read
66documentation (`./doc/` directory) and manual (`./manual/` directory).