Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from leap.soledad import Soledad
import logging
level = logging.DEBUG
logger = logging.getLogger(name='leap')
logger.setLevel(level)
console = logging.StreamHandler()
console.setLevel(level)
formatter = logging.Formatter(
'%(asctime)s '
'- %(name)s - %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHandler(console)
logger.info('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
logger.info('LEAP soledad test')
logger.info('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
logger.info('Starting app')
# setup soledad
sol = Soledad('f2d7671c632912bc555207c7c85d4acd', 'mypass',
"/home/chiiph/.config/leap/f2d7671c632912bc555207c7c85d4acd.secret",
"/home/chiiph/.config/leap/f2d7671c632912bc555207c7c85d4acd.db",
'https://localhost:2424/user-f2d7671c632912bc555207c7c85d4acd',
"/home/chiiph/Code/leap/soledad/server.pem",
'EbGh_p3fOPGRtdmpaUQ97SxZQsErfyRdwByFZFtgd60')
# create a doc
doc = sol.create_doc({'my':'doc'})
# sync with server
sol.sync()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment