Usage

The library attempts to provide a stable API to the telescope.org site.
from ouscope.core import Telescope
import configparser
from os.path import expanduser

config = configparser.ConfigParser()
config.read(expanduser('~/.config/telescope.ini'))

scope=Telescope(config['telescope.org']['user'], 
              config['telescope.org']['password'])

print("User folders:")
for f in scope.get_user_folders():
    cnt = f["count"] 
    if cnt is None:
        cnt = 0
    print(f'{f["name"]:>12} ({f["id"]:>3}): {cnt:>4} items')

reqlst=scope.get_user_requests(sort='rid')

print(f'User {scope.user} has {len(reqlst)} requests.')
print("The most recent completed requests:")

n = 10
for rq in reqlst:
    if rq["status"]=='8':
        print(f'{rq["id"]}: {rq["objectname"]:15} jid: {scope.get_jid_for_req(rq)}')
        n -= 1
    if n<0 :
        break

scope.logout()
User folders:
       Inbox (  1): 1849 items
  Favourites (  2):    0 items
     Archive (  3):  447 items
       Trash (  4):   63 items
    Complete (461):   13 items
User jochym has 1849 requests.
The most recent completed requests:
771144: LX Cyg          jid: 422672
771143: EQ Lyr          jid: 422671
771142: DQ Vul          jid: 422670
771141: DX Vul          jid: 422669
771139: V686 Cyg        jid: 422667
771138: IP Cyg          jid: 422666
771137: SS Cyg          jid: 422665
771136: CH Cyg          jid: 422664
768922: LX Cyg          jid: 420780
768921: EQ Lyr          jid: 420779
768920: DQ Vul          jid: 420778