Code Monkey home page Code Monkey logo

pyetesync's Introduction

EteSync - Secure Data Sync

This is a python client library for EteSync

GitHub tag PyPI Chat on freenode

This module provides a python API to interact with an EteSync server. It currently implements AddressBook and Calendar access, and supports two-way sync (both push and pull) to the server. It doesn't currently implement pushing raw journal entries which are needed for people implementing new EteSync journal types which will be implemented soon.

To install, please run:

pip install etesync

The module works and the API is tested (see tests/), however there still may be some oddities, so please report if you encounter any.

There is one Authenticator endpoint, and one endpoint for the rest of the API interactions.

The way it works is that you run "sync", which syncs local cache with server. Afterwards you can either access the journal directly, or if you prefer, you can access a collection, for example a Calendar, and interact with the entries themselves, which are already in sync with the journal.

Check out example.py for a basic usage example, or the tests for a more complete example.

While this is stable enough for usage, it still may be subject to change, so please watch out for the changelog when updating version. Docs are currently missing but are planned.

Running the example script

You'll need virtualenv to get the dependencies.

Either install your distro's package, for example python3-virtualenv

or get it from pip:

pip3 install virtualenv

You may also need to make sure you have the OpenSSL development package installed (e.g. openssl-dev).

Check out this repository:

git clone [email protected]:etesync/pyetesync.git
cd pyetesync

Setup the environment:

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Run example.py to export your data:

python3 example.py <email> <auth password> <encryption password> https://api.etesync.com

You may need to surround your passwords in quotes and you may need to escape special characters with a \. Please note, that depending on your setup, passing your passwords as command line parameters may not be completely secure, so it would be better if you manually edit the file.

And all of your data will be copied to a local database located at ~/.etesync/data.db.

Running the tests

Some to the tests are unit tests, but some are integration tests who need an actual EteSync service with a few user names set up in order for them to work.

You'd need to run your local server: https://github.com/etesync/server-skeleton/

And then add two users:

  • test@localhost
  • test2@localhost

Password for both: SomePassword

That's it.

pyetesync's People

Contributors

tasn avatar untitaker avatar agarrharr avatar jrvarma avatar

Watchers

James Cloos 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.