1
0
favro-sync/favro_sync/__main__.py
Jon Michael Aanes 5b1502cdea
Some checks failed
Test Python / Test (push) Failing after 25s
Read-only support for tags and assignments
2024-09-28 12:54:34 +02:00

36 lines
825 B
Python

import logging
import tempfile
import requests_cache
from . import secrets
from .favro_client import FavroClient, OrganizationId
from .favro_fuse import start_favro_fuse
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()