Giter Site home page Giter Site logo

lucas-developer / python-cjdns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hyperboria/python-cjdns

0.0 2.0 0.0 78 KB

A python cjdns admin library, with Python 2 and Python 3 support

Home Page: https://pypi.python.org/pypi/cjdnsadmin

License: GNU General Public License v3.0

Python 96.30% Shell 3.70%

python-cjdns's Introduction

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.3, 3.4, 3.5. There are some basic tests in place for these things via Travis, but they're not complete by any means.

python-cjdns's People

Contributors

kyrias avatar thefinn93 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.