Coverage for gws-app/gws/plugin/mbtiles_layer/provider.py: 0%

9 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-05 13:35 +0200

1"""MBTiles provider.""" 

2 

3 

4import gws 

5 

6 

7class Config(gws.Config): 

8 """Access to an MBTiles file.""" 

9 

10 path: gws.FilePath 

11 """Path to the MBTiles file.""" 

12 

13 

14 

15class Object(gws.Node): 

16 """MBTiles file provider.""" 

17 

18 path: str 

19 """Path to the MBTiles file.""" 

20 

21 def configure(self): 

22 self.path = self.cfg('path') 

23 

24 def cache_hash(self): 

25 """Return a hash that identifies the data of the provider. 

26 

27 Returns: 

28 A hash of the file path. 

29 """ 

30 return gws.u.sha256([self.path])