File size: 492 Bytes
afd56bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import asyncio
import os
import sys

# Dodaj ścieżkę do projektu
sys.path.insert(0, os.path.dirname(__file__))

from backend.core.search.grant_search_service import grant_search_service

async def main():
    print('Service initialized.')
    res = await grant_search_service.get_all_grants()
    print(f'Loaded {len(res)} grants from all sources.')
    for grant in res:
        print(f" - [{grant.get('source')}] {grant.get('name')}")

if __name__ == "__main__":
    asyncio.run(main())