Skip to main content

python-cjdns For Python 2 & 3

Bulid Status Code Health PyPI

The cjdns python library doesn’t support python3 and is a PITA to install, due to it’s use of a modified bencode library which is still called “bencode”, among other things, so I’m cleaning it up.

Installation

The easiest way to install it is:

pip install cjdns

But you could also clone it and run:

python setup.py install

Once it’s installed, you’ll find peerStats and cexec installed in your $PATH, and the cjdns library available for import.

Usage

Usage is simple. First, import:

import cjdns

Then, connect to the running cjdns instance. There are two ways to do this. The normal way is to use the ~/.cjdnsadmin file:

cjdns = cjdns.connectWithAdminInfo()

Or, if you have the IP, port and password and wish to ignore the ~/.cjdnsadmin file for whatever reason:

cjdns = cjdns.connect(ip, port, password)

Once connected, you may call any of the cjdns admin interface functions:

peerStats = cjdns.InterfaceController_peerStats()

Finally, there is a helper function that allows one to convert a cjdns public key into an IP address:

from cjdns import key_utils
key_utils.to_ipv6('1rfp3guz4jjhfu4dsu5mrz68f7fyp502wcttq6b78xdrjhd4ru80.k')

License

Same as cjdns, this is a GPLv3 project. Full text of the license is available [here](LICENSE)

Contributing

I welcome pull requests, please make sure that everything you contribute is pep8 compliant and works on python 2.6, 2.7, 3.2, 3.3 and 3.4. There are some basic tests in place for these things via Travis, but they’re not complete by any means.

Metadata

Release files for cjdns 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cjdns 0.2.4
File Size Uploaded
cjdns-0.2.4.tar.gz 8.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for cjdns 0.2.4
File Interpreter ABI Platform
cjdns-0.2.4-py3-none-any.whl Python 3 none any Details
cjdns-0.2.4-py2-none-any.whl Python 2 none any Details

Total release size: 36.4 kB

Release files / cjdns-0.2.4.tar.gz

Download URL cjdns-0.2.4.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
452044df245ed7e8a582a573b1571e202e07b9d9e2b79e9e790f85c7f55fe5b8
BLAKE2b-256 checksum
How to use checksums
2a130fac721576aeadfdf7acc4985a85bb624ab4a39500a121a816cae1052eed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cjdns-0.2.4-py3-none-any.whl

Download URL cjdns-0.2.4-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b92378221c21589f1a13fd85861f539e4872f8d7b373887bea9de45325da5aea
BLAKE2b-256 checksum
How to use checksums
fad2298050a476f69a4bdd88c323d15bdedb1eaf657a2d24a04aa174286513dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cjdns-0.2.4-py2-none-any.whl

Download URL cjdns-0.2.4-py2-none-any.whl
Size 14.0 kB
Tags Python 2
SHA-256 checksum
How to use checksums
1503d9787a9c06bda133230ed20f8128b236e1d73450d9f0d9b584aa54204c75
BLAKE2b-256 checksum
How to use checksums
765a31d82c73404258faa12e15d220d6856e4d5349c2359249620c9ac31acd59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.4 This release

3 release files

0.2.3

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page