1
0
favro-sync/favro_sync/__main__.py
Jon Michael Aanes d4cfe4da22
Some checks failed
Test Python / Test (push) Failing after 26s
CardFileFormatter: Tags and assignments WIP
2024-09-28 12:37:19 +02:00

34 lines
786 B
Python

import tempfile
import logging
import requests_cache
from .favro_client import FavroClient, OrganizationId
from .favro_fuse import start_favro_fuse
import secrets
def main():
logging.basicConfig()
read_only = False
with tempfile.TemporaryDirectory(prefix='favro_sync_') as tmpdirname:
session = requests_cache.CachedSession( tmpdirname + '/http-cache.sqlite', expire_after=10,)
client = FavroClient(
favro_org_id=OrganizationId(secrets.favro_org_id()),
favro_username=secrets.favro_username(),
favro_password=secrets.favro_password(),
session=session,
read_only=read_only,
)
client.check_logged_in()
start_favro_fuse(client)
if __name__ == '__main__':
main()