Skip to main content

cjdnsadmin For Python 3

Build 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 cjdnsadmin

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 cjdnsadmin library available for import.

Usage

Usage is simple. First, import:

import cjdnsadmin

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

cjdns = cjdnsadmin.connectWithAdminInfo()

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

cjdns = cjdnsadmin.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:

cjdnsadmin.PublicToIp6('1rfp3guz4jjhfu4dsu5mrz68f7fyp502wcttq6b78xdrjhd4ru80.k')

License

Same as cjdns, this is a GPLv3 project. Full text of the license is available here

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 cjdnsadmin 0.1.6

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

Source distribution (sdist)

Source distribution for cjdnsadmin 0.1.6
File Size Uploaded
cjdnsadmin-0.1.6.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cjdnsadmin 0.1.6
File Interpreter ABI Platform
cjdnsadmin-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / cjdnsadmin-0.1.6.tar.gz

Download URL cjdnsadmin-0.1.6.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
20079a84acc4bee8ee8f6568e41e1b94f6a2ed39a98e02e3cab91f1c3eaf58ad
BLAKE2b-256 checksum
How to use checksums
2a2f1aed369bb8ada1cee758c4b6d4484673714184e4b4493d90ada8f215bfd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / cjdnsadmin-0.1.6-py3-none-any.whl

Download URL cjdnsadmin-0.1.6-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ed397b1254b41c6839d3a91603beb8ba73ea801cf8d9c622b675a7d7f5a8b6f
BLAKE2b-256 checksum
How to use checksums
b50456434e26789a747cb96e31f010066e0c32b1414199ab87071f971dd54730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

3 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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