22
33import os
44import io
5- from typing import List
6- from .functions import upload as d , types as t , deal_status , get_uploads as getUploads , download as _download
5+ from .functions import upload as d ,deal_status , get_uploads as getUploads , download as _download
76
87
98class Lighthouse :
@@ -14,7 +13,7 @@ def __init__(self, token: str = ""):
1413 "No token provided: Please provide a token or set the LIGHTHOUSE_TOKEN environment variable"
1514 )
1615
17- def upload (self , source : str , tag : str = '' ) -> t . Upload :
16+ def upload (self , source : str , tag : str = '' ):
1817 """
1918 Upload a file or directory to the Lighthouse.
2019
@@ -26,7 +25,7 @@ def upload(self, source: str, tag: str = '') -> t.Upload:
2625 except Exception as e :
2726 raise e
2827
29- def uploadBlob (self , source : io .BufferedReader , filename : str , tag : str = '' ) -> t . Upload :
28+ def uploadBlob (self , source : io .BufferedReader , filename : str , tag : str = '' ):
3029 """
3130 Upload Blob a file or directory to the Lighthouse.
3231
@@ -41,7 +40,7 @@ def uploadBlob(self, source: io.BufferedReader, filename: str, tag: str = '') ->
4140 raise e
4241
4342 @staticmethod
44- def downloadBlob (dist : io .BufferedWriter , cid : str , chunk_size = 1024 * 1024 * 10 ) -> t . Upload :
43+ def downloadBlob (dist : io .BufferedWriter , cid : str , chunk_size = 1024 * 1024 * 10 ):
4544 """
4645 Download a Blob (file or directory) from the Lighthouse.
4746
@@ -59,7 +58,7 @@ def downloadBlob(dist: io.BufferedWriter, cid: str, chunk_size=1024*1024*10) ->
5958 raise e
6059
6160 @staticmethod
62- def downloadBlob (dist : io .BufferedWriter , cid : str , chunk_size = 1024 * 1024 * 10 ) -> t . Upload :
61+ def downloadBlob (dist : io .BufferedWriter , cid : str , chunk_size = 1024 * 1024 * 10 ):
6362 """
6463 Download Blob a file or directory to the Lighthouse.
6564
@@ -74,7 +73,7 @@ def downloadBlob(dist: io.BufferedWriter, cid: str, chunk_size=1024*1024*10) ->
7473 raise e
7574
7675 @staticmethod
77- def getDealStatus (cid : str ) -> List [ t . DealData ] :
76+ def getDealStatus (cid : str ):
7877 """
7978 Get deal status from the Lighthouse.
8079
@@ -87,7 +86,7 @@ def getDealStatus(cid: str) -> List[t.DealData]:
8786 raise e
8887
8988 @staticmethod
90- def getUploads (publicKey : str , pageNo : int = 1 ) -> List [ t . DealData ] :
89+ def getUploads (publicKey : str , pageNo : int = 1 ):
9190 """
9291 Get uploads from the Lighthouse.
9392
@@ -101,7 +100,7 @@ def getUploads(publicKey: str, pageNo: int = 1) -> List[t.DealData]:
101100 raise e
102101
103102 @staticmethod
104- def download (cid : str ) -> bytes :
103+ def download (cid : str ):
105104 """
106105 Download content from the Lighthouse using its Content Identifier (CID).
107106
@@ -114,7 +113,7 @@ def download(cid: str) -> bytes:
114113 except Exception as e :
115114 raise e
116115
117- def getTagged (self , tag : str ) -> t . Upload :
116+ def getTagged (self , tag : str ):
118117 """
119118 Retrieve an upload from the Lighthouse using its tag.
120119
0 commit comments