Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit bfeaca6

Browse files
committed
Switched README over to rst for PyPI
1 parent 9b054b4 commit bfeaca6

File tree

3 files changed

+132
-3
lines changed

3 files changed

+132
-3
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ clean:
77

88
docs:
99
$(MAKE) -C docs html
10+
pandoc README.md --from markdown --to rst -s -o README.rst

README.rst

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
PYTHorrent
2+
==========
3+
4+
This is a BitTorrent client written entirely in Python so that it can be
5+
easily used for experiments. It is a fully working BitTorrent client so
6+
you can use it below as an example. There is no intelligence in this
7+
such as getting rarest peice first. Everything is random.
8+
9+
It doesn't use ``thread`` or ``multiprocessing`` as it's designed to be
10+
used for experiments, and I don't know how someone may want to use it,
11+
while also making it impractical for general use, but I'd like to
12+
eventually support the most common schemes such as DHT, Magnet URLs, PHE
13+
tDP, and UPnP so it is possible to accept incoming connections.
14+
15+
Installation
16+
------------
17+
18+
PIP
19+
~~~
20+
21+
::
22+
23+
pip install pythorrent
24+
25+
From Source
26+
~~~~~~~~~~~
27+
28+
::
29+
30+
pip install -r requirements.txt
31+
python setup.py install
32+
33+
Usage
34+
-----
35+
36+
Depending on how you installed PYTHorrent you may need to go to the root
37+
of the source of the PYTHorrent directory.
38+
39+
::
40+
41+
cd python-pythorrent
42+
43+
Getting commands
44+
~~~~~~~~~~~~~~~~
45+
46+
::
47+
48+
python -m pythorrent -h
49+
50+
Downloading a Torrent using a torrent file
51+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52+
53+
::
54+
55+
python -m pythorrent --file ubuntu-16.04-desktop-amd64.iso.torrent --path . --log=info
56+
57+
Overview
58+
--------
59+
60+
Documentation for the BitTorrent protocol is poor but these sources have
61+
been immensely helpful: -
62+
http://jonas.nitro.dk/bittorrent/bittorrent-rfc.html -
63+
https://wiki.theory.org/BitTorrentSpecification -
64+
http://www.kristenwidman.com/blog/33/how-to-write-a-bittorrent-client-part-1/
65+
-
66+
http://www.kristenwidman.com/blog/71/how-to-write-a-bittorrent-client-part-2/
67+
68+
License
69+
-------
70+
71+
AGPLv3
72+
~~~~~~
73+
74+
::
75+
76+
This program is free software: you can redistribute it and/or modify
77+
it under the terms of the GNU General Public License as published by
78+
the Free Software Foundation, either version 3 of the License, or
79+
(at your option) any later version.
80+
81+
This program is distributed in the hope that it will be useful,
82+
but WITHOUT ANY WARRANTY; without even the implied warranty of
83+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84+
GNU General Public License for more details.
85+
86+
You should have received a copy of the GNU General Public License
87+
along with this program. If not, see <http://www.gnu.org/licenses/>.
88+
89+
To Do
90+
-----
91+
92+
Tidy up documentation
93+
~~~~~~~~~~~~~~~~~~~~~
94+
95+
Memory efficiency
96+
~~~~~~~~~~~~~~~~~
97+
98+
- Only load piece data in to memory when it is needed.
99+
100+
Magnet URL Scheme
101+
~~~~~~~~~~~~~~~~~
102+
103+
- https://en.wikipedia.org/wiki/Magnet\_URI\_scheme
104+
105+
DHT
106+
~~~
107+
108+
Options? - https://github.com/drxzcl/lightdht/ - I like this one best -
109+
Seems to lock out when finding peers - https://github.com/gsko/mdht
110+
111+
Encryption? PHE
112+
~~~~~~~~~~~~~~~
113+
114+
- https://wiki.vuze.com/w/Message\_Stream\_Encryption
115+
116+
UPnP
117+
~~~~
118+
119+
- https://code.google.com/archive/p/miranda-upnp/
120+
- Entirely Python code
121+
- http://www.gniibe.org/memo/system/dynamic-ip/upnp.html
122+
- Has dependency on GNUPnP
123+
- https://github.com/miniupnp/miniupnp
124+
125+
\*\* **Always download legal torrents** \*\*

setup.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ def read(fname):
55
return open(path.join(path.dirname(__file__), fname)).read()
66

77
setup(
8-
name='pythorrent',
9-
version='0.1a',
10-
description=read("README.md"),
8+
name='PYTHorrent',
9+
version='0.1',
10+
license="AGPLv3",
11+
description="A BitTorrent client written entirely in Python so "\
12+
"that you can get to the depths of the protocol",
13+
long_description=read("README.rdf"),
1114
author='Matt Copperwaite',
1215
author_email='[email protected]',
1316
url='https://github.com/yamatt/python-pthorrent',

0 commit comments

Comments
 (0)