Skip to main content

A library to interact with the cjdns Admin Interface

Project description

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.

Note: 0.2.3.1 is just 0.2.3 but signed.

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](https://github.com/cjdelisle/cjdns/blob/master/admin/README.md#cjdns-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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cjdns-0.2.3.1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

cjdns-0.2.3.1-py2.py3-none-any.whl (13.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cjdns-0.2.3.1.tar.gz.

File metadata

  • Download URL: cjdns-0.2.3.1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cjdns-0.2.3.1.tar.gz
Algorithm Hash digest
SHA256 67dcfb130859608e53ceca47d2217102766ad89a84b21158ac25619b206159a8
MD5 d9293571f16a1b2449b2bfe1ca3baa65
BLAKE2b-256 119b12005fb73ac526f2aa313fa52a52812bf58a2667b1598d15b81bf3c99839

See more details on using hashes here.

File details

Details for the file cjdns-0.2.3.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cjdns-0.2.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1d1d1c26d95ab3f9d13f53127cc704f9c4a37e5b2118693a466f626312db6f79
MD5 1c5ef66358b0d7ce76590dde22d6481e
BLAKE2b-256 40b3216ef7b4c71d3c0705525a88f886b5ab460b8d00537690f7beaa7df5b52f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page