Git Product home page Git Product logo

pyetherpadlite's Introduction

API version

The supported API version is 1.2.15

This python api enables easy interaction with the Etherpad API. Etherpad is a collaborative editor provided by the Etherpad Foundation. http://etherpad.org

1 Installation

pip install pyetherpadlite

2 Preparation

If you are using a self hosted Etherpad server, you will need to specify an API Key after installation before using the API. (See https://github.com/ether/etherpad-lite for installation details).

Your secret api key should be placed in the base installation (etherpad-client folder) in a text file named APIKEY.txt. Many linux text editors automatically create an extra newline character at the end of the file, so I recommend simply executing the following command to set your api key without a newline character:

echo -n "myapikey" > APIKEY.txt

Once you have created the APIKEY.txt file, you will need to edit the py_etherpad.py wrapper to set your API key. Edit the 'apiKey' variable and set it to the same key as defined in your APIKEY.txt file.

3 Basic usage

from py_etherpad import EtherpadLiteClient
myPad = EtherpadLiteClient('EtherpadFTW','http://beta.etherpad.org/api')
# Change the text of the etherpad
myPad.setText('testPad','New text from the python wrapper!')

4 More details

See the src/py_etherpad/__init__.py file for further details on the methods and parameters available for the API. Nearly all calls from the official API work as in the official documentation described. (expect sendText, appendText and setHTML for Text > 8KB)

5 Test coverage

Actually im writing the tests for each topic.

Already finished:

  • Groups
  • Pads

Nearly finished:

  • Author

6 License

Apache License

7 Credit

This python API-Wrapper is a Fork from devjones and is inspired by TomNomNom's php client

pyetherpadlite's People

Contributors

alfem avatar alienmaster avatar bryant1410 avatar devjones avatar emirotin avatar jhollinger avatar ozkatz avatar rassie avatar sagesharp avatar timtebeek avatar

Stargazers

 avatar

Watchers

 avatar  avatar

pyetherpadlite's Issues

getChatHistory() doesn't work [wrong function call]

Hi I noticed a bug your init.py file:

    def getChatHistory(self, padID, start = None, end = None):
        """returns a part of the chat history, when start and end are given or the whole chat histroy, when no extra parameters are given"""
        params = {"padID": padID}
        if start is not None and end is not None:
            params['start'] = start
            params['end'] = end        
        return self.call("getRevisionChangeset", params)

The last line should contain getChatHostory instead of getRevisionChangeset.

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.